Bug 669851 - Use bilinear image scaling on all ARM devices, even without NEON [r=mbrubeck,jmuizelaar, a=LegNeato]
authorMatt Brubeck <mbrubeck@mozilla.com>
Tue, 02 Aug 2011 19:57:42 -0700
changeset 72749 bbcb26987398261ba36ec7fee14dc989ac934986
parent 72748 62b90a0b9d4d9be52761e65a12e07b4b98b8fc2d
child 72750 b8f899c4dd9e9918b42c1f8772f82e7ae9f3949c
push id286
push usermbrubeck@mozilla.com
push dateThu, 04 Aug 2011 22:24:00 +0000
treeherdermozilla-aurora@bbcb26987398 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmbrubeck, jmuizelaar, LegNeato
bugs669851
milestone7.0a2
Bug 669851 - Use bilinear image scaling on all ARM devices, even without NEON [r=mbrubeck,jmuizelaar, a=LegNeato]
gfx/tests/reftest/reftest.list
gfx/thebes/gfxDrawable.cpp
layout/base/nsLayoutUtils.cpp
layout/reftests/backgrounds/reftest.list
--- a/gfx/tests/reftest/reftest.list
+++ b/gfx/tests/reftest/reftest.list
@@ -1,3 +1,3 @@
 # 468496-1 will also detect bugs in video drivers.
-fails-if(/Mac\x20OS\x20X\x2010\.5/.test(http.oscpu)) fails-if(Android) == 468496-1.html 468496-1-ref.html # bug 486761, 660740
+fails-if(/Mac\x20OS\x20X\x2010\.5/.test(http.oscpu)) == 468496-1.html 468496-1-ref.html # bug 486761, 660740
 == 611498-1.html 611498-ref.html
--- a/gfx/thebes/gfxDrawable.cpp
+++ b/gfx/thebes/gfxDrawable.cpp
@@ -153,21 +153,16 @@ gfxSurfaceDrawable::Draw(gfxContext* aCo
           filter = gfxPattern::FILTER_FAST;
         }
         nsRefPtr<gfxASurface> currentTarget = aContext->CurrentSurface();
         gfxMatrix deviceSpaceToImageSpace =
             DeviceToImageTransform(aContext, aTransform);
         PreparePatternForUntiledDrawing(pattern, deviceSpaceToImageSpace,
                                         currentTarget, filter);
     }
-#ifdef MOZ_GFX_OPTIMIZE_MOBILE
-    if (!mozilla::supports_neon()) {
-        pattern->SetFilter(gfxPattern::FILTER_FAST);
-    }
-#endif
     pattern->SetMatrix(gfxMatrix(aTransform).Multiply(mTransform));
     aContext->NewPath();
     aContext->SetPattern(pattern);
     aContext->Rectangle(aFillRect);
     aContext->Fill();
     return PR_TRUE;
 }
 
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -3164,21 +3164,16 @@ nsLayoutUtils::GetClosestLayer(nsIFrame*
     return layer;
   return aFrame->PresContext()->PresShell()->FrameManager()->GetRootFrame();
 }
 
 GraphicsFilter
 nsLayoutUtils::GetGraphicsFilterForFrame(nsIFrame* aForFrame)
 {
   GraphicsFilter defaultFilter = gfxPattern::FILTER_GOOD;
-#ifdef MOZ_GFX_OPTIMIZE_MOBILE
-  if (!mozilla::supports_neon()) {
-    defaultFilter = gfxPattern::FILTER_NEAREST;
-  }
-#endif
   nsIFrame *frame = nsCSSRendering::IsCanvasFrame(aForFrame) ?
     nsCSSRendering::FindBackgroundStyleFrame(aForFrame) : aForFrame;
 
   switch (frame->GetStyleSVG()->mImageRendering) {
   case NS_STYLE_IMAGE_RENDERING_OPTIMIZESPEED:
     return gfxPattern::FILTER_FAST;
   case NS_STYLE_IMAGE_RENDERING_OPTIMIZEQUALITY:
     return gfxPattern::FILTER_BEST;
--- a/layout/reftests/backgrounds/reftest.list
+++ b/layout/reftests/backgrounds/reftest.list
@@ -94,17 +94,17 @@ fails-if(Android) == viewport-translucen
 == background-size-monster-px.html background-size-monster-ref.html
 == background-size-monster-rem.html background-size-monster-ref.html
 
 # There seems to be a pixel-snapping problem here, where the repeated background
 # image isn't being snapped at its boundaries.  Note that the boundaries within
 # the image aren't the issue, because they're being obscured to avoid sampling
 # algorithm dependencies (at least assuming the sampling algorithm in use
 # doesn't sample too far astray from the boundaries).
-fails-if(!Android) == background-size-zoom-repeat.html background-size-zoom-repeat-ref.html
+fails == background-size-zoom-repeat.html background-size-zoom-repeat-ref.html
 
 # background-size affects images without intrinsic dimensions specially; we may
 # not support such image formats right now, but when we do, we want
 # background-size to be changed accordingly, and hopefully these tests should
 # start failing when we do.
 fails == background-size-no-intrinsic-width-image.html background-size-no-intrinsic-width-image-ref.html
 fails == background-size-no-intrinsic-height-image.html background-size-no-intrinsic-height-image-ref.html