Bug 1272859: Debug patch. To enable mask-as-shorthand draft
authorcku <cku@mozilla.com>
Tue, 24 May 2016 18:17:57 +0800
changeset 370990 e3c2c02e9ce9c26df61245f253f4b847246eebda
parent 370989 4c6b03ccacd9434c6955bfca1ef7ed4a866ff530
child 521876 b752b9724e49256228425e294e5fda41ce2de715
push id19195
push usercku@mozilla.com
push dateWed, 25 May 2016 18:06:13 +0000
bugs1272859
milestone49.0a1
Bug 1272859: Debug patch. To enable mask-as-shorthand MozReview-Commit-ID: 2P9p8dpJpS6
layout/svg/nsSVGIntegrationUtils.cpp
old-configure.in
--- a/layout/svg/nsSVGIntegrationUtils.cpp
+++ b/layout/svg/nsSVGIntegrationUtils.cpp
@@ -509,21 +509,18 @@ GenerateMaskSurface(const nsSVGIntegrati
                            maskSurfacePosition, maskSurfaceSize)) {
     return;
   }
 
   // Mask composition result on CoreGraphic::A8 surface is not correct
   // when mask-mode is not add(source over). Switch to skia when CG backend
   // detected.
   RefPtr<DrawTarget> maskDT =
-    (ctx.GetDrawTarget()->GetBackendType() == BackendType::COREGRAPHICS)
-    ? Factory::CreateDrawTarget(BackendType::SKIA, maskSurfaceSize,
-                                SurfaceFormat::A8)
-    : ctx.GetDrawTarget()->CreateSimilarDrawTarget(maskSurfaceSize,
-                                                   SurfaceFormat::A8);
+    Factory::CreateDrawTarget(BackendType::CAIRO, maskSurfaceSize,
+                              SurfaceFormat::A8);
   RefPtr<gfxContext> maskContext = gfxContext::ForDrawTarget(maskDT);
 
   // Set ctx's matrix on maskContext, offset by the maskSurfaceRect's position.
   // This makes sure that we combine the masks in device space.
   gfxMatrix maskSurfaceMatrix =
     ctx.CurrentMatrix() * gfxMatrix::Translation(-maskSurfacePosition);
   maskContext->SetMatrix(maskSurfaceMatrix);
 
--- a/old-configure.in
+++ b/old-configure.in
@@ -7091,17 +7091,17 @@ if test "$MOZ_WIDGET_TOOLKIT" = "cocoa";
 fi
 
 MOZ_CONFIG_ICU()
 
 dnl ========================================================
 dnl mask as short hand property
 dnl ========================================================
 dnl Uncommenting the next line would enable mask-as-shorthand feature.
-dnl MOZ_ENABLE_MASK_AS_SHORTHAND=1
+MOZ_ENABLE_MASK_AS_SHORTHAND=1
 if test "$MOZ_ENABLE_MASK_AS_SHORTHAND"; then
   AC_DEFINE(MOZ_ENABLE_MASK_AS_SHORTHAND)
 fi
 AC_SUBST(MOZ_ENABLE_MASK_AS_SHORTHAND)
 
 # Avoid using obsolete NSPR features
 AC_DEFINE(NO_NSPR_10_SUPPORT)