Bug 962667 - Don't optimize quartz image surfaces if there is nothing to do, r=jrmuizel
authorMichael Wu <mwu@mozilla.com>
Fri, 31 Jan 2014 17:57:14 -0500
changeset 182492 977fb2494568352b1dd3f2cbde89b9cfd809a095
parent 182491 48a1442045d614641f8051e69dee016a9ec5cba3
child 182493 fc3d3be15c0ce1c237f4014379f5bfdbc93bc311
push id3343
push userffxbld
push dateMon, 17 Mar 2014 21:55:32 +0000
treeherdermozilla-beta@2f7d3415f79f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel
bugs962667
milestone29.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 962667 - Don't optimize quartz image surfaces if there is nothing to do, r=jrmuizel
gfx/thebes/gfxPlatformMac.cpp
--- a/gfx/thebes/gfxPlatformMac.cpp
+++ b/gfx/thebes/gfxPlatformMac.cpp
@@ -122,18 +122,17 @@ gfxPlatformMac::OptimizeImage(gfxImageSu
         isurf = new gfxImageSurface (surfaceSize, format);
         if (!isurf->CopyFrom (aSurface)) {
             // don't even bother doing anything more
             nsRefPtr<gfxASurface> ret = aSurface;
             return ret.forget();
         }
     }
 
-    nsRefPtr<gfxASurface> ret = new gfxQuartzImageSurface(isurf);
-    return ret.forget();
+    return nullptr;
 }
 
 TemporaryRef<ScaledFont>
 gfxPlatformMac::GetScaledFontForFont(DrawTarget* aTarget, gfxFont *aFont)
 {
     gfxMacFont *font = static_cast<gfxMacFont*>(aFont);
     return font->GetScaledFont(aTarget);
 }