Migrate PaintCanvasVideoRenderer to shared images
This CL ensures: - VideoFrame mailboxes are imported using the CreateAndTexStorage2DSharedImage API if they are shared images, and that the Begin/EndSharedImageAccessDirect scope are properly used. - Intermediate copies are allocated as shared images instead of internally to skia. The cache is modified to track the mailbox for the source texture, rather than a SkImage, to be able to import it into multiple contexts. Also the cached shared image is reused if possible (same context provider, same size) to reflect equivalent skia optimizations (SkImage pooling). Note: this CL doesn't cover PrepareVideoFrameForWebGL, used for the (still experimental) WEBGL_video_texture extension, which requires a fairly significant refactoring all the way to WebGL bindings to support shared image. Bug: 882547 Change-Id: I77b374526f3617db0fd936ffa5b71885e2c8fab3 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1616978 Commit-Queue: Antoine Labour <piman@chromium.org> Reviewed-by:Dan Sanders <sandersd@chromium.org> Auto-Submit: Antoine Labour <piman@chromium.org> Cr-Commit-Position: refs/heads/master@{#680021}
Showing
This diff is collapsed.
Please register or sign in to comment