layout tests: Use SharedBitmapIdRegistrar for TestPlugin.
This uses the new TextureLayer APIs to register SharedBitmapIds instead of using ClientSharedBitmapManager, in order to get the registration in the same IPC channel that the compositor uses for submitting frames that include the TestPlugin's shared memory bitmaps. The formula used for this change is: - Change std::unique_ptr<viz::SharedBitmap> to scoped_refptr<cc::CrossThreadSharedBitmap> - Allocate shm with viz::bitmap_allocation instead of with viz::SharedBitmapManager - Generate a SharedBitmapId when allocating and register it with SharedBitmapIdRegistrar - Store ownership of cc::SharedBitmapIdRegistration alongside each cc::CrossThreadSharedBitmap - Remove forward decls/includes for SharedBitmap and SharedBitmapManager (still need for SharedBitmapId) However, for TestPlugin a SharedMemory, and thus, a SharedBitmapId, is only given to the compositor a single time ever, and deleted in the ReleaseCallback. As well the SharedMemory is allocated earlier than when it is given to the compositor. So the SharedBitmapId registration is delated from the allocation step to where the SharedMemory is handed to the compositor. But since we only use a SharedMemory once, we can always do the registration there without any conditions. R=piman@chromium.org Bug: 730660 Change-Id: Idaf69b854062482f55d359f7542f576be7df1dd4 Reviewed-on: https://chromium-review.googlesource.com/987096 Commit-Queue: Antoine Labour <piman@chromium.org> Reviewed-by:Antoine Labour <piman@chromium.org> Cr-Commit-Position: refs/heads/master@{#547501}
Showing
Please register or sign in to comment