Bug 1348430 - Part 2. Rename a local variable in nsSVGPatternFrame::PaintPattern. r=mstange a=gchang
authorcku <cku@mozilla.com>
Tue, 21 Mar 2017 23:40:36 +0800
changeset 395369 da3f77e480c7e990ab08e9842610d220b75deab6
parent 395368 cfd92edead41beaf527208dd34527c1ee96830a4
child 395370 3a1d3f5cc5337803edd07fc3e84de476fc0a7c69
push id1468
push userasasaki@mozilla.com
push dateMon, 05 Jun 2017 19:31:07 +0000
treeherdermozilla-release@0641fc6ee9d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmstange, gchang
bugs1348430
milestone54.0a2
Bug 1348430 - Part 2. Rename a local variable in nsSVGPatternFrame::PaintPattern. r=mstange a=gchang MozReview-Commit-ID: FIWQOHsC5o5
layout/svg/nsSVGPatternFrame.cpp
--- a/layout/svg/nsSVGPatternFrame.cpp
+++ b/layout/svg/nsSVGPatternFrame.cpp
@@ -373,22 +373,22 @@ nsSVGPatternFrame::PaintPattern(const Dr
 
   RefPtr<DrawTarget> dt =
     aDrawTarget->CreateSimilarDrawTarget(surfaceSize, SurfaceFormat::B8G8R8A8);
   if (!dt || !dt->IsValid()) {
     return nullptr;
   }
   dt->ClearRect(Rect(0, 0, surfaceSize.width, surfaceSize.height));
 
-  RefPtr<gfxContext> gfx = gfxContext::CreateOrNull(dt);
-  MOZ_ASSERT(gfx); // already checked the draw target above
+  RefPtr<gfxContext> ctx = gfxContext::CreateOrNull(dt);
+  MOZ_ASSERT(ctx); // already checked the draw target above
 
   if (aGraphicOpacity != 1.0f) {
-    gfx->Save();
-    gfx->PushGroupForBlendBack(gfxContentType::COLOR_ALPHA, aGraphicOpacity);
+    ctx->Save();
+    ctx->PushGroupForBlendBack(gfxContentType::COLOR_ALPHA, aGraphicOpacity);
   }
 
   // OK, now render -- note that we use "firstKid", which
   // we got at the beginning because it takes care of the
   // referenced pattern situation for us
 
   if (aSource->IsFrameOfType(nsIFrame::eSVGGeometry)) {
     // Set the geometrical parent of the pattern we are rendering
@@ -406,29 +406,29 @@ nsSVGPatternFrame::PaintPattern(const Dr
       if (SVGFrame) {
         SVGFrame->NotifySVGChanged(nsISVGChildFrame::TRANSFORM_CHANGED);
       }
       gfxMatrix tm = *(patternWithChildren->mCTM);
       if (kid->GetContent()->IsSVGElement()) {
         tm = static_cast<nsSVGElement*>(kid->GetContent())->
                PrependLocalTransformsTo(tm, eUserSpaceToParent);
       }
-      DrawResult result = nsSVGUtils::PaintFrameWithEffects(kid, *gfx, tm);
+      DrawResult result = nsSVGUtils::PaintFrameWithEffects(kid, *ctx, tm);
       if (result != DrawResult::SUCCESS) {
         return nullptr;
       }
     }
     patternWithChildren->RemoveStateBits(NS_FRAME_DRAWING_AS_PAINTSERVER);
   }
 
   patternWithChildren->mSource = nullptr;
 
   if (aGraphicOpacity != 1.0f) {
-    gfx->PopGroupAndBlend();
-    gfx->Restore();
+    ctx->PopGroupAndBlend();
+    ctx->Restore();
   }
 
   // caller now owns the surface
   return dt->Snapshot();
 }
 
 /* Will probably need something like this... */
 // How do we handle the insertion of a new frame?