Bug 1097464 - Part 4 - Fix preserve3d wording for layer flags. r=roc
☠☠ backed out by f436921d97f7 ☠ ☠
authorThinker K.F. Li <thinker@codemud.net>
Thu, 17 Sep 2015 03:31:00 +0200
changeset 295637 727ebd9f744a4c84e8acb408c05e77e2c79068ec
parent 295636 03f03a776042ce9309a83748265635bf691be4e5
child 295638 fdaf4cfa6707273e5de6ac5cbfd8c27205c38a73
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs1097464
milestone43.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1097464 - Part 4 - Fix preserve3d wording for layer flags. r=roc
gfx/layers/Layers.cpp
gfx/layers/Layers.h
layout/base/nsDisplayList.cpp
--- a/gfx/layers/Layers.cpp
+++ b/gfx/layers/Layers.cpp
@@ -1245,17 +1245,17 @@ ContainerLayer::HasMultipleChildren()
 
 void
 ContainerLayer::SortChildrenBy3DZOrder(nsTArray<Layer*>& aArray)
 {
   nsAutoTArray<Layer*, 10> toSort;
 
   for (Layer* l = GetFirstChild(); l; l = l->GetNextSibling()) {
     ContainerLayer* container = l->AsContainerLayer();
-    if (container && container->GetContentFlags() & CONTENT_PRESERVE_3D) {
+    if (container && container->GetContentFlags() & CONTENT_EXTEND_3D_CONTEXT) {
       toSort.AppendElement(l);
     } else {
       if (toSort.Length() > 0) {
         SortLayersBy3DZOrder(toSort);
         aArray.AppendElements(Move(toSort));
         // XXX The move analysis gets confused here, because toSort gets moved
         // here, and then gets used again outside of the loop. To clarify that
         // we realize that the array is going to be empty to the move checker,
--- a/gfx/layers/Layers.h
+++ b/gfx/layers/Layers.h
@@ -779,17 +779,17 @@ public:
      * CONTENT_COMPONENT_ALPHA set.
      */
     CONTENT_COMPONENT_ALPHA_DESCENDANT = 0x04,
 
     /**
      * If this is set then this layer is part of a preserve-3d group, and should
      * be sorted with sibling layers that are also part of the same group.
      */
-    CONTENT_PRESERVE_3D = 0x08,
+    CONTENT_EXTEND_3D_CONTEXT = 0x08,
     /**
      * This indicates that the transform may be changed on during an empty
      * transaction where there is no possibility of redrawing the content, so the
      * implementation should be ready for that.
      */
     CONTENT_MAY_CHANGE_TRANSFORM = 0x10,
 
     /**
--- a/layout/base/nsDisplayList.cpp
+++ b/layout/base/nsDisplayList.cpp
@@ -5252,19 +5252,19 @@ already_AddRefed<Layer> nsDisplayTransfo
 
   if (!container) {
     return nullptr;
   }
 
   // Add the preserve-3d flag for this layer, BuildContainerLayerFor clears all flags,
   // so we never need to explicitely unset this flag.
   if (mFrame->Preserves3D() || mFrame->Preserves3DChildren()) {
-    container->SetContentFlags(container->GetContentFlags() | Layer::CONTENT_PRESERVE_3D);
+    container->SetContentFlags(container->GetContentFlags() | Layer::CONTENT_EXTEND_3D_CONTEXT);
   } else {
-    container->SetContentFlags(container->GetContentFlags() & ~Layer::CONTENT_PRESERVE_3D);
+    container->SetContentFlags(container->GetContentFlags() & ~Layer::CONTENT_EXTEND_3D_CONTEXT);
   }
 
   nsDisplayListBuilder::AddAnimationsAndTransitionsToLayer(container, aBuilder,
                                                            this, mFrame,
                                                            eCSSProperty_transform);
   if (ShouldPrerender(aBuilder)) {
     container->SetUserData(nsIFrame::LayerIsPrerenderedDataKey(),
                            /*the value is irrelevant*/nullptr);