Bug 1437184. Inline FillAzure() r=bas
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Sat, 10 Feb 2018 10:54:54 -0500
changeset 403306 ccb72c7fa363a2153832845ff5dce5dd81302d55
parent 403305 9f354b89b323879bba4d959a23db58a01ba90f60
child 403307 3a69a5ec766f375e704d19fc9cb36019dd29b017
child 403317 e916c1a73ff54248d2ede3a0791af28aa83ee923
push id59431
push userjmuizelaar@mozilla.com
push dateSat, 10 Feb 2018 17:14:51 +0000
treeherderautoland@ccb72c7fa363 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbas
bugs1437184
milestone60.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 1437184. Inline FillAzure() r=bas There's only one caller so let's just eliminate inline FillAzure into Fill. MozReview-Commit-ID: JYpAQMkhEcS
gfx/thebes/gfxContext.cpp
gfx/thebes/gfxContext.h
--- a/gfx/thebes/gfxContext.cpp
+++ b/gfx/thebes/gfxContext.cpp
@@ -224,17 +224,34 @@ gfxContext::Fill()
 {
   Fill(PatternFromState(this));
 }
 
 void
 gfxContext::Fill(const Pattern& aPattern)
 {
   AUTO_PROFILER_LABEL("gfxContext::Fill", GRAPHICS);
-  FillAzure(aPattern, 1.0f);
+  AzureState &state = CurrentState();
+
+  CompositionOp op = GetOp();
+
+  if (mPathIsRect) {
+    MOZ_ASSERT(!mTransformChanged);
+
+    if (op == CompositionOp::OP_SOURCE) {
+      // Emulate cairo operator source which is bound by mask!
+      mDT->ClearRect(mRect);
+      mDT->FillRect(mRect, aPattern, DrawOptions(1.0f));
+    } else {
+      mDT->FillRect(mRect, aPattern, DrawOptions(1.0f, op, state.aaMode));
+    }
+  } else {
+    EnsurePath();
+    mDT->Fill(mPath, aPattern, DrawOptions(1.0f, op, state.aaMode));
+  }
 }
 
 void
 gfxContext::MoveTo(const gfxPoint& pt)
 {
   EnsurePathBuilder();
   mPathBuilder->MoveTo(ToPoint(pt));
 }
@@ -884,39 +901,16 @@ gfxContext::EnsurePathBuilder()
       gfxCriticalError() << "gfxContext::EnsurePathBuilder failed in PathBuilder::Finish";
     }
     mPathBuilder = path->TransformedCopyToBuilder(toNewUS);
   }
 
   mPathIsRect = false;
 }
 
-void
-gfxContext::FillAzure(const Pattern& aPattern, Float aOpacity)
-{
-  AzureState &state = CurrentState();
-
-  CompositionOp op = GetOp();
-
-  if (mPathIsRect) {
-    MOZ_ASSERT(!mTransformChanged);
-
-    if (op == CompositionOp::OP_SOURCE) {
-      // Emulate cairo operator source which is bound by mask!
-      mDT->ClearRect(mRect);
-      mDT->FillRect(mRect, aPattern, DrawOptions(aOpacity));
-    } else {
-      mDT->FillRect(mRect, aPattern, DrawOptions(aOpacity, op, state.aaMode));
-    }
-  } else {
-    EnsurePath();
-    mDT->Fill(mPath, aPattern, DrawOptions(aOpacity, op, state.aaMode));
-  }
-}
-
 CompositionOp
 gfxContext::GetOp()
 {
   if (CurrentState().op != CompositionOp::OP_SOURCE) {
     return CurrentState().op;
   }
 
   AzureState &state = CurrentState();
--- a/gfx/thebes/gfxContext.h
+++ b/gfx/thebes/gfxContext.h
@@ -500,17 +500,16 @@ private:
     bool mContentChanged;
 #endif
   };
 
   // This ensures mPath contains a valid path (in user space!)
   void EnsurePath();
   // This ensures mPathBuilder contains a valid PathBuilder (in user space!)
   void EnsurePathBuilder();
-  void FillAzure(const Pattern& aPattern, mozilla::gfx::Float aOpacity);
   CompositionOp GetOp();
   void ChangeTransform(const mozilla::gfx::Matrix &aNewMatrix, bool aUpdatePatternTransform = true);
   Rect GetAzureDeviceSpaceClipBounds() const;
   Matrix GetDeviceTransform() const;
   Matrix GetDTTransform() const;
 
   bool mPathIsRect;
   bool mTransformChanged;