Bug 1103135: Fix CompositorBench code to build again. r=benwa
authorBas Schouten <bschouten@mozilla.com>
Mon, 24 Nov 2014 19:44:51 +0000
changeset 241572 017788319d00d50e94e88dcaaafb3263d3412252
parent 241571 49ec38b3777bdea5479f9a9ce5b46c90f0c7dc75
child 241573 2b63fa9da2010fc86e3d0024bff779091a7e9633
push id4311
push userraliiev@mozilla.com
push dateMon, 12 Jan 2015 19:37:41 +0000
treeherdermozilla-beta@150c9fed433b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbenwa
bugs1103135
milestone36.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 1103135: Fix CompositorBench code to build again. r=benwa
gfx/layers/ipc/CompositorBench.cpp
--- a/gfx/layers/ipc/CompositorBench.cpp
+++ b/gfx/layers/ipc/CompositorBench.cpp
@@ -76,17 +76,17 @@ DrawFrameStressQuad(Compositor* aComposi
                                       aScreenRect.height * SimplePseudoRandom(i, 1),
                                       aScreenRect.width * SimplePseudoRandom(i, 2),
                                       aScreenRect.height * SimplePseudoRandom(i, 3));
     const gfx::Rect& clipRect = aScreenRect;
 
     float opacity = 1.f;
 
     gfx::Matrix transform2d;
-    transform2d = transform2d.Rotate(SimplePseudoRandom(i, 4) * 70.f);
+    transform2d = transform2d.PreRotate(SimplePseudoRandom(i, 4) * 70.f);
 
     gfx::Matrix4x4 transform = gfx::Matrix4x4::From2D(transform2d);
 
     aCompositor->DrawQuad(rect, clipRect, effects, opacity, transform);
   }
 }
 
 class EffectSolidColorBench : public BenchTest {
@@ -236,17 +236,17 @@ public:
 
   virtual void Teardown(Compositor* aCompositor) {
     mSurface = nullptr;
     mTexture = nullptr;
     free(mBuf);
   }
 
   TemporaryRef<Effect> CreateEffect(size_t i) {
-    RefPtr<TexturedEffect> effect = CreateTexturedEffect(SurfaceFormat::B8G8R8A8, mTexture, Filter::POINT);
+    RefPtr<TexturedEffect> effect = CreateTexturedEffect(SurfaceFormat::B8G8R8A8, mTexture, Filter::POINT, true);
     return effect;
   }
 };
 
 class StressTexturedQuadBench : public BenchTest {
 public:
   StressTexturedQuadBench()
     : BenchTest("Stress Textured Quad (10s 256x256 quads)")
@@ -280,17 +280,17 @@ public:
 
   virtual void Teardown(Compositor* aCompositor) {
     mSurface = nullptr;
     mTexture = nullptr;
     free(mBuf);
   }
 
   virtual TemporaryRef<Effect> CreateEffect(size_t i) {
-    RefPtr<TexturedEffect> effect = CreateTexturedEffect(SurfaceFormat::B8G8R8A8, mTexture, Filter::POINT);
+    RefPtr<TexturedEffect> effect = CreateTexturedEffect(SurfaceFormat::B8G8R8A8, mTexture, Filter::POINT, true);
     return effect;
   }
 };
 
 #ifdef MOZ_WIDGET_GONK
 class TrivialGrallocQuadBench : public BenchTest {
 public:
   TrivialGrallocQuadBench()
@@ -400,17 +400,17 @@ static void RunCompositorBench(Composito
       test->Setup(aCompositor, j);
 
       TimeStamp start = TimeStamp::Now();
       nsIntRect screenRect(aScreenRect.x, aScreenRect.y,
                            aScreenRect.width, aScreenRect.height);
       aCompositor->BeginFrame(
         nsIntRect(screenRect.x, screenRect.y,
                   screenRect.width, screenRect.height),
-        nullptr, gfx::Matrix(), aScreenRect);
+        nullptr, aScreenRect, nullptr, nullptr);
 
       test->DrawFrame(aCompositor, aScreenRect, j);
 
       aCompositor->EndFrame();
       results.push_back(TimeStamp::Now() - start);
 
       if (results[j].ToMilliseconds() > DURATION_THRESHOLD) {
         testsOverThreshold++;