Don't do TexImage2D+TexSubImage2D
authorBenoit Girard <b56girard@gmail.com>
Tue, 21 Feb 2012 16:44:59 -0500
changeset 89207 0c53bf892a3c738749a7b655e915f4ff3795059b
parent 89206 40b477c54da38dd3bd36846658aba222f5839905
child 89208 5d79b5d33ce18d243e30cb35e07bc385378fc507
push id22242
push userkgupta@mozilla.com
push dateWed, 14 Mar 2012 15:19:09 +0000
treeherdermozilla-central@936ef50fa498 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone13.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
Don't do TexImage2D+TexSubImage2D
mobile/android/base/gfx/TileLayer.java
--- a/mobile/android/base/gfx/TileLayer.java
+++ b/mobile/android/base/gfx/TileLayer.java
@@ -196,27 +196,19 @@ public abstract class TileLayer extends 
         Rect bufferRect = new Rect(0, 0, bufferSize.width, bufferSize.height);
 
         int cairoFormat = mImage.getFormat();
         CairoGLInfo glInfo = new CairoGLInfo(cairoFormat);
 
         bindAndSetGLParameters();
 
         if (newlyCreated || dirtyRect.contains(bufferRect)) {
-            if (mSize.equals(bufferSize)) {
-                GLES20.glTexImage2D(GLES20.GL_TEXTURE_2D, 0, glInfo.internalFormat, mSize.width,
-                                    mSize.height, 0, glInfo.format, glInfo.type, imageBuffer);
-                return;
-            } else {
-                GLES20.glTexImage2D(GLES20.GL_TEXTURE_2D, 0, glInfo.internalFormat, mSize.width,
-                                    mSize.height, 0, glInfo.format, glInfo.type, null);
-                GLES20.glTexSubImage2D(GLES20.GL_TEXTURE_2D, 0, 0, 0, bufferSize.width,
-                                       bufferSize.height, glInfo.format, glInfo.type, imageBuffer);
-                return;
-            }
+            GLES20.glTexImage2D(GLES20.GL_TEXTURE_2D, 0, glInfo.internalFormat, mSize.width,
+                                mSize.height, 0, glInfo.format, glInfo.type, imageBuffer);
+            return;
         }
 
         // Make sure that the dirty region intersects with the buffer rect,
         // otherwise we'll end up with an invalid buffer pointer.
         if (!Rect.intersects(dirtyRect, bufferRect)) {
             return;
         }