Bug 991575 - Use a DrawTarget backed gfxContext for the PresShell reference rendering context. r=jwatt
authorMatt Woodrow <mwoodrow@mozilla.com>
Mon, 12 May 2014 12:31:28 +1200
changeset 182537 d1f0df851145296431603bef867bf4e826273918
parent 182536 ab35e36bf2b5a47ac39111817fbd648ee162fa1a
child 182538 02eb695c8640d0526df1c63ed50ca79a59118431
push id26764
push usercbook@mozilla.com
push dateMon, 12 May 2014 11:35:17 +0000
treeherdermozilla-central@a64ed5aba131 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwatt
bugs991575
milestone32.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 991575 - Use a DrawTarget backed gfxContext for the PresShell reference rendering context. r=jwatt
gfx/thebes/gfxContext.cpp
layout/base/nsPresShell.cpp
--- a/gfx/thebes/gfxContext.cpp
+++ b/gfx/thebes/gfxContext.cpp
@@ -2298,17 +2298,17 @@ gfxContext::PushNewDT(gfxContentType con
 void
 gfxContext::GetRoundOffsetsToPixels(bool *aRoundX, bool *aRoundY)
 {
     *aRoundX = false;
     // Could do something fancy here for ScaleFactors of
     // AxisAlignedTransforms, but we leave things simple.
     // Not much point rounding if a matrix will mess things up anyway.
     // Also return false for non-cairo contexts.
-    if (CurrentMatrix().HasNonTranslation() || mDT) {
+    if (CurrentMatrix().HasNonTranslation()) {
         *aRoundY = false;
         return;
     }
 
     // All raster backends snap glyphs to pixels vertically.
     // Print backends set CAIRO_HINT_METRICS_OFF.
     *aRoundY = true;
 
--- a/layout/base/nsPresShell.cpp
+++ b/layout/base/nsPresShell.cpp
@@ -2903,17 +2903,17 @@ PresShell::ClearFrameRefs(nsIFrame* aFra
 
 already_AddRefed<nsRenderingContext>
 PresShell::CreateReferenceRenderingContext()
 {
   nsDeviceContext* devCtx = mPresContext->DeviceContext();
   nsRefPtr<nsRenderingContext> rc;
   if (mPresContext->IsScreen()) {
     rc = new nsRenderingContext();
-    rc->Init(devCtx, gfxPlatform::GetPlatform()->ScreenReferenceSurface());
+    rc->Init(devCtx, gfxPlatform::GetPlatform()->ScreenReferenceDrawTarget());
   } else {
     rc = devCtx->CreateRenderingContext();
   }
 
   MOZ_ASSERT(rc, "shouldn't break promise to return non-null");
   return rc.forget();
 }