Bug 1323797 - Add compositor support for triangle layers (for BasicCompositor backend) - Part 1: Replace DrawQuad with DrawGeometry draft
authorMiko Mynttinen <mikokm@gmail.com>
Tue, 10 Jan 2017 16:12:51 +0200
changeset 460984 72aca59a2d2fc890a398f25e68fd05d5ed2e7a87
parent 460918 ac3275723df59db0f09198fdb61b51e7002c391a
child 460985 03ee53d7922c097b551d412871732a73d74c9daf
push id41545
push userbmo:mikokm@gmail.com
push dateSat, 14 Jan 2017 16:23:29 +0000
bugs1323797
milestone53.0a1
Bug 1323797 - Add compositor support for triangle layers (for BasicCompositor backend) - Part 1: Replace DrawQuad with DrawGeometry MozReview-Commit-ID: ysOOFWwG5F
gfx/layers/composite/ContainerLayerComposite.cpp
--- a/gfx/layers/composite/ContainerLayerComposite.cpp
+++ b/gfx/layers/composite/ContainerLayerComposite.cpp
@@ -424,19 +424,19 @@ RenderLayers(ContainerT* aContainer, Lay
       // Ideally we would want to intersect the checkerboard region from the APZ with the layer bounds
       // and only fill in that area. However the layer bounds takes into account the base translation
       // for the painted layer whereas the checkerboard region does not. One does not simply
       // intersect areas in different coordinate spaces. So we do this a little more permissively
       // and only fill in the background when we know there is checkerboard, which in theory
       // should only occur transiently.
       EffectChain effectChain(layer);
       effectChain.mPrimaryEffect = new EffectSolidColor(color);
-      aManager->GetCompositor()->DrawQuad(gfx::Rect(layer->GetLayerBounds()), clipRect,
-                                          effectChain, layer->GetEffectiveOpacity(),
-                                          layer->GetEffectiveTransform());
+      aManager->GetCompositor()->DrawGeometry(gfx::Rect(layer->GetLayerBounds()), clipRect,
+                                              effectChain, layer->GetEffectiveOpacity(),
+                                              layer->GetEffectiveTransform(), Nothing());
     }
 
     if (layerToRender->HasLayerBeenComposited()) {
       // Composer2D will compose this layer so skip GPU composition
       // this time. The flag will be reset for the next composition phase
       // at the beginning of LayerManagerComposite::Rener().
       gfx::IntRect clearRect = layerToRender->GetClearRect();
       if (!clearRect.IsEmpty()) {