Loading gallerycommon/src/com/android/gallery3d/common/Utils.java +1 −1 Original line number Diff line number Diff line Loading @@ -76,7 +76,7 @@ public class Utils { // Throws IllegalArgumentException if the input is <= 0 or // the answer overflows. public static int nextPowerOf2(int n) { if (n <= 0 || n > (1 << 30)) throw new IllegalArgumentException(); if (n <= 0 || n > (1 << 30)) throw new IllegalArgumentException("n is invalid: " + n); n -= 1; n |= n >> 16; n |= n >> 8; Loading src/com/android/gallery3d/ui/SurfaceTextureScreenNail.java +3 −0 Original line number Diff line number Diff line Loading @@ -109,6 +109,7 @@ public abstract class SurfaceTextureScreenNail implements ScreenNail, canvas.translate(cx, cy); canvas.scale(1, -1, 1); canvas.translate(-cx, -cy); updateTransformMatrix(mTransform); canvas.drawTexture(mExtTexture, mTransform, x, y, width, height); canvas.restore(); } Loading @@ -119,6 +120,8 @@ public abstract class SurfaceTextureScreenNail implements ScreenNail, throw new UnsupportedOperationException(); } protected void updateTransformMatrix(float[] matrix) {} @Override abstract public void noDraw(); Loading Loading
gallerycommon/src/com/android/gallery3d/common/Utils.java +1 −1 Original line number Diff line number Diff line Loading @@ -76,7 +76,7 @@ public class Utils { // Throws IllegalArgumentException if the input is <= 0 or // the answer overflows. public static int nextPowerOf2(int n) { if (n <= 0 || n > (1 << 30)) throw new IllegalArgumentException(); if (n <= 0 || n > (1 << 30)) throw new IllegalArgumentException("n is invalid: " + n); n -= 1; n |= n >> 16; n |= n >> 8; Loading
src/com/android/gallery3d/ui/SurfaceTextureScreenNail.java +3 −0 Original line number Diff line number Diff line Loading @@ -109,6 +109,7 @@ public abstract class SurfaceTextureScreenNail implements ScreenNail, canvas.translate(cx, cy); canvas.scale(1, -1, 1); canvas.translate(-cx, -cy); updateTransformMatrix(mTransform); canvas.drawTexture(mExtTexture, mTransform, x, y, width, height); canvas.restore(); } Loading @@ -119,6 +120,8 @@ public abstract class SurfaceTextureScreenNail implements ScreenNail, throw new UnsupportedOperationException(); } protected void updateTransformMatrix(float[] matrix) {} @Override abstract public void noDraw(); Loading