Add support for DC overlays in SkiaRenderer.
This CL enables SkiaRenderer to use Windows DC layer overlays. The operation is essentially the same as GLRenderer with some minor differences. The list of DCLayerOverlay candidates is plumbed to the GPU thread via ScheduleGpuTask() instead of over command buffer. Also instead of providing a GL texture ID a gpu::Mailbox is provided. DCLayerOverlayProcessor::ProcessForUnderlay() is modified to set to SharedQuadState::are_contents_opaque true for the replacement SolidColorDrawQuad. SkiaRenderer needs to draw the replacement quad with SkBlendMode::kSrc but setting the blend mode to kSrc isn't supported by GLRenderer. SkiaRenderer uses the |are_contents_opaque| to change the blend mode at draw time while GLRenderer ignores it. SkiaOutputSurface::SkiaSwapBuffers() is also modified to optionally return a SyncToken. This SyncToken can be used to return overlay resources after swap buffers completes on the GPU thread. This should work for all overlay paths except macOS. Bug: 1003040 Change-Id: I9ff3ff55cde1aabfae8200fc2dfcc416c15d0005 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1796626Reviewed-by:weiliangc <weiliangc@chromium.org> Reviewed-by:
Vasiliy Telezhnikov <vasilyt@chromium.org> Reviewed-by:
Sunny Sachanandani <sunnyps@chromium.org> Commit-Queue: kylechar <kylechar@chromium.org> Cr-Commit-Position: refs/heads/master@{#697751}
Showing
Please register or sign in to comment