Loading packages/WallpaperCropper/src/com/android/gallery3d/glrenderer/BitmapTexture.java +3 −3 Original line number Diff line number Diff line Loading @@ -18,6 +18,8 @@ package com.android.gallery3d.glrenderer; import android.graphics.Bitmap; import com.android.gallery3d.common.Utils; // BitmapTexture is a texture whose content is specified by a fixed Bitmap. // // The texture does not own the Bitmap. The user should make sure the Bitmap Loading @@ -32,9 +34,7 @@ public class BitmapTexture extends UploadedTexture { public BitmapTexture(Bitmap bitmap, boolean hasBorder) { super(hasBorder); if (bitmap == null || bitmap.isRecycled()) { throw new AssertionError(); } Utils.assertTrue(bitmap != null && !bitmap.isRecycled()); mContentBitmap = bitmap; } Loading packages/WallpaperCropper/src/com/android/gallery3d/glrenderer/GLPaint.java +3 −3 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ package com.android.gallery3d.glrenderer; import com.android.gallery3d.common.Utils; public class GLPaint { private float mLineWidth = 1f; private int mColor = 0; Loading @@ -29,9 +31,7 @@ public class GLPaint { } public void setLineWidth(float width) { if (width < 0) { throw new AssertionError(); } Utils.assertTrue(width >= 0); mLineWidth = width; } Loading packages/WallpaperCropper/src/com/android/gallery3d/glrenderer/UploadedTexture.java +4 −6 Original line number Diff line number Diff line Loading @@ -20,6 +20,8 @@ import android.graphics.Bitmap; import android.graphics.Bitmap.Config; import android.opengl.GLUtils; import com.android.gallery3d.common.Utils; import java.util.HashMap; import javax.microedition.khronos.opengles.GL11; Loading Loading @@ -142,9 +144,7 @@ public abstract class UploadedTexture extends BasicTexture { } private void freeBitmap() { if (mBitmap == null) { throw new AssertionError(); } Utils.assertTrue(mBitmap != null); onFreeBitmap(mBitmap); mBitmap = null; } Loading Loading @@ -219,9 +219,7 @@ public abstract class UploadedTexture extends BasicTexture { int texWidth = getTextureWidth(); int texHeight = getTextureHeight(); if (bWidth > texWidth || bHeight > texHeight) { throw new AssertionError(); } Utils.assertTrue(bWidth <= texWidth && bHeight <= texHeight); // Upload the bitmap to a new texture. mId = canvas.getGLId().generateTexture(); Loading Loading
packages/WallpaperCropper/src/com/android/gallery3d/glrenderer/BitmapTexture.java +3 −3 Original line number Diff line number Diff line Loading @@ -18,6 +18,8 @@ package com.android.gallery3d.glrenderer; import android.graphics.Bitmap; import com.android.gallery3d.common.Utils; // BitmapTexture is a texture whose content is specified by a fixed Bitmap. // // The texture does not own the Bitmap. The user should make sure the Bitmap Loading @@ -32,9 +34,7 @@ public class BitmapTexture extends UploadedTexture { public BitmapTexture(Bitmap bitmap, boolean hasBorder) { super(hasBorder); if (bitmap == null || bitmap.isRecycled()) { throw new AssertionError(); } Utils.assertTrue(bitmap != null && !bitmap.isRecycled()); mContentBitmap = bitmap; } Loading
packages/WallpaperCropper/src/com/android/gallery3d/glrenderer/GLPaint.java +3 −3 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ package com.android.gallery3d.glrenderer; import com.android.gallery3d.common.Utils; public class GLPaint { private float mLineWidth = 1f; private int mColor = 0; Loading @@ -29,9 +31,7 @@ public class GLPaint { } public void setLineWidth(float width) { if (width < 0) { throw new AssertionError(); } Utils.assertTrue(width >= 0); mLineWidth = width; } Loading
packages/WallpaperCropper/src/com/android/gallery3d/glrenderer/UploadedTexture.java +4 −6 Original line number Diff line number Diff line Loading @@ -20,6 +20,8 @@ import android.graphics.Bitmap; import android.graphics.Bitmap.Config; import android.opengl.GLUtils; import com.android.gallery3d.common.Utils; import java.util.HashMap; import javax.microedition.khronos.opengles.GL11; Loading Loading @@ -142,9 +144,7 @@ public abstract class UploadedTexture extends BasicTexture { } private void freeBitmap() { if (mBitmap == null) { throw new AssertionError(); } Utils.assertTrue(mBitmap != null); onFreeBitmap(mBitmap); mBitmap = null; } Loading Loading @@ -219,9 +219,7 @@ public abstract class UploadedTexture extends BasicTexture { int texWidth = getTextureWidth(); int texHeight = getTextureHeight(); if (bWidth > texWidth || bHeight > texHeight) { throw new AssertionError(); } Utils.assertTrue(bWidth <= texWidth && bHeight <= texHeight); // Upload the bitmap to a new texture. mId = canvas.getGLId().generateTexture(); Loading