Bug 973976 - Remove redundant work in CopyableCanvasLayer. r=jrmuizel
authorTor Arvid Lund <torarvid@comoyo.com>
Mon, 17 Mar 2014 10:49:04 -0400
changeset 192146 b1e0e1576f3824381e2f26a88f56d66c6406c71b
parent 192145 c2b5b91bcbac59544661c15977c13832dfd3c685
child 192147 c737dc096ba0aaa6408686eb8fe9264fbaf10954
push id474
push userasasaki@mozilla.com
push dateMon, 02 Jun 2014 21:01:02 +0000
treeherdermozilla-release@967f4cf1b31c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel
bugs973976
milestone30.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 973976 - Remove redundant work in CopyableCanvasLayer. r=jrmuizel This operator was already initialized to OP_SOURCE, so no need to do it again.
gfx/layers/CopyableCanvasLayer.cpp
--- a/gfx/layers/CopyableCanvasLayer.cpp
+++ b/gfx/layers/CopyableCanvasLayer.cpp
@@ -281,23 +281,16 @@ CopyableCanvasLayer::PaintWithOpacity(gf
     Matrix flipped = oldTransform;
     flipped.Translate(0, mBounds.height);
     flipped.Scale(1.0, -1.0);
     aTarget->SetTransform(flipped);
   }
 
   DrawOptions options = DrawOptions(aOpacity, CompositionOp::OP_SOURCE);
 
-  // If content opaque, then save off current operator and set to source.
-  // This ensures that alpha is not applied even if the source surface
-  // has an alpha channel
-  if (GetContentFlags() & CONTENT_OPAQUE) {
-    options.mCompositionOp = CompositionOp::OP_SOURCE;
-  }
-
   if (aOperator != CompositionOp::OP_OVER) {
     options.mCompositionOp = aOperator;
   }
 
   Rect rect = Rect(0, 0, mBounds.width, mBounds.height);
   aTarget->FillRect(rect, pat, options);
   if (aMaskSurface) {
     aTarget->MaskSurface(pat, aMaskSurface, Point(0, 0), options);