Bug 928727 - Don't clear before drawing with OPERATOR_SOURCE in DrawTargetCairo, since we know all required pixels will be clear already. r=jrmuizel
authorMatt Woodrow <mwoodrow@mozilla.com>
Tue, 22 Oct 2013 12:11:30 +0200
changeset 151616 5a7016b24bf89eddf511b4893a8be3f6192814e1
parent 151615 a047800e4772a68f16a49b6df74c7ff54fc798f0
child 151617 f92a77d8ee8f1fac74673c4a7e210b5a3787e22a
push id35246
push usermwoodrow@mozilla.com
push dateTue, 22 Oct 2013 10:11:40 +0000
treeherdermozilla-inbound@5a7016b24bf8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel
bugs928727
milestone27.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 928727 - Don't clear before drawing with OPERATOR_SOURCE in DrawTargetCairo, since we know all required pixels will be clear already. r=jrmuizel
gfx/2d/DrawTargetCairo.cpp
--- a/gfx/2d/DrawTargetCairo.cpp
+++ b/gfx/2d/DrawTargetCairo.cpp
@@ -630,35 +630,32 @@ DrawTargetCairo::DrawPattern(const Patte
   cairo_set_source(mContext, pat);
 
   cairo_set_antialias(mContext, GfxAntialiasToCairoAntialias(aOptions.mAntialiasMode));
 
   if (NeedIntermediateSurface(aPattern, aOptions) ||
       (!IsOperatorBoundByMask(aOptions.mCompositionOp) && !aPathBoundsClip)) {
     cairo_push_group_with_content(mContext, CAIRO_CONTENT_COLOR_ALPHA);
 
-    ClearSurfaceForUnboundedSource(aOptions.mCompositionOp);
-
     // Don't want operators to be applied twice
     cairo_set_operator(mContext, CAIRO_OPERATOR_OVER);
 
     if (aDrawType == DRAW_STROKE) {
       SetCairoStrokeOptions(mContext, aStrokeOptions);
       cairo_stroke_preserve(mContext);
     } else {
       cairo_fill_preserve(mContext);
     }
 
     cairo_pop_group_to_source(mContext);
 
     // Now draw the content using the desired operator
     cairo_set_operator(mContext, GfxOpToCairoOp(aOptions.mCompositionOp));
     cairo_paint_with_alpha(mContext, aOptions.mAlpha);
   } else {
-    ClearSurfaceForUnboundedSource(aOptions.mCompositionOp);
     cairo_set_operator(mContext, GfxOpToCairoOp(aOptions.mCompositionOp));
 
     if (aDrawType == DRAW_STROKE) {
       SetCairoStrokeOptions(mContext, aStrokeOptions);
       cairo_stroke_preserve(mContext);
     } else {
       cairo_fill_preserve(mContext);
     }