Bug 934412 - Pass surface image format into CreateTextureImage r=nical a=lsblakk
authorEdwin Flores <eflores@mozilla.com>
Mon, 16 Dec 2013 11:00:36 +1300
changeset 175281 df7a620de2180fdfa085b2ba8152938fb1f3bc64
parent 175280 9c6523e9fb5c3b9cd41a087cee335488e916624b
child 175282 6af6c1e0d9648f3d6ec5d20c4e65a33e6082c88f
push id445
push userffxbld
push dateMon, 10 Mar 2014 22:05:19 +0000
treeherdermozilla-release@dc38b741b04e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnical, lsblakk
bugs934412
milestone28.0a2
Bug 934412 - Pass surface image format into CreateTextureImage r=nical a=lsblakk
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();
   }