Bug 934412 - Pass surface image format into CreateTextureImage r=nical
authorEdwin Flores <eflores@mozilla.com>
Wed, 11 Dec 2013 15:14:16 +0100
changeset 159911 c8d4a4361516211d2e725502d4a73d1ed6ac6356
parent 159910 7201bf07232e7b43aa5242166b4ba40daa69def2
child 159912 641ac2610a473e29f1e2ea2fa6b50d9b7b97e496
child 159947 fa872452b89dcda7c27b81296c063445bed408dc
push idunknown
push userunknown
push dateunknown
reviewersnical
bugs934412
milestone29.0a1
Bug 934412 - Pass surface image format into CreateTextureImage r=nical
gfx/layers/opengl/TextureHostOGL.cpp
--- a/gfx/layers/opengl/TextureHostOGL.cpp
+++ b/gfx/layers/opengl/TextureHostOGL.cpp
@@ -245,23 +245,25 @@ TextureImageTextureSourceOGL::Update(gfx
       // XXX - clarify which size we want to use. IncrementalContentHost will
       // require the size of the destination surface to be different from
       // the size of aSurface.
       // See bug 893300 (tracks the implementation of ContentHost for new textures).
       mTexImage = CreateTextureImage(mGL,
                                      size,
                                      gfx::ContentForFormat(aSurface->GetFormat()),
                                      WrapMode(mGL, aFlags & TEXTURE_ALLOW_REPEAT),
-                                     FlagsToGLFlags(aFlags));
+                                     FlagsToGLFlags(aFlags),
+                                     SurfaceFormatToImageFormat(aSurface->GetFormat()));
     } else {
       mTexImage = CreateBasicTextureImage(mGL,
                                           size,
                                           gfx::ContentForFormat(aSurface->GetFormat()),
                                           WrapMode(mGL, aFlags & TEXTURE_ALLOW_REPEAT),
-                                          FlagsToGLFlags(aFlags));
+                                          FlagsToGLFlags(aFlags),
+                                          SurfaceFormatToImageFormat(aSurface->GetFormat()));
     }
   }
 
   mTexImage->UpdateFromDataSource(aSurface, aDestRegion, aSrcOffset);
 
   if (mTexImage->InUpdate()) {
     mTexImage->EndUpdate();
   }