Bug 669851 - Use bilinear image scaling on all ARM devices, even without NEON [r=mbrubeck,jmuizelaar]
authorChris Lord <chrislord.net@gmail.com>
Thu, 07 Jul 2011 03:08:00 -0700
changeset 73726 a5932b9082826bfa120da02bf904e1fecae35327
parent 73725 d722773c9c636a78828da3cb74cc7e2f6c4c32ef
child 73727 4bf9b8abb862aa94a962b9fe6c6a7d5ebb6b2630
push id2
push userbsmedberg@mozilla.com
push dateFri, 19 Aug 2011 14:38:13 +0000
reviewersmbrubeck, jmuizelaar
bugs669851
milestone8.0a1
Bug 669851 - Use bilinear image scaling on all ARM devices, even without NEON [r=mbrubeck,jmuizelaar]
gfx/thebes/gfxDrawable.cpp
layout/base/nsLayoutUtils.cpp
--- 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
@@ -3155,21 +3155,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;