Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f93237ae authored by Michael Bestas's avatar Michael Bestas Committed by LuK1337
Browse files

Revert "Fix compiling errors in P"

* A proper fix will be used instead

This reverts commit c4f92dd3.

Change-Id: I04c9f9d9e05cfc7942eea46ab56f7f94510ba63e
parent c37fad99
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -18,7 +18,7 @@ package com.android.gallery3d.glrenderer;


import android.graphics.Bitmap;
import android.graphics.Bitmap;


//import junit.framework.Assert;
import junit.framework.Assert;


// BitmapTexture is a texture whose content is specified by a fixed Bitmap.
// BitmapTexture is a texture whose content is specified by a fixed Bitmap.
//
//
@@ -34,7 +34,7 @@ public class BitmapTexture extends UploadedTexture {


    public BitmapTexture(Bitmap bitmap, boolean hasBorder) {
    public BitmapTexture(Bitmap bitmap, boolean hasBorder) {
        super(hasBorder);
        super(hasBorder);
        //Assert.assertTrue(bitmap != null && !bitmap.isRecycled());
        Assert.assertTrue(bitmap != null && !bitmap.isRecycled());
        mContentBitmap = bitmap;
        mContentBitmap = bitmap;
    }
    }


+4 −4
Original line number Original line Diff line number Diff line
@@ -28,7 +28,7 @@ import com.android.gallery3d.common.ApiHelper;
import com.android.gallery3d.common.Utils;
import com.android.gallery3d.common.Utils;
import com.android.gallery3d.util.IntArray;
import com.android.gallery3d.util.IntArray;


//import junit.framework.Assert;
import junit.framework.Assert;


import java.nio.Buffer;
import java.nio.Buffer;
import java.nio.ByteBuffer;
import java.nio.ByteBuffer;
@@ -127,7 +127,7 @@ public class GLES11Canvas implements GLCanvas {


    @Override
    @Override
    public void setSize(int width, int height) {
    public void setSize(int width, int height) {
        //Assert.assertTrue(width >= 0 && height >= 0);
        Assert.assertTrue(width >= 0 && height >= 0);


        if (mTargetTexture == null) {
        if (mTargetTexture == null) {
            mScreenWidth = width;
            mScreenWidth = width;
@@ -155,7 +155,7 @@ public class GLES11Canvas implements GLCanvas {


    @Override
    @Override
    public void setAlpha(float alpha) {
    public void setAlpha(float alpha) {
        //Assert.assertTrue(alpha >= 0 && alpha <= 1);
        Assert.assertTrue(alpha >= 0 && alpha <= 1);
        mAlpha = alpha;
        mAlpha = alpha;
    }
    }


@@ -166,7 +166,7 @@ public class GLES11Canvas implements GLCanvas {


    @Override
    @Override
    public void multiplyAlpha(float alpha) {
    public void multiplyAlpha(float alpha) {
        //Assert.assertTrue(alpha >= 0 && alpha <= 1);
        Assert.assertTrue(alpha >= 0 && alpha <= 1);
        mAlpha *= alpha;
        mAlpha *= alpha;
    }
    }


+2 −2
Original line number Original line Diff line number Diff line
@@ -16,7 +16,7 @@


package com.android.gallery3d.glrenderer;
package com.android.gallery3d.glrenderer;


//import junit.framework.Assert;
import junit.framework.Assert;


public class GLPaint {
public class GLPaint {
    private float mLineWidth = 1f;
    private float mLineWidth = 1f;
@@ -31,7 +31,7 @@ public class GLPaint {
    }
    }


    public void setLineWidth(float width) {
    public void setLineWidth(float width) {
        //Assert.assertTrue(width >= 0);
        Assert.assertTrue(width >= 0);
        mLineWidth = width;
        mLineWidth = width;
    }
    }


+2 −2
Original line number Original line Diff line number Diff line
@@ -20,7 +20,7 @@ import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.BitmapFactory;


//import junit.framework.Assert;
import junit.framework.Assert;


// ResourceTexture is a texture whose Bitmap is decoded from a resource.
// ResourceTexture is a texture whose Bitmap is decoded from a resource.
// By default ResourceTexture is not opaque.
// By default ResourceTexture is not opaque.
@@ -30,7 +30,7 @@ public class ResourceTexture extends UploadedTexture {
    protected final int mResId;
    protected final int mResId;


    public ResourceTexture(Context context, int resId) {
    public ResourceTexture(Context context, int resId) {
        //Assert.assertNotNull(context);
        Assert.assertNotNull(context);
        mContext = context;
        mContext = context;
        mResId = resId;
        mResId = resId;
        setOpaque(false);
        setOpaque(false);
+3 −3
Original line number Original line Diff line number Diff line
@@ -20,7 +20,7 @@ import android.graphics.Bitmap;
import android.graphics.Bitmap.Config;
import android.graphics.Bitmap.Config;
import android.opengl.GLUtils;
import android.opengl.GLUtils;


//import junit.framework.Assert;
import junit.framework.Assert;


import java.util.HashMap;
import java.util.HashMap;


@@ -145,7 +145,7 @@ public abstract class UploadedTexture extends BasicTexture {
    }
    }


    private void freeBitmap() {
    private void freeBitmap() {
        //Assert.assertTrue(mBitmap != null);
        Assert.assertTrue(mBitmap != null);
        onFreeBitmap(mBitmap);
        onFreeBitmap(mBitmap);
        mBitmap = null;
        mBitmap = null;
    }
    }
@@ -229,7 +229,7 @@ public abstract class UploadedTexture extends BasicTexture {
                int texWidth = getTextureWidth();
                int texWidth = getTextureWidth();
                int texHeight = getTextureHeight();
                int texHeight = getTextureHeight();


                //Assert.assertTrue(bWidth <= texWidth && bHeight <= texHeight);
                Assert.assertTrue(bWidth <= texWidth && bHeight <= texHeight);


                // Null pointer check here is to avoid monkey test failure.
                // Null pointer check here is to avoid monkey test failure.
                if (canvas.getGLId() != null) {
                if (canvas.getGLId() != null) {