Bug 1097464 - Part 4: Fix preserve3d wording for layer flags. r=roc
authorThinker K.F. Li <thinker@codemud.net>
Thu, 17 Sep 2015 03:31:00 +0200
changeset 297510 ce91e635e21a0edff7ff0681cbda7d23b66fc1a3
parent 297509 84031c74b6fdfa7d291785e81ff0beea5d7c6c56
child 297511 cb6a976ec849c375b6adfdff6b59287efadaa22a
push id962
push userjlund@mozilla.com
push dateFri, 04 Dec 2015 23:28:54 +0000
treeherdermozilla-release@23a2d286e80f [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
@@ -780,17 +780,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);