[go: nahoru, domu]

Add DCLayerOverlayProcessor and supporting DCLayer structures.

DirectComposition layers are more flexible than normal hardware overlays
- for example they can have clip rects, be arbitrarily transformed, and
soon will have other capabilities like stacking contexts. So it makes
sense to transmit them to the GPU process using a new
glScheduleDCLayerCHROMIUM command.

The gpu command buffer code is mostly a copy and paste of the CALayer
code. The main difference for now is that it has a z order instead
of a sorting context, but they'll diverge more over time.

We can't DCLayers the same exact way as we currently use CALayers
because tile quads aren't accessible as DirectComposition surfaces so
complete RenderPasses can't be converted to use DCLayers. So we need to
create a new DCLayerOverlayProcessor that behaves somewhat similarly to
the regular OverlayProcessor.

This processor supports both promoting a single on top quad to an
overlay, as well as promoting other video quads to be underlays.

BUG=678800
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2736643004
Cr-Commit-Position: refs/heads/master@{#456512}
diff --git a/cc/BUILD.gn b/cc/BUILD.gn
index 342f566..183a9f12b 100644
--- a/cc/BUILD.gn
+++ b/cc/BUILD.gn
@@ -180,6 +180,8 @@
     "output/copy_output_request.h",
     "output/copy_output_result.cc",
     "output/copy_output_result.h",
+    "output/dc_layer_overlay.cc",
+    "output/dc_layer_overlay.h",
     "output/direct_renderer.cc",
     "output/direct_renderer.h",
     "output/dynamic_geometry_binding.cc",