Skip to content
Commit be3eeb5b authored by Henrik Boström's avatar Henrik Boström Committed by Commit Bot
Browse files

[macOS] PixelBufferPool: Test retaining IOSurface, not CVPixelBuffer.

Pixel buffers originating from a CVPixelBufferPool are recycled when
no longer in use, previously only tested by releasing the last pixel
buffer reference and not touching the IOSurface.

This CL tests what happens when we are retaining not references to the
pixel buffer, but references to a pixel buffer's IOSurface or
incrementing its use count.

Outcome:
- Retaining references (base::ScopedCFTypeRef<IOSurfaceRef>) to an
  IOSurface does NOT prevent recycling.
- Retaining use count (IOSurfaceIncrementUseCount) to an IOSurface DOES
  prevent recycling.

This behavior is now documented in pixel_buffer_pool_mac.h.

Bug: chromium:1132299
Change-Id: Ibdcd3752a4467bc495eba4b543ecd73da1b2f41f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2520829


Commit-Queue: Markus Handell <handellm@google.com>
Reviewed-by: default avatarMarkus Handell <handellm@google.com>
Cr-Commit-Position: refs/heads/master@{#824814}
parent d3d4200f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment