Bug 871390 - Update WebGL canvases async, not 2D ones r=mattwoodrow
authorJames Willcox <snorp@snorp.net>
Tue, 14 May 2013 21:16:07 -0400
changeset 143439 d63027c3baa8caba04384b56d41293e61b1ebc1e
parent 143438 1be2d9024641e4272e6c155e115f0636139c6e9b
child 143440 8cec78f353926f62b9da00fe4e03c7af31b6e246
push id2697
push userbbajaj@mozilla.com
push dateMon, 05 Aug 2013 18:49:53 +0000
treeherdermozilla-beta@dfec938c7b63 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs871390
milestone24.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 871390 - Update WebGL canvases async, not 2D ones r=mattwoodrow
gfx/layers/client/CanvasClient.cpp
gfx/layers/client/CanvasClient.h
--- a/gfx/layers/client/CanvasClient.cpp
+++ b/gfx/layers/client/CanvasClient.cpp
@@ -63,17 +63,17 @@ CanvasClient2D::Update(gfx::IntSize aSiz
   mTextureClient->EnsureAllocated(aSize, contentType);
 
   gfxASurface* surface = mTextureClient->LockSurface();
   aLayer->UpdateSurface(surface);
   mTextureClient->Unlock();
 }
 
 void
-CanvasClient2D::Updated()
+CanvasClientWebGL::Updated()
 {
   mForwarder->UpdateTextureNoSwap(this, 1, mTextureClient->GetDescriptor());
 }
 
 
 CanvasClientWebGL::CanvasClientWebGL(CompositableForwarder* aFwd,
                                      TextureFlags aFlags)
 : CanvasClient(aFwd, aFlags)
--- a/gfx/layers/client/CanvasClient.h
+++ b/gfx/layers/client/CanvasClient.h
@@ -60,32 +60,31 @@ public:
                  TextureFlags aFlags);
 
   TextureInfo GetTextureInfo() const MOZ_OVERRIDE
   {
     return mTextureInfo;
   }
 
   virtual void Update(gfx::IntSize aSize, ClientCanvasLayer* aLayer);
-
-  virtual void Updated() MOZ_OVERRIDE;
 };
 
 // Used for GL canvases where we don't need to do any readback, i.e., with a
 // GL backend.
 class CanvasClientWebGL : public CanvasClient
 {
 public:
   CanvasClientWebGL(CompositableForwarder* aFwd,
                     TextureFlags aFlags);
 
   TextureInfo GetTextureInfo() const MOZ_OVERRIDE
   {
     return mTextureInfo;
   }
 
   virtual void Update(gfx::IntSize aSize, ClientCanvasLayer* aLayer);
+  virtual void Updated() MOZ_OVERRIDE;
 };
 
 }
 }
 
 #endif