Commit Graph
17 Commits
Author SHA1 Message Date
Camillo LugaresiandCopybara-Service 53d015af08 Generic MultiPool template
PiperOrigin-RevId: 488783176
2022-11-15 16:15:42 -08:00
Camillo LugaresiandCopybara-Service b9fa2e3496 Make it possible to override the SimplePool factory used by MultiPool
This means MultiPool no longer needs a SetFlushPlatformCaches method, which was too specific to the CVPixelBufferPool.

PiperOrigin-RevId: 488783003
2022-11-15 16:14:27 -08:00
Camillo LugaresiandCopybara-Service 267476657d MultiPool options header refactoring
Passing MultiPool options to the base pool factories means that we don't have to specialize which options we pass to them.

PiperOrigin-RevId: 488782861
2022-11-15 16:13:05 -08:00
Camillo LugaresiandCopybara-Service 7ef3185ecb Allow customizing MultiPool options
These don't need to be constants.

PiperOrigin-RevId: 488782713
2022-11-15 16:11:54 -08:00
Camillo LugaresiandCopybara-Service f13903b7c5 Call SimplePool methods directly
This removes redundant helper functions in GpuBufferMultiPool.

PiperOrigin-RevId: 488782516
2022-11-15 16:10:34 -08:00
Camillo LugaresiandCopybara-Service 0c4522cb9f Move flush hook to CvPixelBufferPoolWrapper constructor
This unifies the implementation of GpuBufferMultiPool::GetBufferFromSimplePool.

PiperOrigin-RevId: 488782173
2022-11-15 16:07:17 -08:00
Camillo LugaresiandCopybara-Service a4fe3eb094 Add CreateBufferWithoutPool method to base pools
This may not fit exactly in a pool class, but it makes it easy for the multi-pool to find the appropriate method by depending only on the type of the base pool. For the CVPixelBuffer case, the buffer type is CFHolder<CVPixelBufferRef>, and it seems even less appropriate to specialize that template to add such a method there. An alternative would be to allow defining a creation function separately.

PiperOrigin-RevId: 488782054
2022-11-15 16:05:53 -08:00
Camillo LugaresiandCopybara-Service 0d273dd11a Factor out CvPixelBufferPoolWrapper
This is platform-specific and does not need to live in the main multi_pool sources.

PiperOrigin-RevId: 488781934
2022-11-15 16:04:27 -08:00
Camillo LugaresiandCopybara-Service ab2dd779e7 Factor out CvTextureCacheManager
This is a platform-specific component that is only used with CVPixelBufferPool.

PiperOrigin-RevId: 488781757
2022-11-15 16:02:53 -08:00
Camillo LugaresiandCopybara-Service a520d6cc38 Remove FORCE_CONTIGUOUS_PIXEL_BUFFER_ON_IPHONE_SIMULATOR
This workaround code is no longer necessary, as per the comment.

PiperOrigin-RevId: 488777606
2022-11-15 15:41:53 -08:00
Camillo LugaresiandCopybara-Service 3c71c64be1 Remove shared_ptr from SimplePool definition
This makes the types more explicit and will help with factoring out platform-specific code.

PiperOrigin-RevId: 488775470
2022-11-15 15:32:57 -08:00
Camillo LugaresiandCopybara-Service a67069156e Use flat_hash_map in ResourceCache
This is the recommended hashmap in most cases.

PiperOrigin-RevId: 488772031
2022-11-15 15:23:31 -08:00
Camillo LugaresiandCopybara-Service 7a87546c30 Internal change
PiperOrigin-RevId: 488761646
2022-11-15 14:39:58 -08:00
Camillo LugaresiandCopybara-Service 6f54308c25 Internal change
PiperOrigin-RevId: 488552135
2022-11-14 21:42:41 -08:00
Camillo LugaresiandCopybara-Service 1a151d9ffb Internal change
PiperOrigin-RevId: 486792117
2022-11-07 16:21:15 -08:00
Camillo LugaresiandCopybara-Service a5e4219590 Internal change
PiperOrigin-RevId: 481742662
2022-10-17 14:39:17 -07:00
Camillo LugaresiandCopybara-Service 364b8e8106 Internal change
PiperOrigin-RevId: 481210917
2022-10-14 12:47:48 -07:00