Reland "[macOS] PixelBufferPool: Test retaining IOSurface, not CVPixelBuffer."
This is a reland of be3eeb5b On "Mac ASan 64 Tests (1)", the assertion that the second pixel buffer's address will be identical to the first one does not hold. This assertion was unnecessary anyway, so it is removed. With this re-land, the IOSurface recycling uses EXPECT_EQ with IOSurfaceGetID() instead. Original change's description: > [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: Markus Handell <handellm@google.com> > Cr-Commit-Position: refs/heads/master@{#824814} TBR=handellm@google.com Bug: chromium:1132299 Change-Id: Ibe924d3f3ffaaca69262e9cd436c60d05e3ea2b7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2521623 Commit-Queue: Henrik Boström <hbos@chromium.org> Reviewed-by:Henrik Boström <hbos@chromium.org> Cr-Commit-Position: refs/heads/master@{#825304}
Showing
Please register or sign in to comment