Bug 1278723 - Don't use ssse3_scale_data on targets that don't support SSSE3 r=jrmuizel
authorGeorge Wright <george@mozilla.com>
Tue, 07 Jun 2016 20:46:38 -0400
changeset 300990 e568568aba003568ca946241af5b18c3c1037345
parent 300989 daecf88f04277b9f6fd6c948c1e01418140a6686
child 300991 e26bfa28a8826bac045ce8f6c7bb99f4da1bccf8
push id19599
push usercbook@mozilla.com
push dateWed, 08 Jun 2016 10:16:21 +0000
treeherderfx-team@81f4cc3f6f4c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel
bugs1278723
milestone50.0a1
Bug 1278723 - Don't use ssse3_scale_data on targets that don't support SSSE3 r=jrmuizel
gfx/layers/basic/BasicCompositor.cpp
--- a/gfx/layers/basic/BasicCompositor.cpp
+++ b/gfx/layers/basic/BasicCompositor.cpp
@@ -283,16 +283,17 @@ SetupMask(const EffectChain& aEffectChai
 static bool
 AttemptVideoScale(TextureSourceBasic* aSource, const SourceSurface* aSourceMask,
                        gfx::Float aOpacity, CompositionOp aBlendMode,
                        const TexturedEffect* aTexturedEffect,
                        const Matrix& aNewTransform, const gfx::Rect& aRect,
                        const gfx::Rect& aClipRect,
                        DrawTarget* aDest, const DrawTarget* aBuffer)
 {
+#ifdef MOZILLA_SSE_HAVE_CPUID_DETECTION
   if (!mozilla::supports_ssse3())
       return false;
   if (aNewTransform.IsTranslation()) // unscaled painting should take the regular path
       return false;
   if (aNewTransform.HasNonAxisAlignedTransform() || aNewTransform.HasNegativeScaling())
       return false;
   if (aSourceMask || aOpacity != 1.0f)
       return false;
@@ -337,19 +338,19 @@ AttemptVideoScale(TextureSourceBasic* aS
                      mapSrc.GetStride()/4,
                      ((uint32_t*)dstData) + fillRect.x + (dstStride / 4) * fillRect.y, dstRect.width, dstRect.height,
                      dstStride / 4,
                      offset.x, offset.y,
                      fillRect.width, fillRect.height);
 
     aDest->ReleaseBits(dstData);
     return true;
-  } else {
+  } else
+#endif // MOZILLA_SSE_HAVE_CPUID_DETECTION
     return false;
-  }
 }
 
 void
 BasicCompositor::DrawQuad(const gfx::Rect& aRect,
                           const gfx::IntRect& aClipRect,
                           const EffectChain &aEffectChain,
                           gfx::Float aOpacity,
                           const gfx::Matrix4x4& aTransform,