Upgrade image library to 0.1.5
This commit is contained in:
1 parent
2dca63b342
commit
a0f1e97332
4 files changed
+13
-3
No files matched your search
@@ -173,7 +173,15 @@ public class ImageTexture implements Texture, Animatable {
|
||||
@Override
|
||||
protected void texImage(boolean init) {
|
||||
if (image != null && !image.isRecycled()) {
|
||||
image.texImage(init, mTileType, offsetX, offsetY);
|
||||
int w, h;
|
||||
if (init) {
|
||||
w = mTextureWidth;
|
||||
h = mTextureHeight;
|
||||
} else {
|
||||
w = mWidth;
|
||||
h = mHeight;
|
||||
}
|
||||
image.texImage(init, offsetX - borderSize, offsetY - borderSize, w, h);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -54,6 +54,7 @@ public abstract class NativeTexture extends BasicTexture {
|
||||
GLES20.glBindTexture(getTarget(), mId);
|
||||
checkError();
|
||||
texImage(true);
|
||||
checkError();
|
||||
|
||||
setAssociatedCanvas(canvas);
|
||||
mState = STATE_LOADED;
|
||||
@@ -68,6 +69,7 @@ public abstract class NativeTexture extends BasicTexture {
|
||||
GLES20.glBindTexture(getTarget(), mId);
|
||||
checkError();
|
||||
texImage(false);
|
||||
checkError();
|
||||
mContentValid = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -173,7 +173,7 @@ public class GLRootView extends GLSurfaceView
|
||||
long t = System.nanoTime();
|
||||
long duration = (t - t0) / 1000000;
|
||||
|
||||
if (duration > 34) {
|
||||
if (duration > 8) {
|
||||
Log.v(TAG, "--- " + duration + " ---");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user