Bug 1324422 - initialize mPermitSubpixelAA for all tiles in DrawTargetTiled. r=sotaro
authorLee Salzman <lsalzman@mozilla.com>
Mon, 19 Dec 2016 21:12:07 -0500
changeset 326495 07bb0ca0c7044baaa87f217a4404435208a6db99
parent 326494 63a0646e036ebef6ba2521d83f52fadb9deb2512
child 326496 1413fa80263234c7a2cd24056d62509e2bd2e720
push id84970
push userlsalzman@mozilla.com
push dateTue, 20 Dec 2016 02:12:22 +0000
treeherdermozilla-inbound@07bb0ca0c704 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssotaro
bugs1324422
milestone53.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 1324422 - initialize mPermitSubpixelAA for all tiles in DrawTargetTiled. r=sotaro MozReview-Commit-ID: AM0OxyhLrzJ
gfx/2d/DrawTargetTiled.cpp
--- a/gfx/2d/DrawTargetTiled.cpp
+++ b/gfx/2d/DrawTargetTiled.cpp
@@ -25,33 +25,32 @@ DrawTargetTiled::Init(const TileSet& aTi
 
   mTiles.reserve(aTiles.mTileCount);
   for (size_t i = 0; i < aTiles.mTileCount; ++i) {
     mTiles.push_back(TileInternal(aTiles.mTiles[i]));
     if (!aTiles.mTiles[i].mDrawTarget) {
       return false;
     }
     if (mTiles[0].mDrawTarget->GetFormat() != mTiles.back().mDrawTarget->GetFormat() ||
-        mTiles[0].mDrawTarget->GetBackendType() != mTiles.back().mDrawTarget->GetBackendType() ||
-        mTiles[0].mDrawTarget->GetPermitSubpixelAA() != mTiles.back().mDrawTarget->GetPermitSubpixelAA()) {
+        mTiles[0].mDrawTarget->GetBackendType() != mTiles.back().mDrawTarget->GetBackendType()) {
       return false;
     }
     uint32_t newXMost = max(mRect.XMost(),
                             mTiles[i].mTileOrigin.x + mTiles[i].mDrawTarget->GetSize().width);
     uint32_t newYMost = max(mRect.YMost(),
                             mTiles[i].mTileOrigin.y + mTiles[i].mDrawTarget->GetSize().height);
     mRect.x = min(mRect.x, mTiles[i].mTileOrigin.x);
     mRect.y = min(mRect.y, mTiles[i].mTileOrigin.y);
     mRect.width = newXMost - mRect.x;
     mRect.height = newYMost - mRect.y;
     mTiles[i].mDrawTarget->SetTransform(Matrix::Translation(mTiles[i].mTileOrigin.x,
                                                             mTiles[i].mTileOrigin.y));
   }
   mFormat = mTiles[0].mDrawTarget->GetFormat();
-  mPermitSubpixelAA = mTiles[0].mDrawTarget->GetPermitSubpixelAA();
+  SetPermitSubpixelAA(IsOpaque(mFormat));
   return true;
 }
 
 already_AddRefed<SourceSurface>
 DrawTargetTiled::Snapshot()
 {
   return MakeAndAddRef<SnapshotTiled>(mTiles, mRect);
 }