Bug 1391816 - Follow-up to rename WebRenderCommandsBuilder to WebRenderCommandBuilder. r=jrmuizel
authorKartikaya Gupta <kgupta@mozilla.com>
Wed, 04 Oct 2017 10:45:29 -0400
changeset 384461 dbd85646f4440446b95517a01e53f34db5a3a09f
parent 384460 7e823773540359ae27623e5b18b0814caedf86db
child 384462 11f27f6d5059ada236bfb63bd4811377ccbb3fbe
push id52644
push userkgupta@mozilla.com
push dateWed, 04 Oct 2017 15:11:09 +0000
treeherderautoland@dbd85646f444 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel
bugs1391816
milestone58.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 1391816 - Follow-up to rename WebRenderCommandsBuilder to WebRenderCommandBuilder. r=jrmuizel MozReview-Commit-ID: 3M0CTIheg5s
gfx/layers/moz.build
gfx/layers/wr/ScrollingLayersHelper.cpp
gfx/layers/wr/ScrollingLayersHelper.h
gfx/layers/wr/WebRenderCommandBuilder.cpp
gfx/layers/wr/WebRenderCommandBuilder.h
gfx/layers/wr/WebRenderCommandsBuilder.cpp
gfx/layers/wr/WebRenderCommandsBuilder.h
gfx/layers/wr/WebRenderLayerManager.cpp
gfx/layers/wr/WebRenderLayerManager.h
layout/generic/nsBulletFrame.cpp
--- a/gfx/layers/moz.build
+++ b/gfx/layers/moz.build
@@ -231,17 +231,17 @@ EXPORTS.mozilla.layers += [
     'UpdateImageHelper.h',
     'wr/AsyncImagePipelineManager.h',
     'wr/IpcResourceUpdateQueue.h',
     'wr/ScrollingLayersHelper.h',
     'wr/StackingContextHelper.h',
     'wr/WebRenderBridgeChild.h',
     'wr/WebRenderBridgeParent.h',
     'wr/WebRenderCanvasRenderer.h',
-    'wr/WebRenderCommandsBuilder.h',
+    'wr/WebRenderCommandBuilder.h',
     'wr/WebRenderImageHost.h',
     'wr/WebRenderLayerManager.h',
     'wr/WebRenderLayersLogging.h',
     'wr/WebRenderMessageUtils.h',
     'wr/WebRenderScrollData.h',
     'wr/WebRenderScrollDataWrapper.h',
     'wr/WebRenderTextureHost.h',
     'wr/WebRenderUserData.h',
@@ -462,17 +462,17 @@ UNIFIED_SOURCES += [
     'TextureWrapperImage.cpp',
     'wr/AsyncImagePipelineManager.cpp',
     'wr/IpcResourceUpdateQueue.cpp',
     'wr/ScrollingLayersHelper.cpp',
     'wr/StackingContextHelper.cpp',
     'wr/WebRenderBridgeChild.cpp',
     'wr/WebRenderBridgeParent.cpp',
     'wr/WebRenderCanvasRenderer.cpp',
-    'wr/WebRenderCommandsBuilder.cpp',
+    'wr/WebRenderCommandBuilder.cpp',
     'wr/WebRenderImageHost.cpp',
     'wr/WebRenderLayerManager.cpp',
     'wr/WebRenderLayersLogging.cpp',
     'wr/WebRenderScrollData.cpp',
     'wr/WebRenderUserData.cpp',
     # XXX here are some unified build error.
     #'wr/WebRenderTextureHost.cpp'
 ]
--- a/gfx/layers/wr/ScrollingLayersHelper.cpp
+++ b/gfx/layers/wr/ScrollingLayersHelper.cpp
@@ -2,27 +2,26 @@
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "mozilla/layers/ScrollingLayersHelper.h"
 
 #include "FrameMetrics.h"
 #include "mozilla/layers/StackingContextHelper.h"
-#include "mozilla/layers/WebRenderLayerManager.h"
 #include "mozilla/webrender/WebRenderAPI.h"
 #include "UnitTransforms.h"
 
 namespace mozilla {
 namespace layers {
 
 ScrollingLayersHelper::ScrollingLayersHelper(nsDisplayItem* aItem,
                                              wr::DisplayListBuilder& aBuilder,
                                              const StackingContextHelper& aStackingContext,
-                                             WebRenderCommandsBuilder::ClipIdMap& aCache,
+                                             WebRenderCommandBuilder::ClipIdMap& aCache,
                                              bool aApzEnabled)
   : mBuilder(&aBuilder)
   , mPushedClipAndScroll(false)
 {
   int32_t auPerDevPixel = aItem->Frame()->PresContext()->AppUnitsPerDevPixel();
 
   if (!aApzEnabled) {
     // If APZ is not enabled, we can ignore all the stuff with ASRs; we just
@@ -71,17 +70,17 @@ ScrollingLayersHelper::ScrollingLayersHe
 
 void
 ScrollingLayersHelper::DefineAndPushScrollLayers(nsDisplayItem* aItem,
                                                  const ActiveScrolledRoot* aAsr,
                                                  const DisplayItemClipChain* aChain,
                                                  wr::DisplayListBuilder& aBuilder,
                                                  int32_t aAppUnitsPerDevPixel,
                                                  const StackingContextHelper& aStackingContext,
-                                                 WebRenderCommandsBuilder::ClipIdMap& aCache)
+                                                 WebRenderCommandBuilder::ClipIdMap& aCache)
 {
   if (!aAsr) {
     return;
   }
   FrameMetrics::ViewID scrollId = nsLayoutUtils::ViewIDForASR(aAsr);
   if (aBuilder.TopmostScrollId() == scrollId) {
     // it's already been pushed, so we don't need to recurse any further.
     return;
@@ -125,17 +124,17 @@ ScrollingLayersHelper::DefineAndPushScro
   }
 }
 
 void
 ScrollingLayersHelper::DefineAndPushChain(const DisplayItemClipChain* aChain,
                                           wr::DisplayListBuilder& aBuilder,
                                           const StackingContextHelper& aStackingContext,
                                           int32_t aAppUnitsPerDevPixel,
-                                          WebRenderCommandsBuilder::ClipIdMap& aCache)
+                                          WebRenderCommandBuilder::ClipIdMap& aCache)
 {
   if (!aChain) {
     return;
   }
   auto it = aCache.find(aChain);
   Maybe<wr::WrClipId> clipId = (it != aCache.end() ? Some(it->second) : Nothing());
   if (clipId && clipId == aBuilder.TopmostClipId()) {
     // it was already in the cache and pushed on the WR clip stack, so we don't
--- a/gfx/layers/wr/ScrollingLayersHelper.h
+++ b/gfx/layers/wr/ScrollingLayersHelper.h
@@ -2,17 +2,17 @@
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef GFX_SCROLLINGLAYERSHELPER_H
 #define GFX_SCROLLINGLAYERSHELPER_H
 
 #include "mozilla/Attributes.h"
-#include "mozilla/layers/WebRenderLayerManager.h"
+#include "mozilla/layers/WebRenderCommandBuilder.h"
 
 namespace mozilla {
 
 struct DisplayItemClipChain;
 
 namespace wr {
 class DisplayListBuilder;
 }
@@ -23,33 +23,33 @@ struct FrameMetrics;
 class StackingContextHelper;
 
 class MOZ_RAII ScrollingLayersHelper
 {
 public:
   ScrollingLayersHelper(nsDisplayItem* aItem,
                         wr::DisplayListBuilder& aBuilder,
                         const StackingContextHelper& aStackingContext,
-                        WebRenderCommandsBuilder::ClipIdMap& aCache,
+                        WebRenderCommandBuilder::ClipIdMap& aCache,
                         bool aApzEnabled);
   ~ScrollingLayersHelper();
 
 private:
   void DefineAndPushScrollLayers(nsDisplayItem* aItem,
                                  const ActiveScrolledRoot* aAsr,
                                  const DisplayItemClipChain* aChain,
                                  wr::DisplayListBuilder& aBuilder,
                                  int32_t aAppUnitsPerDevPixel,
                                  const StackingContextHelper& aStackingContext,
-                                 WebRenderCommandsBuilder::ClipIdMap& aCache);
+                                 WebRenderCommandBuilder::ClipIdMap& aCache);
   void DefineAndPushChain(const DisplayItemClipChain* aChain,
                           wr::DisplayListBuilder& aBuilder,
                           const StackingContextHelper& aStackingContext,
                           int32_t aAppUnitsPerDevPixel,
-                          WebRenderCommandsBuilder::ClipIdMap& aCache);
+                          WebRenderCommandBuilder::ClipIdMap& aCache);
   bool DefineAndPushScrollLayer(const FrameMetrics& aMetrics,
                                 const StackingContextHelper& aStackingContext);
 
   wr::DisplayListBuilder* mBuilder;
   bool mPushedClipAndScroll;
   std::vector<wr::ScrollOrClipId> mPushedClips;
 };
 
rename from gfx/layers/wr/WebRenderCommandsBuilder.cpp
rename to gfx/layers/wr/WebRenderCommandBuilder.cpp
--- a/gfx/layers/wr/WebRenderCommandsBuilder.cpp
+++ b/gfx/layers/wr/WebRenderCommandBuilder.cpp
@@ -1,14 +1,14 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#include "WebRenderCommandsBuilder.h"
+#include "WebRenderCommandBuilder.h"
 
 #include "BasicLayers.h"
 #include "mozilla/gfx/2D.h"
 #include "mozilla/gfx/Types.h"
 #include "mozilla/gfx/DrawEventRecorder.h"
 #include "mozilla/layers/ImageClient.h"
 #include "mozilla/layers/WebRenderBridgeChild.h"
 #include "mozilla/layers/WebRenderLayerManager.h"
@@ -18,29 +18,29 @@
 #include "mozilla/layers/UpdateImageHelper.h"
 #include "nsDisplayListInvalidation.h"
 #include "WebRenderCanvasRenderer.h"
 #include "LayerTreeInvalidation.h"
 
 namespace mozilla {
 namespace layers {
 
-void WebRenderCommandsBuilder::Destroy()
+void WebRenderCommandBuilder::Destroy()
 {
   mLastCanvasDatas.Clear();
   RemoveUnusedAndResetWebRenderUserData();
 }
 
 void
-WebRenderCommandsBuilder::BuildWebRenderCommands(wr::DisplayListBuilder& aBuilder,
-                                                 wr::IpcResourceUpdateQueue& aResourceUpdates,
-                                                 nsDisplayList* aDisplayList,
-                                                 nsDisplayListBuilder* aDisplayListBuilder,
-                                                 WebRenderScrollData& aScrollData,
-                                                 wr::LayoutSize& aContentSize)
+WebRenderCommandBuilder::BuildWebRenderCommands(wr::DisplayListBuilder& aBuilder,
+                                                wr::IpcResourceUpdateQueue& aResourceUpdates,
+                                                nsDisplayList* aDisplayList,
+                                                nsDisplayListBuilder* aDisplayListBuilder,
+                                                WebRenderScrollData& aScrollData,
+                                                wr::LayoutSize& aContentSize)
 {
   { // scoping for StackingContextHelper RAII
 
     StackingContextHelper sc;
     mParentCommands.Clear();
     aScrollData = WebRenderScrollData();
     MOZ_ASSERT(mLayerScrollData.empty());
     mLastCanvasDatas.Clear();
@@ -81,21 +81,21 @@ WebRenderCommandsBuilder::BuildWebRender
     RemoveUnusedAndResetWebRenderUserData();
   }
 
   aBuilder.PushBuiltDisplayList(mBuiltDisplayList);
   mManager->WrBridge()->AddWebRenderParentCommands(mParentCommands);
 }
 
 void
-WebRenderCommandsBuilder::CreateWebRenderCommandsFromDisplayList(nsDisplayList* aDisplayList,
-                                                                 nsDisplayListBuilder* aDisplayListBuilder,
-                                                                 const StackingContextHelper& aSc,
-                                                                 wr::DisplayListBuilder& aBuilder,
-                                                                 wr::IpcResourceUpdateQueue& aResources)
+WebRenderCommandBuilder::CreateWebRenderCommandsFromDisplayList(nsDisplayList* aDisplayList,
+                                                                nsDisplayListBuilder* aDisplayListBuilder,
+                                                                const StackingContextHelper& aSc,
+                                                                wr::DisplayListBuilder& aBuilder,
+                                                                wr::IpcResourceUpdateQueue& aResources)
 {
   bool apzEnabled = mManager->AsyncPanZoomEnabled();
   EventRegions eventRegions;
 
   for (nsDisplayItem* i = aDisplayList->GetBottom(); i; i = i->GetAbove()) {
     nsDisplayItem* item = i;
     DisplayItemType itemType = item->GetType();
 
@@ -104,17 +104,16 @@ WebRenderCommandsBuilder::CreateWebRende
     if (itemType == DisplayItemType::TYPE_LAYER_EVENT_REGIONS) {
       nsDisplayLayerEventRegions* eventRegions =
         static_cast<nsDisplayLayerEventRegions*>(item);
       if (eventRegions->IsEmpty()) {
         continue;
       }
     }
 
-
     // Peek ahead to the next item and try merging with it or swapping with it
     // if necessary.
     AutoTArray<nsDisplayItem*, 1> mergedItems;
     mergedItems.AppendElement(item);
     for (nsDisplayItem* peek = item->GetAbove(); peek; peek = peek->GetAbove()) {
       if (!item->CanMerge(peek)) {
         break;
       }
@@ -234,22 +233,22 @@ WebRenderCommandsBuilder::CreateWebRende
   if (!eventRegions.IsEmpty()) {
     MOZ_ASSERT(apzEnabled);
     MOZ_ASSERT(!mLayerScrollData.empty());
     mLayerScrollData.back().AddEventRegions(eventRegions);
   }
 }
 
 Maybe<wr::ImageKey>
-WebRenderCommandsBuilder::CreateImageKey(nsDisplayItem* aItem,
-                                         ImageContainer* aContainer,
-                                         mozilla::wr::DisplayListBuilder& aBuilder,
-                                         mozilla::wr::IpcResourceUpdateQueue& aResources,
-                                         const StackingContextHelper& aSc,
-                                         gfx::IntSize& aSize)
+WebRenderCommandBuilder::CreateImageKey(nsDisplayItem* aItem,
+                                        ImageContainer* aContainer,
+                                        mozilla::wr::DisplayListBuilder& aBuilder,
+                                        mozilla::wr::IpcResourceUpdateQueue& aResources,
+                                        const StackingContextHelper& aSc,
+                                        gfx::IntSize& aSize)
 {
   RefPtr<WebRenderImageData> imageData = CreateOrRecycleWebRenderUserData<WebRenderImageData>(aItem);
   MOZ_ASSERT(imageData);
 
   if (aContainer->IsAsync()) {
     bool snap;
     nsRect bounds = aItem->GetBounds(nullptr, &snap);
     int32_t appUnitsPerDevPixel = aItem->Frame()->PresContext()->AppUnitsPerDevPixel();
@@ -283,22 +282,22 @@ WebRenderCommandsBuilder::CreateImageKey
   }
   mozilla::layers::Image* image = autoLock.GetImage();
   aSize = image->GetSize();
 
   return imageData->UpdateImageKey(aContainer, aResources);
 }
 
 bool
-WebRenderCommandsBuilder::PushImage(nsDisplayItem* aItem,
-                                    ImageContainer* aContainer,
-                                    mozilla::wr::DisplayListBuilder& aBuilder,
-                                    mozilla::wr::IpcResourceUpdateQueue& aResources,
-                                    const StackingContextHelper& aSc,
-                                    const LayerRect& aRect)
+WebRenderCommandBuilder::PushImage(nsDisplayItem* aItem,
+                                   ImageContainer* aContainer,
+                                   mozilla::wr::DisplayListBuilder& aBuilder,
+                                   mozilla::wr::IpcResourceUpdateQueue& aResources,
+                                   const StackingContextHelper& aSc,
+                                   const LayerRect& aRect)
 {
   gfx::IntSize size;
   Maybe<wr::ImageKey> key = CreateImageKey(aItem, aContainer,
                                            aBuilder, aResources,
                                            aSc, size);
   if (aContainer->IsAsync()) {
     // Async ImageContainer does not create ImageKey, instead it uses Pipeline.
     MOZ_ASSERT(key.isNothing());
@@ -385,22 +384,22 @@ PaintItemByDrawTarget(nsDisplayItem* aIt
     float r = float(rand()) / RAND_MAX;
     float g = float(rand()) / RAND_MAX;
     float b = float(rand()) / RAND_MAX;
     aDT->FillRect(gfx::Rect(0, 0, aImageRect.Width(), aImageRect.Height()), gfx::ColorPattern(gfx::Color(r, g, b, 0.5)));
   }
 }
 
 already_AddRefed<WebRenderFallbackData>
-WebRenderCommandsBuilder::GenerateFallbackData(nsDisplayItem* aItem,
-                                               wr::DisplayListBuilder& aBuilder,
-                                               wr::IpcResourceUpdateQueue& aResources,
-                                               const StackingContextHelper& aSc,
-                                               nsDisplayListBuilder* aDisplayListBuilder,
-                                               LayerRect& aImageRect)
+WebRenderCommandBuilder::GenerateFallbackData(nsDisplayItem* aItem,
+                                              wr::DisplayListBuilder& aBuilder,
+                                              wr::IpcResourceUpdateQueue& aResources,
+                                              const StackingContextHelper& aSc,
+                                              nsDisplayListBuilder* aDisplayListBuilder,
+                                              LayerRect& aImageRect)
 {
   RefPtr<WebRenderFallbackData> fallbackData = CreateOrRecycleWebRenderUserData<WebRenderFallbackData>(aItem);
 
   bool snap;
   nsRect itemBounds = aItem->GetBounds(aDisplayListBuilder, &snap);
   nsRect clippedBounds = itemBounds;
 
   const DisplayItemClip& clip = aItem->GetClip();
@@ -495,17 +494,16 @@ WebRenderCommandsBuilder::GenerateFallba
                                 aDisplayListBuilder,
                                 fallbackData->mBasicLayerManager, mManager, scale);
         }
         if (!helper.UpdateImage()) {
           return nullptr;
         }
       }
 
-
       // Force update the key in fallback data since we repaint the image in this path.
       // If not force update, fallbackData may reuse the original key because it
       // doesn't know UpdateImageHelper already updated the image container.
       if (!fallbackData->UpdateImageKey(imageContainer, aResources, true)) {
         return nullptr;
       }
     }
 
@@ -518,22 +516,22 @@ WebRenderCommandsBuilder::GenerateFallba
   fallbackData->SetBounds(clippedBounds);
 
   MOZ_ASSERT(fallbackData->GetKey());
 
   return fallbackData.forget();
 }
 
 Maybe<wr::WrImageMask>
-WebRenderCommandsBuilder::BuildWrMaskImage(nsDisplayItem* aItem,
-                                           wr::DisplayListBuilder& aBuilder,
-                                           wr::IpcResourceUpdateQueue& aResources,
-                                           const StackingContextHelper& aSc,
-                                           nsDisplayListBuilder* aDisplayListBuilder,
-                                           const LayerRect& aBounds)
+WebRenderCommandBuilder::BuildWrMaskImage(nsDisplayItem* aItem,
+                                          wr::DisplayListBuilder& aBuilder,
+                                          wr::IpcResourceUpdateQueue& aResources,
+                                          const StackingContextHelper& aSc,
+                                          nsDisplayListBuilder* aDisplayListBuilder,
+                                          const LayerRect& aBounds)
 {
   LayerRect imageRect;
   RefPtr<WebRenderFallbackData> fallbackData = GenerateFallbackData(aItem, aBuilder, aResources,
                                                                     aSc, aDisplayListBuilder,
                                                                     imageRect);
   if (!fallbackData) {
     return Nothing();
   }
@@ -541,21 +539,21 @@ WebRenderCommandsBuilder::BuildWrMaskIma
   wr::WrImageMask imageMask;
   imageMask.image = fallbackData->GetKey().value();
   imageMask.rect = aSc.ToRelativeLayoutRect(aBounds);
   imageMask.repeat = false;
   return Some(imageMask);
 }
 
 bool
-WebRenderCommandsBuilder::PushItemAsImage(nsDisplayItem* aItem,
-                                          wr::DisplayListBuilder& aBuilder,
-                                          wr::IpcResourceUpdateQueue& aResources,
-                                          const StackingContextHelper& aSc,
-                                          nsDisplayListBuilder* aDisplayListBuilder)
+WebRenderCommandBuilder::PushItemAsImage(nsDisplayItem* aItem,
+                                         wr::DisplayListBuilder& aBuilder,
+                                         wr::IpcResourceUpdateQueue& aResources,
+                                         const StackingContextHelper& aSc,
+                                         nsDisplayListBuilder* aDisplayListBuilder)
 {
   LayerRect imageRect;
   RefPtr<WebRenderFallbackData> fallbackData = GenerateFallbackData(aItem, aBuilder, aResources,
                                                                     aSc, aDisplayListBuilder,
                                                                     imageRect);
   if (!fallbackData) {
     return false;
   }
@@ -566,17 +564,17 @@ WebRenderCommandsBuilder::PushItemAsImag
                      dest,
                      !aItem->BackfaceIsHidden(),
                      wr::ToImageRendering(sampleFilter),
                      fallbackData->GetKey().value());
   return true;
 }
 
 void
-WebRenderCommandsBuilder::RemoveUnusedAndResetWebRenderUserData()
+WebRenderCommandBuilder::RemoveUnusedAndResetWebRenderUserData()
 {
   for (auto iter = mWebRenderUserDatas.Iter(); !iter.Done(); iter.Next()) {
     WebRenderUserData* data = iter.Get()->GetKey();
     if (!data->IsUsed()) {
       nsIFrame* frame = data->GetFrame();
 
       MOZ_ASSERT(frame->HasProperty(nsIFrame::WebRenderUserDataProperty()));
 
@@ -600,9 +598,8 @@ WebRenderCommandsBuilder::RemoveUnusedAn
     }
 
     data->SetUsed(false);
   }
 }
 
 } // namespace layers
 } // namespace mozilla
-
rename from gfx/layers/wr/WebRenderCommandsBuilder.h
rename to gfx/layers/wr/WebRenderCommandBuilder.h
--- a/gfx/layers/wr/WebRenderCommandsBuilder.h
+++ b/gfx/layers/wr/WebRenderCommandBuilder.h
@@ -1,15 +1,15 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#ifndef GFX_WEBRENDERCOMMANDSBUILDER_H
-#define GFX_WEBRENDERCOMMANDSBUILDER_H
+#ifndef GFX_WEBRENDERCOMMANDBUILDER_H
+#define GFX_WEBRENDERCOMMANDBUILDER_H
 
 #include "mozilla/webrender/WebRenderAPI.h"
 #include "mozilla/layers/WebRenderMessages.h"
 #include "mozilla/layers/WebRenderScrollData.h"
 #include "mozilla/layers/WebRenderUserData.h"
 #include "nsDisplayList.h"
 #include "nsIFrame.h"
 
@@ -23,63 +23,63 @@ class ImageContainer;
 class WebRenderBridgeChild;
 class WebRenderCanvasData;
 class WebRenderCanvasRendererAsync;
 class WebRenderImageData;
 class WebRenderFallbackData;
 class WebRenderParentCommand;
 class WebRenderUserData;
 
-class WebRenderCommandsBuilder {
+class WebRenderCommandBuilder {
   typedef nsTHashtable<nsRefPtrHashKey<WebRenderUserData>> WebRenderUserDataRefTable;
   typedef nsTHashtable<nsRefPtrHashKey<WebRenderCanvasData>> CanvasDataSet;
 
 public:
-  explicit WebRenderCommandsBuilder(WebRenderLayerManager* aManager)
+  explicit WebRenderCommandBuilder(WebRenderLayerManager* aManager)
   : mManager(aManager)
   , mLastAsr(nullptr)
   {}
 
   void Destroy();
 
   void BuildWebRenderCommands(wr::DisplayListBuilder& aBuilder,
                               wr::IpcResourceUpdateQueue& aResourceUpdates,
                               nsDisplayList* aDisplayList,
                               nsDisplayListBuilder* aDisplayListBuilder,
                               WebRenderScrollData& aScrollData,
                               wr::LayoutSize& aContentSize);
 
   Maybe<wr::ImageKey> CreateImageKey(nsDisplayItem* aItem,
-                                            ImageContainer* aContainer,
-                                            mozilla::wr::DisplayListBuilder& aBuilder,
-                                            mozilla::wr::IpcResourceUpdateQueue& aResources,
-                                            const StackingContextHelper& aSc,
-                                            gfx::IntSize& aSize);
+                                     ImageContainer* aContainer,
+                                     mozilla::wr::DisplayListBuilder& aBuilder,
+                                     mozilla::wr::IpcResourceUpdateQueue& aResources,
+                                     const StackingContextHelper& aSc,
+                                     gfx::IntSize& aSize);
 
   WebRenderUserDataRefTable* GetWebRenderUserDataTable() { return &mWebRenderUserDatas; }
 
   bool PushImage(nsDisplayItem* aItem,
-                        ImageContainer* aContainer,
-                        mozilla::wr::DisplayListBuilder& aBuilder,
-                        mozilla::wr::IpcResourceUpdateQueue& aResources,
-                        const StackingContextHelper& aSc,
-                        const LayerRect& aRect);
+                 ImageContainer* aContainer,
+                 mozilla::wr::DisplayListBuilder& aBuilder,
+                 mozilla::wr::IpcResourceUpdateQueue& aResources,
+                 const StackingContextHelper& aSc,
+                 const LayerRect& aRect);
 
   Maybe<wr::WrImageMask> BuildWrMaskImage(nsDisplayItem* aItem,
-                                                 wr::DisplayListBuilder& aBuilder,
-                                                 wr::IpcResourceUpdateQueue& aResources,
-                                                 const StackingContextHelper& aSc,
-                                                 nsDisplayListBuilder* aDisplayListBuilder,
-                                                 const LayerRect& aBounds);
+                                          wr::DisplayListBuilder& aBuilder,
+                                          wr::IpcResourceUpdateQueue& aResources,
+                                          const StackingContextHelper& aSc,
+                                          nsDisplayListBuilder* aDisplayListBuilder,
+                                          const LayerRect& aBounds);
 
   bool PushItemAsImage(nsDisplayItem* aItem,
-                              wr::DisplayListBuilder& aBuilder,
-                              wr::IpcResourceUpdateQueue& aResources,
-                              const StackingContextHelper& aSc,
-                              nsDisplayListBuilder* aDisplayListBuilder);
+                       wr::DisplayListBuilder& aBuilder,
+                       wr::IpcResourceUpdateQueue& aResources,
+                       const StackingContextHelper& aSc,
+                       nsDisplayListBuilder* aDisplayListBuilder);
 
   void CreateWebRenderCommandsFromDisplayList(nsDisplayList* aDisplayList,
                                               nsDisplayListBuilder* aDisplayListBuilder,
                                               const StackingContextHelper& aSc,
                                               wr::DisplayListBuilder& aBuilder,
                                               wr::IpcResourceUpdateQueue& aResources);
 
   already_AddRefed<WebRenderFallbackData> GenerateFallbackData(nsDisplayItem* aItem,
@@ -159,25 +159,25 @@ private:
   // These fields are used to save a copy of the display list for
   // empty transactions in layers-free mode.
   wr::BuiltDisplayList mBuiltDisplayList;
   nsTArray<WebRenderParentCommand> mParentCommands;
 
   // We use this as a temporary data structure while building the mScrollData
   // inside a layers-free transaction.
   std::vector<WebRenderLayerScrollData> mLayerScrollData;
-  // We use this as a temporary data structure to track the current displayGenerateFallbackData
+  // We use this as a temporary data structure to track the current display
   // item's ASR as we recurse in CreateWebRenderCommandsFromDisplayList. We
   // need this so that WebRenderLayerScrollData items that deeper in the
   // tree don't duplicate scroll metadata that their ancestors already have.
   std::vector<const ActiveScrolledRoot*> mAsrStack;
   const ActiveScrolledRoot* mLastAsr;
 
   WebRenderUserDataRefTable mWebRenderUserDatas;
 
   // Store of WebRenderCanvasData objects for use in empty transactions
   CanvasDataSet mLastCanvasDatas;
 };
 
 } // namespace layers
 } // namespace mozilla
 
-#endif /* GFX_WEBRENDERCOMMANDSBUILDER_H */
+#endif /* GFX_WEBRENDERCOMMANDBUILDER_H */
--- a/gfx/layers/wr/WebRenderLayerManager.cpp
+++ b/gfx/layers/wr/WebRenderLayerManager.cpp
@@ -28,17 +28,17 @@ namespace layers {
 
 WebRenderLayerManager::WebRenderLayerManager(nsIWidget* aWidget)
   : mWidget(aWidget)
   , mLatestTransactionId(0)
   , mNeedsComposite(false)
   , mIsFirstPaint(false)
   , mTarget(nullptr)
   , mPaintSequenceNumber(0)
-  , mWebRenderCommandsBuilder(this)
+  , mWebRenderCommandBuilder(this)
 {
   MOZ_COUNT_CTOR(WebRenderLayerManager);
 }
 
 KnowsCompositor*
 WebRenderLayerManager::AsKnowsCompositor()
 {
   return mWrChild;
@@ -101,17 +101,17 @@ WebRenderLayerManager::DoDestroy(bool aI
   }
 
   // Clear this before calling RemoveUnusedAndResetWebRenderUserData(),
   // otherwise that function might destroy some WebRenderAnimationData instances
   // which will put stuff back into mDiscardedCompositorAnimationsIds. If
   // mActiveCompositorAnimationIds is empty that won't happen.
   mActiveCompositorAnimationIds.clear();
 
-  mWebRenderCommandsBuilder.Destroy();
+  mWebRenderCommandBuilder.Destroy();
 
   if (mTransactionIdAllocator) {
     // Make sure to notify the refresh driver just in case it's waiting on a
     // pending transaction. Do this at the top of the event loop so we don't
     // cause a paint to occur during compositor shutdown.
     RefPtr<TransactionIdAllocator> allocator = mTransactionIdAllocator;
     uint64_t id = mLatestTransactionId;
 
@@ -242,22 +242,22 @@ WebRenderLayerManager::EndTransactionWit
     return;
   }
   DiscardCompositorAnimations();
 
   wr::LayoutSize contentSize { (float)size.width, (float)size.height };
   wr::DisplayListBuilder builder(WrBridge()->GetPipeline(), contentSize);
   wr::IpcResourceUpdateQueue resourceUpdates(WrBridge()->GetShmemAllocator());
 
-  mWebRenderCommandsBuilder.BuildWebRenderCommands(builder,
-                                                   resourceUpdates,
-                                                   aDisplayList,
-                                                   aDisplayListBuilder,
-                                                   mScrollData,
-                                                   contentSize);
+  mWebRenderCommandBuilder.BuildWebRenderCommands(builder,
+                                                  resourceUpdates,
+                                                  aDisplayList,
+                                                  aDisplayListBuilder,
+                                                  mScrollData,
+                                                  contentSize);
 
   mWidget->AddWindowOverlayWebRenderCommands(WrBridge(), builder, resourceUpdates);
   WrBridge()->ClearReadLocks();
 
   // We can't finish this transaction so return. This usually
   // happens in an empty transaction where we can't repaint a painted layer.
   // In this case, leave the transaction open and let a full transaction happen.
   if (mTransactionIncomplete) {
--- a/gfx/layers/wr/WebRenderLayerManager.h
+++ b/gfx/layers/wr/WebRenderLayerManager.h
@@ -11,17 +11,17 @@
 
 #include "gfxPrefs.h"
 #include "Layers.h"
 #include "mozilla/MozPromise.h"
 #include "mozilla/layers/APZTestData.h"
 #include "mozilla/layers/FocusTarget.h"
 #include "mozilla/layers/StackingContextHelper.h"
 #include "mozilla/layers/TransactionIdAllocator.h"
-#include "mozilla/layers/WebRenderCommandsBuilder.h"
+#include "mozilla/layers/WebRenderCommandBuilder.h"
 #include "mozilla/layers/WebRenderScrollData.h"
 #include "mozilla/layers/WebRenderUserData.h"
 #include "mozilla/webrender/WebRenderAPI.h"
 #include "mozilla/webrender/WebRenderTypes.h"
 #include "nsDisplayList.h"
 
 class nsIWidget;
 
@@ -145,18 +145,19 @@ public:
     mApzTestData.LogTestDataForPaint(mPaintSequenceNumber, aScrollId, aKey, aValue);
   }
   // See equivalent function in ClientLayerManager
   const APZTestData& GetAPZTestData() const
   { return mApzTestData; }
 
   bool SetPendingScrollUpdateForNextTransaction(FrameMetrics::ViewID aScrollId,
                                                 const ScrollUpdateInfo& aUpdateInfo) override;
-  WebRenderCommandsBuilder& CommandBuilder() { return mWebRenderCommandsBuilder; }
-  WebRenderUserDataRefTable* GetWebRenderUserDataTable() { return mWebRenderCommandsBuilder.GetWebRenderUserDataTable(); }
+
+  WebRenderCommandBuilder& CommandBuilder() { return mWebRenderCommandBuilder; }
+  WebRenderUserDataRefTable* GetWebRenderUserDataTable() { return mWebRenderCommandBuilder.GetWebRenderUserDataTable(); }
   WebRenderScrollData& GetScrollData() { return mScrollData; }
 
 private:
   /**
    * Take a snapshot of the parent context, and copy
    * it into mTarget.
    */
   void MakeSnapshotIfRequired(LayoutDeviceIntSize aSize);
@@ -191,29 +192,29 @@ private:
   WebRenderScrollData mScrollData;
 
   bool mTransactionIncomplete;
 
   bool mNeedsComposite;
   bool mIsFirstPaint;
   FocusTarget mFocusTarget;
 
- // When we're doing a transaction in order to draw to a non-default
- // target, the layers transaction is only performed in order to send
- // a PLayers:Update.  We save the original non-default target to
- // mTarget, and then perform the transaction. After the transaction ends,
- // we send a message to our remote side to capture the actual pixels
- // being drawn to the default target, and then copy those pixels
- // back to mTarget.
- RefPtr<gfxContext> mTarget;
+  // When we're doing a transaction in order to draw to a non-default
+  // target, the layers transaction is only performed in order to send
+  // a PLayers:Update.  We save the original non-default target to
+  // mTarget, and then perform the transaction. After the transaction ends,
+  // we send a message to our remote side to capture the actual pixels
+  // being drawn to the default target, and then copy those pixels
+  // back to mTarget.
+  RefPtr<gfxContext> mTarget;
 
   // See equivalent field in ClientLayerManager
   uint32_t mPaintSequenceNumber;
   // See equivalent field in ClientLayerManager
   APZTestData mApzTestData;
 
-  WebRenderCommandsBuilder mWebRenderCommandsBuilder;
+  WebRenderCommandBuilder mWebRenderCommandBuilder;
 };
 
 } // namespace layers
 } // namespace mozilla
 
 #endif /* GFX_WEBRENDERLAYERMANAGER_H */
--- a/layout/generic/nsBulletFrame.cpp
+++ b/layout/generic/nsBulletFrame.cpp
@@ -12,17 +12,16 @@
 #include "gfxPrefs.h"
 #include "gfxUtils.h"
 #include "mozilla/gfx/2D.h"
 #include "mozilla/gfx/PathHelpers.h"
 #include "mozilla/layers/LayersMessages.h"
 #include "mozilla/layers/StackingContextHelper.h"
 #include "mozilla/layers/WebRenderLayerManager.h"
 #include "mozilla/layers/WebRenderMessages.h"
-#include "mozilla/layers/WebRenderLayerManager.h"
 #include "mozilla/MathAlgorithms.h"
 #include "mozilla/Move.h"
 #include "nsCOMPtr.h"
 #include "nsFontMetrics.h"
 #include "nsGkAtoms.h"
 #include "nsGenericHTMLElement.h"
 #include "nsAttrValueInlines.h"
 #include "nsPresContext.h"