Bug 1213339 - Fix logic in WantsSmallTiles. r=nical
authorBill Gianopoulos <wgianopoulos@gmail.com>
Thu, 15 Oct 2015 21:01:42 -0400
changeset 303508 288eab800d679f6b3c8dc7357adfe11bcce777b8
parent 303507 69e01c8ae9d01c174c43082de66646588f8b9ead
child 303509 32b5ae598c63b9d7376fcad19fe2b0789b2eba22
push id1001
push userraliiev@mozilla.com
push dateMon, 18 Jan 2016 19:06:03 +0000
treeherdermozilla-release@8b89261f3ac4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnical
bugs1213339
milestone44.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 1213339 - Fix logic in WantsSmallTiles. r=nical
gfx/gl/GLTextureImage.cpp
--- a/gfx/gl/GLTextureImage.cpp
+++ b/gfx/gl/GLTextureImage.cpp
@@ -286,26 +286,26 @@ BasicTextureImage::BasicTextureImage(GLu
   , mTextureState(Created)
   , mGLContext(aContext)
   , mUpdateOffset(0, 0)
 {}
 
 static bool
 WantsSmallTiles(GLContext* gl)
 {
-    // We must use small tiles for good performance if we can't use
-    // glTexSubImage2D() for some reason.
-    if (!CanUploadSubTextures(gl))
-        return true;
-
     // We can't use small tiles on the SGX 540, because of races in texture upload.
     if (gl->WorkAroundDriverBugs() &&
         gl->Renderer() == GLRenderer::SGX540)
         return false;
 
+    // We should use small tiles for good performance if we can't use
+    // glTexSubImage2D() for some reason.
+    if (!CanUploadSubTextures(gl))
+        return true;
+
     // Don't use small tiles otherwise. (If we implement incremental texture upload,
     // then we will want to revisit this.)
     return false;
 }
 
 TiledTextureImage::TiledTextureImage(GLContext* aGL,
                                      gfx::IntSize aSize,
                                      TextureImage::ContentType aContentType,