Bug 1218395 - Avoid calling AddFlags from SharedSurfaceTextureClient constructor. r=milan, a=lizzard
authorJamie Nicol <jnicol@mozilla.com>
Wed, 28 Oct 2015 11:57:55 +1300
changeset 298304 9470fd1a1c8952f9d949715f2be3e3262762e536
parent 298303 bf0aacb5affa91f9554cb01ebfa31a6e8806b9c8
child 298305 43ce269258729c019e8e7cbc79340f1b8b763199
push id962
push userjlund@mozilla.com
push dateFri, 04 Dec 2015 23:28:54 +0000
treeherdermozilla-release@23a2d286e80f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmilan, lizzard
bugs1218395
milestone43.0a2
Bug 1218395 - Avoid calling AddFlags from SharedSurfaceTextureClient constructor. r=milan, a=lizzard Instead pass the flags to the parent constructor.
gfx/layers/client/TextureClientSharedSurface.cpp
--- a/gfx/layers/client/TextureClientSharedSurface.cpp
+++ b/gfx/layers/client/TextureClientSharedSurface.cpp
@@ -15,20 +15,20 @@
 
 namespace mozilla {
 namespace layers {
 
 SharedSurfaceTextureClient::SharedSurfaceTextureClient(ISurfaceAllocator* aAllocator,
                                                        TextureFlags aFlags,
                                                        UniquePtr<gl::SharedSurface> surf,
                                                        gl::SurfaceFactory* factory)
-  : TextureClient(aAllocator, aFlags | TextureFlags::RECYCLE)
+  : TextureClient(aAllocator,
+                  aFlags | TextureFlags::RECYCLE | surf->GetTextureFlags())
   , mSurf(Move(surf))
 {
-  AddFlags(mSurf->GetTextureFlags());
 }
 
 SharedSurfaceTextureClient::~SharedSurfaceTextureClient()
 {
   // Free the ShSurf implicitly.
 }
 
 gfx::IntSize