diff --git a/build.gradle b/build.gradle
index c8daa4c..c0fcf64 100644
--- a/build.gradle
+++ b/build.gradle
@@ -21,14 +21,14 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
+ ext.kotlin_version = '1.6.21'
repositories {
- maven{url"https://maven.google.com"}
- jcenter()
google()
+ mavenCentral()
}
dependencies {
- classpath 'com.android.tools.build:gradle:3.4.0'
- classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
+ classpath 'com.android.tools.build:gradle:4.2.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
@@ -36,9 +36,8 @@ buildscript {
allprojects {
repositories {
- maven{url"https://maven.google.com"}
- jcenter()
google()
+ mavenCentral()
}
}
diff --git a/canvasgl/build.gradle b/canvasgl/build.gradle
index 5fc5e44..20b1c11 100644
--- a/canvasgl/build.gradle
+++ b/canvasgl/build.gradle
@@ -19,18 +19,20 @@
*/
apply plugin: 'com.android.library'
-apply plugin: 'com.github.dcendents.android-maven'
-group='com.github.ChillingVan'
-def VERSION_NAME="1.5.2.0"
+apply plugin: 'maven-publish'
+def NAMESPACE="com.github.ChillingVan"
+group = NAMESPACE
+def VERSION_NAME="1.5.3.0"
android {
- compileSdkVersion 31
+ namespace = NAMESPACE
+ compileSdkVersion 32
defaultConfig {
minSdkVersion 14
- targetSdkVersion 31
- versionCode 105020
+ targetSdkVersion 32
+ versionCode 105030
versionName VERSION_NAME
- testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
+ testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}
buildTypes {
release {
@@ -55,7 +57,7 @@ android {
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
testImplementation 'junit:junit:4.12'
- implementation 'com.android.support:support-annotations:28.0.0'
+ implementation 'androidx.annotation:annotation:1.3.0'
}
@@ -84,14 +86,18 @@ artifacts {
archives javadocJar
}
-/**
- * Used to support other project uses mavenLocal() to refer this project which is convenient to debug
- */
-install {
- repositories.mavenInstaller {
- pom.version = 'v' + VERSION_NAME
- pom.artifactId = 'android-openGL-canvas'
+
+afterEvaluate {
+ publishing {
+ publications {
+ // Creates a Maven publication called "release".
+ release(MavenPublication) {
+ from components.release
+ groupId = NAMESPACE
+ artifactId = 'android-openGL-canvas'
+ version = VERSION_NAME
+ }
+ }
}
}
-
diff --git a/canvasgl/src/main/java/com/chillingvan/canvasgl/CanvasGL.java b/canvasgl/src/main/java/com/chillingvan/canvasgl/CanvasGL.java
index b3a180b..7bdd147 100644
--- a/canvasgl/src/main/java/com/chillingvan/canvasgl/CanvasGL.java
+++ b/canvasgl/src/main/java/com/chillingvan/canvasgl/CanvasGL.java
@@ -28,9 +28,6 @@
import android.graphics.SurfaceTexture;
import android.opengl.GLES20;
import android.os.Build;
-import android.support.annotation.IntRange;
-import android.support.annotation.NonNull;
-import android.support.annotation.Nullable;
import com.chillingvan.canvasgl.glcanvas.BasicTexture;
import com.chillingvan.canvasgl.glcanvas.BitmapTexture;
@@ -50,6 +47,10 @@
import java.util.Map;
import java.util.WeakHashMap;
+import androidx.annotation.IntRange;
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+
/**
* All the depth of textures are the same. So the texture drawn after will cover the texture drawn before.
*/
diff --git a/canvasgl/src/main/java/com/chillingvan/canvasgl/ICanvasGL.java b/canvasgl/src/main/java/com/chillingvan/canvasgl/ICanvasGL.java
index 30d4011..7f50154 100644
--- a/canvasgl/src/main/java/com/chillingvan/canvasgl/ICanvasGL.java
+++ b/canvasgl/src/main/java/com/chillingvan/canvasgl/ICanvasGL.java
@@ -26,9 +26,9 @@
import android.graphics.SurfaceTexture;
import android.opengl.GLES20;
import android.opengl.Matrix;
-import android.support.annotation.IntRange;
-import android.support.annotation.NonNull;
-import android.support.annotation.Nullable;
+import androidx.annotation.IntRange;
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
import com.chillingvan.canvasgl.glcanvas.BasicTexture;
import com.chillingvan.canvasgl.glcanvas.BitmapTexture;
diff --git a/canvasgl/src/main/java/com/chillingvan/canvasgl/OffScreenCanvas.java b/canvasgl/src/main/java/com/chillingvan/canvasgl/OffScreenCanvas.java
index 71dbcb6..c43a143 100644
--- a/canvasgl/src/main/java/com/chillingvan/canvasgl/OffScreenCanvas.java
+++ b/canvasgl/src/main/java/com/chillingvan/canvasgl/OffScreenCanvas.java
@@ -21,7 +21,6 @@
package com.chillingvan.canvasgl;
import android.graphics.SurfaceTexture;
-import android.support.annotation.Nullable;
import com.chillingvan.canvasgl.glcanvas.BasicTexture;
import com.chillingvan.canvasgl.glcanvas.RawTexture;
@@ -32,6 +31,8 @@
import java.util.List;
+import androidx.annotation.Nullable;
+
/**
* @deprecated use {@link MultiTexOffScreenCanvas} instead
*/
diff --git a/canvasgl/src/main/java/com/chillingvan/canvasgl/glcanvas/GLCanvas.java b/canvasgl/src/main/java/com/chillingvan/canvasgl/glcanvas/GLCanvas.java
index 6d1a043..c5209c0 100644
--- a/canvasgl/src/main/java/com/chillingvan/canvasgl/glcanvas/GLCanvas.java
+++ b/canvasgl/src/main/java/com/chillingvan/canvasgl/glcanvas/GLCanvas.java
@@ -23,7 +23,7 @@
import android.graphics.Bitmap;
import android.graphics.Rect;
import android.graphics.RectF;
-import android.support.annotation.Nullable;
+import androidx.annotation.Nullable;
import com.chillingvan.canvasgl.shapeFilter.DrawShapeFilter;
import com.chillingvan.canvasgl.textureFilter.TextureFilter;
diff --git a/canvasgl/src/main/java/com/chillingvan/canvasgl/glview/texture/BaseGLCanvasTextureView.java b/canvasgl/src/main/java/com/chillingvan/canvasgl/glview/texture/BaseGLCanvasTextureView.java
index 10726ec..979496a 100644
--- a/canvasgl/src/main/java/com/chillingvan/canvasgl/glview/texture/BaseGLCanvasTextureView.java
+++ b/canvasgl/src/main/java/com/chillingvan/canvasgl/glview/texture/BaseGLCanvasTextureView.java
@@ -4,7 +4,6 @@
import android.graphics.Bitmap;
import android.graphics.Color;
import android.graphics.Rect;
-import android.support.annotation.ColorInt;
import android.util.AttributeSet;
import com.chillingvan.canvasgl.CanvasGL;
@@ -13,6 +12,8 @@
import com.chillingvan.canvasgl.glview.GLView;
import com.chillingvan.canvasgl.util.Loggers;
+import androidx.annotation.ColorInt;
+
/**
*
* From init to run: onSizeChange --> onSurfaceTextureAvailable --> createGLThread --> createSurface --> onSurfaceCreated --> onSurfaceChanged
diff --git a/canvasgl/src/main/java/com/chillingvan/canvasgl/glview/texture/BaseGLTextureView.java b/canvasgl/src/main/java/com/chillingvan/canvasgl/glview/texture/BaseGLTextureView.java
index de89920..39293bc 100644
--- a/canvasgl/src/main/java/com/chillingvan/canvasgl/glview/texture/BaseGLTextureView.java
+++ b/canvasgl/src/main/java/com/chillingvan/canvasgl/glview/texture/BaseGLTextureView.java
@@ -22,19 +22,20 @@
import android.content.Context;
import android.graphics.SurfaceTexture;
-import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.util.Log;
import android.view.TextureView;
import com.chillingvan.canvasgl.ICanvasGL;
-import com.chillingvan.canvasgl.util.Loggers;
import com.chillingvan.canvasgl.glview.texture.gles.EglContextWrapper;
import com.chillingvan.canvasgl.glview.texture.gles.GLThread;
+import com.chillingvan.canvasgl.util.Loggers;
import java.util.ArrayList;
import java.util.List;
+import androidx.annotation.Nullable;
+
/**
* Created by Chilling on 2016/10/31.
* Can be used in ScrollView or ListView.
diff --git a/canvasgl/src/main/java/com/chillingvan/canvasgl/glview/texture/GLSharedContextView.java b/canvasgl/src/main/java/com/chillingvan/canvasgl/glview/texture/GLSharedContextView.java
index a9d46b7..e7bdaed 100644
--- a/canvasgl/src/main/java/com/chillingvan/canvasgl/glview/texture/GLSharedContextView.java
+++ b/canvasgl/src/main/java/com/chillingvan/canvasgl/glview/texture/GLSharedContextView.java
@@ -22,7 +22,6 @@
import android.content.Context;
import android.graphics.SurfaceTexture;
-import android.support.annotation.Nullable;
import android.util.AttributeSet;
import com.chillingvan.canvasgl.ICanvasGL;
@@ -31,6 +30,8 @@
import java.util.List;
+import androidx.annotation.Nullable;
+
/**
* This class is used to accept eglContext and texture from outside. Then it can use them to draw.
* @deprecated Use {@link GLMultiTexConsumerView} instead.
diff --git a/canvasgl/src/main/java/com/chillingvan/canvasgl/glview/texture/GLSurfaceTextureProducerView.java b/canvasgl/src/main/java/com/chillingvan/canvasgl/glview/texture/GLSurfaceTextureProducerView.java
index 5f7e951..42a0661 100644
--- a/canvasgl/src/main/java/com/chillingvan/canvasgl/glview/texture/GLSurfaceTextureProducerView.java
+++ b/canvasgl/src/main/java/com/chillingvan/canvasgl/glview/texture/GLSurfaceTextureProducerView.java
@@ -22,7 +22,6 @@
import android.content.Context;
import android.graphics.SurfaceTexture;
-import android.support.annotation.Nullable;
import android.util.AttributeSet;
import com.chillingvan.canvasgl.ICanvasGL;
@@ -32,6 +31,8 @@
import java.util.List;
+import androidx.annotation.Nullable;
+
/**
*
* This will generate a texture which is in the eglContext of the CanvasGL. And the texture can be used outside.
diff --git a/canvasgl/src/main/java/com/chillingvan/canvasgl/glview/texture/gles/EglHelperAPI17.java b/canvasgl/src/main/java/com/chillingvan/canvasgl/glview/texture/gles/EglHelperAPI17.java
index fb0229f..87f4c94 100644
--- a/canvasgl/src/main/java/com/chillingvan/canvasgl/glview/texture/gles/EglHelperAPI17.java
+++ b/canvasgl/src/main/java/com/chillingvan/canvasgl/glview/texture/gles/EglHelperAPI17.java
@@ -1,6 +1,5 @@
package com.chillingvan.canvasgl.glview.texture.gles;
-import android.nfc.Tag;
import android.opengl.EGL14;
import android.opengl.EGLConfig;
import android.opengl.EGLContext;
@@ -8,10 +7,11 @@
import android.opengl.EGLExt;
import android.opengl.EGLSurface;
import android.os.Build;
-import android.support.annotation.RequiresApi;
import com.chillingvan.canvasgl.util.FileLogger;
+import androidx.annotation.RequiresApi;
+
import static com.chillingvan.canvasgl.glview.texture.gles.EglHelper.formatEglError;
/**
diff --git a/canvasgl/src/main/java/com/chillingvan/canvasgl/glview/texture/gles/GLThread.java b/canvasgl/src/main/java/com/chillingvan/canvasgl/glview/texture/gles/GLThread.java
index b1877ba..a0d16be 100644
--- a/canvasgl/src/main/java/com/chillingvan/canvasgl/glview/texture/gles/GLThread.java
+++ b/canvasgl/src/main/java/com/chillingvan/canvasgl/glview/texture/gles/GLThread.java
@@ -24,8 +24,6 @@
import android.opengl.EGL14;
import android.opengl.EGLExt;
import android.os.Build;
-import android.support.annotation.NonNull;
-import android.support.annotation.RequiresApi;
import android.util.Log;
import android.view.Choreographer;
@@ -42,6 +40,9 @@
import javax.microedition.khronos.egl.EGLSurface;
import javax.microedition.khronos.opengles.GL;
+import androidx.annotation.NonNull;
+import androidx.annotation.RequiresApi;
+
/**
* This is the thread where the gl draw runs in.
* Create GL Context --> Create Surface
diff --git a/canvasgl/src/main/java/com/chillingvan/canvasgl/shapeFilter/DrawCircleFilter.java b/canvasgl/src/main/java/com/chillingvan/canvasgl/shapeFilter/DrawCircleFilter.java
index 40f5af6..18df4f4 100644
--- a/canvasgl/src/main/java/com/chillingvan/canvasgl/shapeFilter/DrawCircleFilter.java
+++ b/canvasgl/src/main/java/com/chillingvan/canvasgl/shapeFilter/DrawCircleFilter.java
@@ -1,11 +1,12 @@
package com.chillingvan.canvasgl.shapeFilter;
import android.opengl.GLES20;
-import android.support.annotation.FloatRange;
import com.chillingvan.canvasgl.ICanvasGL;
import com.chillingvan.canvasgl.OpenGLUtil;
+import androidx.annotation.FloatRange;
+
/**
* Created by Chilling on 2016/11/11.
*/
diff --git a/canvasgl/src/main/java/com/chillingvan/canvasgl/textureFilter/ColorMatrixFilter.java b/canvasgl/src/main/java/com/chillingvan/canvasgl/textureFilter/ColorMatrixFilter.java
index ab4f56a..3a26708 100644
--- a/canvasgl/src/main/java/com/chillingvan/canvasgl/textureFilter/ColorMatrixFilter.java
+++ b/canvasgl/src/main/java/com/chillingvan/canvasgl/textureFilter/ColorMatrixFilter.java
@@ -1,12 +1,13 @@
package com.chillingvan.canvasgl.textureFilter;
import android.opengl.GLES20;
-import android.support.annotation.FloatRange;
import com.chillingvan.canvasgl.ICanvasGL;
import com.chillingvan.canvasgl.OpenGLUtil;
import com.chillingvan.canvasgl.glcanvas.BasicTexture;
+import androidx.annotation.FloatRange;
+
/**
* Created by Chilling on 2017/4/15.
*/
diff --git a/canvasgl/src/main/java/com/chillingvan/canvasgl/textureFilter/ContrastFilter.java b/canvasgl/src/main/java/com/chillingvan/canvasgl/textureFilter/ContrastFilter.java
index ebabf46..5a5d278 100644
--- a/canvasgl/src/main/java/com/chillingvan/canvasgl/textureFilter/ContrastFilter.java
+++ b/canvasgl/src/main/java/com/chillingvan/canvasgl/textureFilter/ContrastFilter.java
@@ -21,12 +21,13 @@
package com.chillingvan.canvasgl.textureFilter;
import android.opengl.GLES20;
-import android.support.annotation.FloatRange;
import com.chillingvan.canvasgl.ICanvasGL;
import com.chillingvan.canvasgl.OpenGLUtil;
import com.chillingvan.canvasgl.glcanvas.BasicTexture;
+import androidx.annotation.FloatRange;
+
/**
* Created by Matthew on 2016/10/14.
*/
diff --git a/canvasgl/src/main/java/com/chillingvan/canvasgl/textureFilter/DarkenBlendFilter.java b/canvasgl/src/main/java/com/chillingvan/canvasgl/textureFilter/DarkenBlendFilter.java
index f77fad9..4cc1b21 100644
--- a/canvasgl/src/main/java/com/chillingvan/canvasgl/textureFilter/DarkenBlendFilter.java
+++ b/canvasgl/src/main/java/com/chillingvan/canvasgl/textureFilter/DarkenBlendFilter.java
@@ -21,7 +21,7 @@
package com.chillingvan.canvasgl.textureFilter;
import android.graphics.Bitmap;
-import android.support.annotation.NonNull;
+import androidx.annotation.NonNull;
/**
* Created by Chilling on 2016/10/17.
diff --git a/canvasgl/src/main/java/com/chillingvan/canvasgl/textureFilter/DirectionalSobelEdgeDetectionFilter.java b/canvasgl/src/main/java/com/chillingvan/canvasgl/textureFilter/DirectionalSobelEdgeDetectionFilter.java
index 168fa0c..1a0ac2b 100644
--- a/canvasgl/src/main/java/com/chillingvan/canvasgl/textureFilter/DirectionalSobelEdgeDetectionFilter.java
+++ b/canvasgl/src/main/java/com/chillingvan/canvasgl/textureFilter/DirectionalSobelEdgeDetectionFilter.java
@@ -20,7 +20,7 @@
package com.chillingvan.canvasgl.textureFilter;
-import android.support.annotation.FloatRange;
+import androidx.annotation.FloatRange;
/**
* Created by Chilling on 2016/11/6.
diff --git a/canvasgl/src/main/java/com/chillingvan/canvasgl/textureFilter/GammaFilter.java b/canvasgl/src/main/java/com/chillingvan/canvasgl/textureFilter/GammaFilter.java
index 10b32f9..e59f8fa 100644
--- a/canvasgl/src/main/java/com/chillingvan/canvasgl/textureFilter/GammaFilter.java
+++ b/canvasgl/src/main/java/com/chillingvan/canvasgl/textureFilter/GammaFilter.java
@@ -21,12 +21,13 @@
package com.chillingvan.canvasgl.textureFilter;
import android.opengl.GLES20;
-import android.support.annotation.FloatRange;
import com.chillingvan.canvasgl.ICanvasGL;
import com.chillingvan.canvasgl.OpenGLUtil;
import com.chillingvan.canvasgl.glcanvas.BasicTexture;
+import androidx.annotation.FloatRange;
+
/**
* Created by Chilling on 2016/11/2.
*/
diff --git a/canvasgl/src/main/java/com/chillingvan/canvasgl/textureFilter/HueFilter.java b/canvasgl/src/main/java/com/chillingvan/canvasgl/textureFilter/HueFilter.java
index 1254142..ddbbd6c 100644
--- a/canvasgl/src/main/java/com/chillingvan/canvasgl/textureFilter/HueFilter.java
+++ b/canvasgl/src/main/java/com/chillingvan/canvasgl/textureFilter/HueFilter.java
@@ -21,12 +21,13 @@
package com.chillingvan.canvasgl.textureFilter;
import android.opengl.GLES20;
-import android.support.annotation.FloatRange;
import com.chillingvan.canvasgl.ICanvasGL;
import com.chillingvan.canvasgl.OpenGLUtil;
import com.chillingvan.canvasgl.glcanvas.BasicTexture;
+import androidx.annotation.FloatRange;
+
/**
* Created by Chilling on 2016/11/1.
*/
diff --git a/canvasgl/src/main/java/com/chillingvan/canvasgl/textureFilter/LightenBlendFilter.java b/canvasgl/src/main/java/com/chillingvan/canvasgl/textureFilter/LightenBlendFilter.java
index 26142a1..44a81a9 100644
--- a/canvasgl/src/main/java/com/chillingvan/canvasgl/textureFilter/LightenBlendFilter.java
+++ b/canvasgl/src/main/java/com/chillingvan/canvasgl/textureFilter/LightenBlendFilter.java
@@ -21,7 +21,7 @@
package com.chillingvan.canvasgl.textureFilter;
import android.graphics.Bitmap;
-import android.support.annotation.NonNull;
+import androidx.annotation.NonNull;
/**
* Created by Chilling on 2016/10/23.
diff --git a/canvasgl/src/main/java/com/chillingvan/canvasgl/textureFilter/LookupFilter.java b/canvasgl/src/main/java/com/chillingvan/canvasgl/textureFilter/LookupFilter.java
index 197fd98..c6c7d29 100644
--- a/canvasgl/src/main/java/com/chillingvan/canvasgl/textureFilter/LookupFilter.java
+++ b/canvasgl/src/main/java/com/chillingvan/canvasgl/textureFilter/LookupFilter.java
@@ -2,13 +2,14 @@
import android.graphics.Bitmap;
import android.opengl.GLES20;
-import android.support.annotation.FloatRange;
-import android.support.annotation.NonNull;
import com.chillingvan.canvasgl.ICanvasGL;
import com.chillingvan.canvasgl.OpenGLUtil;
import com.chillingvan.canvasgl.glcanvas.BasicTexture;
+import androidx.annotation.FloatRange;
+import androidx.annotation.NonNull;
+
/**
* Created by Chilling on 2018/5/4.
*/
diff --git a/canvasgl/src/main/java/com/chillingvan/canvasgl/textureFilter/PixelationFilter.java b/canvasgl/src/main/java/com/chillingvan/canvasgl/textureFilter/PixelationFilter.java
index 325ce0b..d12ef1a 100644
--- a/canvasgl/src/main/java/com/chillingvan/canvasgl/textureFilter/PixelationFilter.java
+++ b/canvasgl/src/main/java/com/chillingvan/canvasgl/textureFilter/PixelationFilter.java
@@ -21,12 +21,13 @@
package com.chillingvan.canvasgl.textureFilter;
import android.opengl.GLES20;
-import android.support.annotation.FloatRange;
import com.chillingvan.canvasgl.ICanvasGL;
import com.chillingvan.canvasgl.OpenGLUtil;
import com.chillingvan.canvasgl.glcanvas.BasicTexture;
+import androidx.annotation.FloatRange;
+
/**
* Created by Chilling on 2016/11/1.
*/
diff --git a/canvasgl/src/main/java/com/chillingvan/canvasgl/textureFilter/RGBFilter.java b/canvasgl/src/main/java/com/chillingvan/canvasgl/textureFilter/RGBFilter.java
index e711fbf..3840e3d 100644
--- a/canvasgl/src/main/java/com/chillingvan/canvasgl/textureFilter/RGBFilter.java
+++ b/canvasgl/src/main/java/com/chillingvan/canvasgl/textureFilter/RGBFilter.java
@@ -1,12 +1,13 @@
package com.chillingvan.canvasgl.textureFilter;
import android.opengl.GLES20;
-import android.support.annotation.FloatRange;
import com.chillingvan.canvasgl.ICanvasGL;
import com.chillingvan.canvasgl.OpenGLUtil;
import com.chillingvan.canvasgl.glcanvas.BasicTexture;
+import androidx.annotation.FloatRange;
+
/**
* Created by Chilling on 2017/4/15.
*/
diff --git a/canvasgl/src/main/java/com/chillingvan/canvasgl/textureFilter/SaturationFilter.java b/canvasgl/src/main/java/com/chillingvan/canvasgl/textureFilter/SaturationFilter.java
index 823dca8..2b60d64 100644
--- a/canvasgl/src/main/java/com/chillingvan/canvasgl/textureFilter/SaturationFilter.java
+++ b/canvasgl/src/main/java/com/chillingvan/canvasgl/textureFilter/SaturationFilter.java
@@ -21,12 +21,13 @@
package com.chillingvan.canvasgl.textureFilter;
import android.opengl.GLES20;
-import android.support.annotation.FloatRange;
import com.chillingvan.canvasgl.ICanvasGL;
import com.chillingvan.canvasgl.OpenGLUtil;
import com.chillingvan.canvasgl.glcanvas.BasicTexture;
+import androidx.annotation.FloatRange;
+
/**
* Created by Chilling on 2016/10/23.
*/
diff --git a/canvasgl/src/main/java/com/chillingvan/canvasgl/textureFilter/TextureSampling3mul3Filter.java b/canvasgl/src/main/java/com/chillingvan/canvasgl/textureFilter/TextureSampling3mul3Filter.java
index 88e20b6..2b6d312 100644
--- a/canvasgl/src/main/java/com/chillingvan/canvasgl/textureFilter/TextureSampling3mul3Filter.java
+++ b/canvasgl/src/main/java/com/chillingvan/canvasgl/textureFilter/TextureSampling3mul3Filter.java
@@ -21,12 +21,13 @@
package com.chillingvan.canvasgl.textureFilter;
import android.opengl.GLES20;
-import android.support.annotation.FloatRange;
import com.chillingvan.canvasgl.ICanvasGL;
import com.chillingvan.canvasgl.OpenGLUtil;
import com.chillingvan.canvasgl.glcanvas.BasicTexture;
+import androidx.annotation.FloatRange;
+
/**
* Created by Chilling on 2016/11/6.
*/
diff --git a/canvasgl/src/main/java/com/chillingvan/canvasgl/textureFilter/TwoTextureFilter.java b/canvasgl/src/main/java/com/chillingvan/canvasgl/textureFilter/TwoTextureFilter.java
index 266c386..a3b45c9 100644
--- a/canvasgl/src/main/java/com/chillingvan/canvasgl/textureFilter/TwoTextureFilter.java
+++ b/canvasgl/src/main/java/com/chillingvan/canvasgl/textureFilter/TwoTextureFilter.java
@@ -24,7 +24,6 @@
import android.graphics.RectF;
import android.opengl.GLES20;
import android.opengl.Matrix;
-import android.support.annotation.NonNull;
import com.chillingvan.canvasgl.ICanvasGL;
import com.chillingvan.canvasgl.glcanvas.BasicTexture;
@@ -35,6 +34,8 @@
import java.util.Arrays;
+import androidx.annotation.NonNull;
+
import static com.chillingvan.canvasgl.ICanvasGL.BitmapMatrix.MATRIX_SIZE;
/**
diff --git a/canvasglsample/build.gradle b/canvasglsample/build.gradle
index 62f794e..d0dda4c 100644
--- a/canvasglsample/build.gradle
+++ b/canvasglsample/build.gradle
@@ -19,18 +19,20 @@
*/
apply plugin: 'com.android.application'
+apply plugin: 'kotlin-android'
+apply plugin: 'kotlin-android-extensions'
android {
- compileSdkVersion 31
+ compileSdkVersion 32
defaultConfig {
applicationId "com.chillingvan.canvasglsample"
minSdkVersion 15
- targetSdkVersion 31
+ targetSdkVersion 32
versionCode 10
- versionName "1.5.1.0"
+ versionName "1.5.3.0"
- testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
+ testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}
buildTypes {
@@ -55,15 +57,15 @@ repositories {
}
dependencies {
- implementation 'com.android.support.constraint:constraint-layout:2.0.4'
+ implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
+ implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation fileTree(include: ['*.jar'], dir: 'libs')
- androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.2', {
+ androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', {
exclude group: 'com.android.support', module: 'support-annotations'
})
- implementation 'com.android.support:appcompat-v7:28.0.0'
- implementation 'com.android.support:recyclerview-v7:28.0.0'
- implementation 'jp.co.cyberagent.android.gpuimage:gpuimage-library:1.4.1'
- implementation 'com.github.tajchert:nammu:1.2.0'
- testImplementation 'junit:junit:4.12'
+ implementation 'androidx.appcompat:appcompat:1.4.2'
+ implementation 'androidx.recyclerview:recyclerview:1.2.1'
+ implementation 'jp.co.cyberagent.android:gpuimage:2.1.0'
+ implementation 'com.github.tajchert:nammu:1.5.1'
implementation project(':canvasgl')
}
diff --git a/canvasglsample/src/androidTest/java/com/chillingvan/canvasglsample/ExampleInstrumentedTest.java b/canvasglsample/src/androidTest/java/com/chillingvan/canvasglsample/ExampleInstrumentedTest.java
index 33e48c4..7f6ffea 100644
--- a/canvasglsample/src/androidTest/java/com/chillingvan/canvasglsample/ExampleInstrumentedTest.java
+++ b/canvasglsample/src/androidTest/java/com/chillingvan/canvasglsample/ExampleInstrumentedTest.java
@@ -21,13 +21,14 @@
package com.chillingvan.canvasglsample;
import android.content.Context;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
-import static org.junit.Assert.*;
+import androidx.test.platform.app.InstrumentationRegistry;
+import androidx.test.runner.AndroidJUnit4;
+
+import static org.junit.Assert.assertEquals;
/**
* Instrumentation test, which will execute on an Android device.
diff --git a/canvasglsample/src/main/AndroidManifest.xml b/canvasglsample/src/main/AndroidManifest.xml
index 7f84ff5..95e63f2 100644
--- a/canvasglsample/src/main/AndroidManifest.xml
+++ b/canvasglsample/src/main/AndroidManifest.xml
@@ -13,7 +13,8 @@
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
-
+
@@ -22,7 +23,8 @@
+ android:label="FilterActivity"
+ android:exported="true">
@@ -32,7 +34,8 @@
+ android:label="AnimActivity"
+ android:exported="true">
@@ -41,7 +44,8 @@
+ android:label="CompareCanvas"
+ android:exported="true">
@@ -50,7 +54,8 @@
+ android:label="TextureCamera"
+ android:exported="true">
@@ -59,7 +64,8 @@
+ android:label="OffScreenActivity"
+ android:exported="true">
@@ -68,7 +74,8 @@
+ android:label="ComparePerformanceActivity"
+ android:exported="true">
@@ -77,7 +84,8 @@
+ android:label="SimpleOffScreenActivity"
+ android:exported="true">
@@ -86,7 +94,8 @@
+ android:label="OffscreenCameraActivity"
+ android:exported="true">
@@ -95,7 +104,8 @@
+ android:label="MediaPlayerActivity"
+ android:exported="true">
@@ -104,7 +114,8 @@
+ android:label="DrawTextActivity"
+ android:exported="true">
@@ -113,7 +124,8 @@
+ android:label="MergeVideoActivity"
+ android:exported="true">
@@ -122,7 +134,8 @@
+ android:label="MultiTextureActivity"
+ android:exported="true">
@@ -131,7 +144,8 @@
+ android:label="MultiTexOffScreenActivity"
+ android:exported="true">
@@ -140,7 +154,8 @@
+ android:label="TextureListActivity"
+ android:exported="true">
@@ -149,7 +164,8 @@
+ android:label="TestMatrixActivity"
+ android:exported="true">
@@ -159,7 +175,7 @@
+ android:exported="true">
@@ -168,7 +184,7 @@
+ android:exported="true">
diff --git a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/MainActivity.java b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/MainActivity.java
index 8d676e1..2ef2df7 100644
--- a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/MainActivity.java
+++ b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/MainActivity.java
@@ -73,23 +73,23 @@ public void onCreate(Bundle savedInstanceState) {
}
private void getPermission() {
- Nammu.init(getApplicationContext());
+ Nammu.INSTANCE.init(getApplicationContext());
askPermission(Manifest.permission.CAMERA);
askPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE);
}
private void askPermission(String permissionName) {
- if (!Nammu.checkPermission(permissionName)) {
- if (Nammu.shouldShowRequestPermissionRationale(this, permissionName)) {
+ if (!Nammu.INSTANCE.checkPermission(permissionName)) {
+ if (Nammu.INSTANCE.shouldShowRequestPermissionRationale(this, permissionName)) {
Toast.makeText(this, R.string.permission_tips, Toast.LENGTH_SHORT).show();
- Nammu.askForPermission(MainActivity.this, permissionName, new PermissionCallback() {
+ Nammu.INSTANCE.askForPermission(MainActivity.this, permissionName, new PermissionCallback() {
@Override
public void permissionGranted() { }
@Override
public void permissionRefused() { }
});
} else {
- Nammu.askForPermission(MainActivity.this, permissionName, new PermissionCallback() {
+ Nammu.INSTANCE.askForPermission(MainActivity.this, permissionName, new PermissionCallback() {
@Override
public void permissionGranted() { }
@Override
diff --git a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/animation/AnimActivity.java b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/animation/AnimActivity.java
index 5c925e9..bce3075 100644
--- a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/animation/AnimActivity.java
+++ b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/animation/AnimActivity.java
@@ -24,7 +24,6 @@
import android.graphics.BitmapFactory;
import android.graphics.PointF;
import android.os.Bundle;
-import android.support.v7.app.AppCompatActivity;
import com.chillingvan.canvasgl.textureFilter.BasicTextureFilter;
import com.chillingvan.canvasgl.textureFilter.ContrastFilter;
@@ -39,6 +38,8 @@
import java.util.List;
import java.util.Random;
+import androidx.appcompat.app.AppCompatActivity;
+
public class AnimActivity extends AppCompatActivity {
public static final float VY_MULTIPLIER = 0.01f; // px/ms
diff --git a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/compareCanvas/CompareCanvasActivity.java b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/compareCanvas/CompareCanvasActivity.java
index 4792a49..7f65b5d 100644
--- a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/compareCanvas/CompareCanvasActivity.java
+++ b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/compareCanvas/CompareCanvasActivity.java
@@ -20,11 +20,12 @@
package com.chillingvan.canvasglsample.compareCanvas;
-import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import com.chillingvan.canvasglsample.R;
+import androidx.appcompat.app.AppCompatActivity;
+
public class CompareCanvasActivity extends AppCompatActivity {
@Override
diff --git a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/comparePerformance/ComparePerformanceActivity.java b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/comparePerformance/ComparePerformanceActivity.java
index 2734de2..4298797 100644
--- a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/comparePerformance/ComparePerformanceActivity.java
+++ b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/comparePerformance/ComparePerformanceActivity.java
@@ -3,7 +3,6 @@
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Bundle;
-import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.TextView;
@@ -11,6 +10,8 @@
import java.util.Locale;
+import androidx.appcompat.app.AppCompatActivity;
+
public class ComparePerformanceActivity extends AppCompatActivity {
private NormalBubblesView hwBubblesView;
diff --git a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/filter/CaseEntity.java b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/filter/CaseEntity.java
index 7b02499..5fcd550 100644
--- a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/filter/CaseEntity.java
+++ b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/filter/CaseEntity.java
@@ -29,7 +29,8 @@
import com.chillingvan.canvasglsample.util.adapter.BaseItemView;
import com.chillingvan.canvasglsample.util.adapter.RenderEntity;
-import jp.co.cyberagent.android.gpuimage.GPUImageFilter;
+import jp.co.cyberagent.android.gpuimage.filter.GPUImageFilter;
+
/**
* Created by Chilling on 2016/10/24.
diff --git a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/filter/CaseItemView.java b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/filter/CaseItemView.java
index 609e102..28749fc 100644
--- a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/filter/CaseItemView.java
+++ b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/filter/CaseItemView.java
@@ -20,16 +20,16 @@
package com.chillingvan.canvasglsample.filter;
-import android.arch.lifecycle.Lifecycle;
-import android.arch.lifecycle.LifecycleObserver;
-import android.arch.lifecycle.OnLifecycleEvent;
-import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.TextView;
import com.chillingvan.canvasglsample.R;
import com.chillingvan.canvasglsample.util.adapter.BaseItemView;
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.lifecycle.Lifecycle;
+import androidx.lifecycle.LifecycleObserver;
+import androidx.lifecycle.OnLifecycleEvent;
import jp.co.cyberagent.android.gpuimage.GPUImageView;
/**
diff --git a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/filter/FilterActivity.java b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/filter/FilterActivity.java
index 428f32d..c70eb79 100644
--- a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/filter/FilterActivity.java
+++ b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/filter/FilterActivity.java
@@ -24,8 +24,6 @@
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Bundle;
-import android.support.annotation.NonNull;
-import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.ListView;
import android.widget.SeekBar;
@@ -55,19 +53,21 @@
import java.util.List;
import java.util.Map;
-import jp.co.cyberagent.android.gpuimage.GPUImageColorMatrixFilter;
-import jp.co.cyberagent.android.gpuimage.GPUImageContrastFilter;
-import jp.co.cyberagent.android.gpuimage.GPUImageDarkenBlendFilter;
-import jp.co.cyberagent.android.gpuimage.GPUImageDirectionalSobelEdgeDetectionFilter;
-import jp.co.cyberagent.android.gpuimage.GPUImageFilter;
-import jp.co.cyberagent.android.gpuimage.GPUImageFilterGroup;
-import jp.co.cyberagent.android.gpuimage.GPUImageGammaFilter;
-import jp.co.cyberagent.android.gpuimage.GPUImageHueFilter;
-import jp.co.cyberagent.android.gpuimage.GPUImageLightenBlendFilter;
-import jp.co.cyberagent.android.gpuimage.GPUImageLookupFilter;
-import jp.co.cyberagent.android.gpuimage.GPUImagePixelationFilter;
-import jp.co.cyberagent.android.gpuimage.GPUImageRGBFilter;
-import jp.co.cyberagent.android.gpuimage.GPUImageSaturationFilter;
+import androidx.annotation.NonNull;
+import androidx.appcompat.app.AppCompatActivity;
+import jp.co.cyberagent.android.gpuimage.filter.GPUImageColorMatrixFilter;
+import jp.co.cyberagent.android.gpuimage.filter.GPUImageContrastFilter;
+import jp.co.cyberagent.android.gpuimage.filter.GPUImageDarkenBlendFilter;
+import jp.co.cyberagent.android.gpuimage.filter.GPUImageDirectionalSobelEdgeDetectionFilter;
+import jp.co.cyberagent.android.gpuimage.filter.GPUImageFilter;
+import jp.co.cyberagent.android.gpuimage.filter.GPUImageFilterGroup;
+import jp.co.cyberagent.android.gpuimage.filter.GPUImageGammaFilter;
+import jp.co.cyberagent.android.gpuimage.filter.GPUImageHueFilter;
+import jp.co.cyberagent.android.gpuimage.filter.GPUImageLightenBlendFilter;
+import jp.co.cyberagent.android.gpuimage.filter.GPUImageLookupFilter;
+import jp.co.cyberagent.android.gpuimage.filter.GPUImagePixelationFilter;
+import jp.co.cyberagent.android.gpuimage.filter.GPUImageRGBFilter;
+import jp.co.cyberagent.android.gpuimage.filter.GPUImageSaturationFilter;
public class FilterActivity extends AppCompatActivity {
diff --git a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/filter/FilterAdjuster.java b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/filter/FilterAdjuster.java
index 38d1064..47e79a6 100644
--- a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/filter/FilterAdjuster.java
+++ b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/filter/FilterAdjuster.java
@@ -22,39 +22,40 @@
import android.opengl.Matrix;
-import jp.co.cyberagent.android.gpuimage.GPUImage3x3TextureSamplingFilter;
-import jp.co.cyberagent.android.gpuimage.GPUImageBilateralFilter;
-import jp.co.cyberagent.android.gpuimage.GPUImageBrightnessFilter;
-import jp.co.cyberagent.android.gpuimage.GPUImageBulgeDistortionFilter;
-import jp.co.cyberagent.android.gpuimage.GPUImageColorBalanceFilter;
-import jp.co.cyberagent.android.gpuimage.GPUImageContrastFilter;
-import jp.co.cyberagent.android.gpuimage.GPUImageCrosshatchFilter;
-import jp.co.cyberagent.android.gpuimage.GPUImageDissolveBlendFilter;
-import jp.co.cyberagent.android.gpuimage.GPUImageEmbossFilter;
-import jp.co.cyberagent.android.gpuimage.GPUImageExposureFilter;
-import jp.co.cyberagent.android.gpuimage.GPUImageFilter;
-import jp.co.cyberagent.android.gpuimage.GPUImageGammaFilter;
-import jp.co.cyberagent.android.gpuimage.GPUImageGaussianBlurFilter;
-import jp.co.cyberagent.android.gpuimage.GPUImageGlassSphereFilter;
-import jp.co.cyberagent.android.gpuimage.GPUImageHazeFilter;
-import jp.co.cyberagent.android.gpuimage.GPUImageHighlightShadowFilter;
-import jp.co.cyberagent.android.gpuimage.GPUImageHueFilter;
-import jp.co.cyberagent.android.gpuimage.GPUImageLevelsFilter;
-import jp.co.cyberagent.android.gpuimage.GPUImageLookupFilter;
-import jp.co.cyberagent.android.gpuimage.GPUImageMonochromeFilter;
-import jp.co.cyberagent.android.gpuimage.GPUImageOpacityFilter;
-import jp.co.cyberagent.android.gpuimage.GPUImagePixelationFilter;
-import jp.co.cyberagent.android.gpuimage.GPUImagePosterizeFilter;
-import jp.co.cyberagent.android.gpuimage.GPUImageRGBFilter;
-import jp.co.cyberagent.android.gpuimage.GPUImageSaturationFilter;
-import jp.co.cyberagent.android.gpuimage.GPUImageSepiaFilter;
-import jp.co.cyberagent.android.gpuimage.GPUImageSharpenFilter;
-import jp.co.cyberagent.android.gpuimage.GPUImageSobelEdgeDetection;
-import jp.co.cyberagent.android.gpuimage.GPUImageSphereRefractionFilter;
-import jp.co.cyberagent.android.gpuimage.GPUImageSwirlFilter;
-import jp.co.cyberagent.android.gpuimage.GPUImageTransformFilter;
-import jp.co.cyberagent.android.gpuimage.GPUImageVignetteFilter;
-import jp.co.cyberagent.android.gpuimage.GPUImageWhiteBalanceFilter;
+import jp.co.cyberagent.android.gpuimage.filter.GPUImage3x3TextureSamplingFilter;
+import jp.co.cyberagent.android.gpuimage.filter.GPUImageBilateralBlurFilter;
+import jp.co.cyberagent.android.gpuimage.filter.GPUImageBrightnessFilter;
+import jp.co.cyberagent.android.gpuimage.filter.GPUImageBulgeDistortionFilter;
+import jp.co.cyberagent.android.gpuimage.filter.GPUImageColorBalanceFilter;
+import jp.co.cyberagent.android.gpuimage.filter.GPUImageContrastFilter;
+import jp.co.cyberagent.android.gpuimage.filter.GPUImageCrosshatchFilter;
+import jp.co.cyberagent.android.gpuimage.filter.GPUImageDissolveBlendFilter;
+import jp.co.cyberagent.android.gpuimage.filter.GPUImageEmbossFilter;
+import jp.co.cyberagent.android.gpuimage.filter.GPUImageExposureFilter;
+import jp.co.cyberagent.android.gpuimage.filter.GPUImageFilter;
+import jp.co.cyberagent.android.gpuimage.filter.GPUImageGammaFilter;
+import jp.co.cyberagent.android.gpuimage.filter.GPUImageGaussianBlurFilter;
+import jp.co.cyberagent.android.gpuimage.filter.GPUImageGlassSphereFilter;
+import jp.co.cyberagent.android.gpuimage.filter.GPUImageHazeFilter;
+import jp.co.cyberagent.android.gpuimage.filter.GPUImageHighlightShadowFilter;
+import jp.co.cyberagent.android.gpuimage.filter.GPUImageHueFilter;
+import jp.co.cyberagent.android.gpuimage.filter.GPUImageLevelsFilter;
+import jp.co.cyberagent.android.gpuimage.filter.GPUImageLookupFilter;
+import jp.co.cyberagent.android.gpuimage.filter.GPUImageMonochromeFilter;
+import jp.co.cyberagent.android.gpuimage.filter.GPUImageOpacityFilter;
+import jp.co.cyberagent.android.gpuimage.filter.GPUImagePixelationFilter;
+import jp.co.cyberagent.android.gpuimage.filter.GPUImagePosterizeFilter;
+import jp.co.cyberagent.android.gpuimage.filter.GPUImageRGBFilter;
+import jp.co.cyberagent.android.gpuimage.filter.GPUImageSaturationFilter;
+import jp.co.cyberagent.android.gpuimage.filter.GPUImageSepiaToneFilter;
+import jp.co.cyberagent.android.gpuimage.filter.GPUImageSharpenFilter;
+import jp.co.cyberagent.android.gpuimage.filter.GPUImageSobelEdgeDetectionFilter;
+import jp.co.cyberagent.android.gpuimage.filter.GPUImageSphereRefractionFilter;
+import jp.co.cyberagent.android.gpuimage.filter.GPUImageSwirlFilter;
+import jp.co.cyberagent.android.gpuimage.filter.GPUImageTransformFilter;
+import jp.co.cyberagent.android.gpuimage.filter.GPUImageVignetteFilter;
+import jp.co.cyberagent.android.gpuimage.filter.GPUImageWhiteBalanceFilter;
+
public class FilterAdjuster {
private final Adjuster extends GPUImageFilter> adjuster;
@@ -62,7 +63,7 @@ public class FilterAdjuster {
public FilterAdjuster(final GPUImageFilter filter) {
if (filter instanceof GPUImageSharpenFilter) {
adjuster = new SharpnessAdjuster().filter(filter);
- } else if (filter instanceof GPUImageSepiaFilter) {
+ } else if (filter instanceof GPUImageSepiaToneFilter) {
adjuster = new SepiaAdjuster().filter(filter);
} else if (filter instanceof GPUImageContrastFilter) {
adjuster = new ContrastAdjuster().filter(filter);
@@ -70,7 +71,7 @@ public FilterAdjuster(final GPUImageFilter filter) {
adjuster = new GammaAdjuster().filter(filter);
} else if (filter instanceof GPUImageBrightnessFilter) {
adjuster = new BrightnessAdjuster().filter(filter);
- } else if (filter instanceof GPUImageSobelEdgeDetection) {
+ } else if (filter instanceof GPUImageSobelEdgeDetectionFilter) {
adjuster = new SobelAdjuster().filter(filter);
} else if (filter instanceof GPUImageEmbossFilter) {
adjuster = new EmbossAdjuster().filter(filter);
@@ -118,7 +119,7 @@ public FilterAdjuster(final GPUImageFilter filter) {
adjuster = new ColorBalanceAdjuster().filter(filter);
} else if (filter instanceof GPUImageLevelsFilter) {
adjuster = new LevelsMinMidAdjuster().filter(filter);
- } else if (filter instanceof GPUImageBilateralFilter) {
+ } else if (filter instanceof GPUImageBilateralBlurFilter) {
adjuster = new BilateralAdjuster().filter(filter);
} else if (filter instanceof GPUImageTransformFilter) {
adjuster = new RotateAdjuster().filter(filter);
@@ -205,14 +206,14 @@ public void adjust(final int percentage) {
}
}
- private class SepiaAdjuster extends Adjuster {
+ private class SepiaAdjuster extends Adjuster {
@Override
public void adjust(final int percentage) {
getFilter().setIntensity(range(percentage, 0.0f, 2.0f));
}
}
- private class SobelAdjuster extends Adjuster {
+ private class SobelAdjuster extends Adjuster {
@Override
public void adjust(final int percentage) {
getFilter().setLineSize(range(percentage, 0.0f, 5.0f));
@@ -379,7 +380,7 @@ public void adjust(int percentage) {
}
}
- private class BilateralAdjuster extends Adjuster {
+ private class BilateralAdjuster extends Adjuster {
@Override
public void adjust(final int percentage) {
getFilter().setDistanceNormalizationFactor(range(percentage, 0.0f, 15.0f));
diff --git a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/listSample/TextureListActivity.java b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/listSample/TextureListActivity.java
index a31eff9..ddb5268 100644
--- a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/listSample/TextureListActivity.java
+++ b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/listSample/TextureListActivity.java
@@ -3,9 +3,6 @@
import android.graphics.SurfaceTexture;
import android.hardware.Camera;
import android.os.Bundle;
-import android.support.v7.app.AppCompatActivity;
-import android.support.v7.widget.LinearLayoutManager;
-import android.support.v7.widget.RecyclerView;
import com.chillingvan.canvasgl.glview.texture.GLMultiTexConsumerView;
import com.chillingvan.canvasgl.glview.texture.GLMultiTexProducerView;
@@ -21,6 +18,10 @@
import java.util.ArrayList;
import java.util.List;
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
+
public class TextureListActivity extends AppCompatActivity {
private PreviewConsumerTextureView currentConsumerTextureView;
diff --git a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/multi/MultiTextureActivity.java b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/multi/MultiTextureActivity.java
index e23594d..890467d 100644
--- a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/multi/MultiTextureActivity.java
+++ b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/multi/MultiTextureActivity.java
@@ -15,8 +15,8 @@
import android.hardware.camera2.params.StreamConfigurationMap;
import android.os.Build;
import android.os.Bundle;
-import android.support.annotation.NonNull;
-import android.support.v7.app.AppCompatActivity;
+import androidx.annotation.NonNull;
+import androidx.appcompat.app.AppCompatActivity;
import android.util.Log;
import android.view.Surface;
import android.view.View;
diff --git a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/offscreen/MultiTexOffScreenActivity.java b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/offscreen/MultiTexOffScreenActivity.java
index 18d884a..fa8ec17 100644
--- a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/offscreen/MultiTexOffScreenActivity.java
+++ b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/offscreen/MultiTexOffScreenActivity.java
@@ -6,7 +6,6 @@
import android.hardware.Camera;
import android.opengl.GLES11Ext;
import android.os.Bundle;
-import android.support.v7.app.AppCompatActivity;
import android.view.Surface;
import android.view.View;
import android.widget.ImageView;
@@ -27,6 +26,8 @@
import java.util.ArrayList;
import java.util.List;
+import androidx.appcompat.app.AppCompatActivity;
+
public class MultiTexOffScreenActivity extends AppCompatActivity {
private List mediaSurfaces = new ArrayList<>();
diff --git a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/offscreen/OffScreenActivity.java b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/offscreen/OffScreenActivity.java
index 0040e65..3adadf7 100644
--- a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/offscreen/OffScreenActivity.java
+++ b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/offscreen/OffScreenActivity.java
@@ -28,7 +28,7 @@
import android.graphics.Rect;
import android.graphics.SurfaceTexture;
import android.os.Bundle;
-import android.support.annotation.Nullable;
+import androidx.annotation.Nullable;
import android.widget.ImageView;
import com.chillingvan.canvasgl.ICanvasGL;
diff --git a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/offscreen/SimpleOffScreenActivity.java b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/offscreen/SimpleOffScreenActivity.java
index a27af9a..65164b3 100644
--- a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/offscreen/SimpleOffScreenActivity.java
+++ b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/offscreen/SimpleOffScreenActivity.java
@@ -5,8 +5,6 @@
import android.graphics.Rect;
import android.graphics.SurfaceTexture;
import android.os.Bundle;
-import android.support.annotation.Nullable;
-import android.support.v7.app.AppCompatActivity;
import android.widget.ImageView;
import com.chillingvan.canvasgl.ICanvasGL;
@@ -16,6 +14,9 @@
import com.chillingvan.canvasgl.glview.GLView;
import com.chillingvan.canvasglsample.R;
+import androidx.annotation.Nullable;
+import androidx.appcompat.app.AppCompatActivity;
+
public class SimpleOffScreenActivity extends AppCompatActivity {
private ImageView imageView;
diff --git a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/offscreen/camera/CameraPreviewOffScreen.java b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/offscreen/camera/CameraPreviewOffScreen.java
index 344f326..a99a114 100644
--- a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/offscreen/camera/CameraPreviewOffScreen.java
+++ b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/offscreen/camera/CameraPreviewOffScreen.java
@@ -2,13 +2,14 @@
import android.graphics.SurfaceTexture;
import android.opengl.GLES11Ext;
-import android.support.annotation.Nullable;
import com.chillingvan.canvasgl.ICanvasGL;
import com.chillingvan.canvasgl.OffScreenCanvas;
import com.chillingvan.canvasgl.glcanvas.BasicTexture;
import com.chillingvan.canvasgl.glcanvas.RawTexture;
+import androidx.annotation.Nullable;
+
/**
* Created by Chilling on 2016/12/19.
*/
diff --git a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/offscreen/camera/OffscreenCameraActivity.java b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/offscreen/camera/OffscreenCameraActivity.java
index cf7f4f3..ab7f4ae 100644
--- a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/offscreen/camera/OffscreenCameraActivity.java
+++ b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/offscreen/camera/OffscreenCameraActivity.java
@@ -5,7 +5,6 @@
import android.graphics.SurfaceTexture;
import android.hardware.Camera;
import android.os.Bundle;
-import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.ImageView;
@@ -19,6 +18,8 @@
import java.io.IOException;
+import androidx.appcompat.app.AppCompatActivity;
+
public class OffscreenCameraActivity extends AppCompatActivity {
private Camera mCamera;
diff --git a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/screenRecord/ScreenRecordActivity.java b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/screenRecord/ScreenRecordActivity.java
index 0e17d3e..5e58635 100644
--- a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/screenRecord/ScreenRecordActivity.java
+++ b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/screenRecord/ScreenRecordActivity.java
@@ -5,9 +5,6 @@
import android.graphics.SurfaceTexture;
import android.os.Build;
import android.os.Bundle;
-import android.support.annotation.Nullable;
-import android.support.annotation.RequiresApi;
-import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;
@@ -19,6 +16,10 @@
import java.util.List;
+import androidx.annotation.Nullable;
+import androidx.annotation.RequiresApi;
+import androidx.appcompat.app.AppCompatActivity;
+
import static com.chillingvan.canvasglsample.screenRecord.ScreenRecordHelper.REQUEST_MEDIA_PROJECTION;
/**
diff --git a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/screenRecord/ScreenRecordHelper.java b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/screenRecord/ScreenRecordHelper.java
index a1f4e63..d33bee2 100644
--- a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/screenRecord/ScreenRecordHelper.java
+++ b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/screenRecord/ScreenRecordHelper.java
@@ -8,13 +8,14 @@
import android.media.projection.MediaProjection;
import android.media.projection.MediaProjectionManager;
import android.os.Build;
-import android.support.annotation.RequiresApi;
import android.util.DisplayMetrics;
import android.view.Surface;
import com.chillingvan.canvasgl.glcanvas.RawTexture;
import com.chillingvan.canvasgl.glview.texture.GLTexture;
+import androidx.annotation.RequiresApi;
+
/**
* Created by Chilling on 2020/3/7.
*/
diff --git a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/screenRecord/ScreenRecordTextureView.java b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/screenRecord/ScreenRecordTextureView.java
index 18057fa..5a19561 100644
--- a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/screenRecord/ScreenRecordTextureView.java
+++ b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/screenRecord/ScreenRecordTextureView.java
@@ -6,7 +6,6 @@
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.PorterDuff;
-import android.support.annotation.Nullable;
import android.util.AttributeSet;
import com.chillingvan.canvasgl.ICanvasGL;
@@ -15,6 +14,8 @@
import com.chillingvan.canvasgl.glview.texture.GLTexture;
import com.chillingvan.canvasglsample.util.ScreenUtil;
+import androidx.annotation.Nullable;
+
/**
* Created by Chilling on 2020/3/7.
*/
diff --git a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/testcase/testMatrix/Camera2Util.java b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/testcase/testMatrix/Camera2Util.java
index 4c45154..7250d4a 100644
--- a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/testcase/testMatrix/Camera2Util.java
+++ b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/testcase/testMatrix/Camera2Util.java
@@ -6,9 +6,10 @@
import android.hardware.camera2.CameraManager;
import android.hardware.camera2.params.StreamConfigurationMap;
import android.os.Build;
-import android.support.annotation.RequiresApi;
import android.util.Log;
+import androidx.annotation.RequiresApi;
+
/**
* Created by Chilling on 2019/11/24.
*/
diff --git a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/testcase/testMatrix/TestMatrixActivity.java b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/testcase/testMatrix/TestMatrixActivity.java
index bea36ac..eba5c69 100644
--- a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/testcase/testMatrix/TestMatrixActivity.java
+++ b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/testcase/testMatrix/TestMatrixActivity.java
@@ -1,10 +1,11 @@
package com.chillingvan.canvasglsample.testcase.testMatrix;
import android.os.Bundle;
-import android.support.v7.app.AppCompatActivity;
import com.chillingvan.canvasglsample.R;
+import androidx.appcompat.app.AppCompatActivity;
+
public class TestMatrixActivity extends AppCompatActivity {
@Override
diff --git a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/testcase/testMatrix/TestMatrixSurfaceActivity.java b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/testcase/testMatrix/TestMatrixSurfaceActivity.java
index 41572c4..d6ce27c 100644
--- a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/testcase/testMatrix/TestMatrixSurfaceActivity.java
+++ b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/testcase/testMatrix/TestMatrixSurfaceActivity.java
@@ -11,9 +11,6 @@
import android.hardware.camera2.CaptureRequest;
import android.os.Build;
import android.os.Bundle;
-import android.support.annotation.NonNull;
-import android.support.annotation.RequiresApi;
-import android.support.v7.app.AppCompatActivity;
import android.view.Surface;
import android.view.View;
import android.widget.Toast;
@@ -24,6 +21,10 @@
import java.util.Arrays;
+import androidx.annotation.NonNull;
+import androidx.annotation.RequiresApi;
+import androidx.appcompat.app.AppCompatActivity;
+
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
public class TestMatrixSurfaceActivity extends AppCompatActivity {
diff --git a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/testcase/testMatrix/TestMatrixSurfaceTextureView.java b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/testcase/testMatrix/TestMatrixSurfaceTextureView.java
index 3e94966..fc7c0ac 100644
--- a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/testcase/testMatrix/TestMatrixSurfaceTextureView.java
+++ b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/testcase/testMatrix/TestMatrixSurfaceTextureView.java
@@ -7,7 +7,6 @@
import android.graphics.Paint;
import android.graphics.PorterDuff;
import android.graphics.SurfaceTexture;
-import android.support.annotation.Nullable;
import android.util.AttributeSet;
import com.chillingvan.canvasgl.ICanvasGL;
@@ -18,6 +17,8 @@
import com.chillingvan.canvasgl.textureFilter.BasicTextureFilter;
import com.chillingvan.canvasglsample.util.ScreenUtil;
+import androidx.annotation.Nullable;
+
/**
* Created by Chilling on 2019/11/23.
*/
diff --git a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/text/DrawTextActivity.java b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/text/DrawTextActivity.java
index fbde2cf..342de29 100644
--- a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/text/DrawTextActivity.java
+++ b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/text/DrawTextActivity.java
@@ -3,7 +3,6 @@
import android.graphics.SurfaceTexture;
import android.os.Bundle;
import android.os.CountDownTimer;
-import android.support.v7.app.AppCompatActivity;
import android.view.Surface;
import android.view.View;
import android.widget.TextView;
@@ -13,6 +12,8 @@
import com.chillingvan.canvasglsample.R;
import com.chillingvan.canvasglsample.video.MediaPlayerHelper;
+import androidx.appcompat.app.AppCompatActivity;
+
public class DrawTextActivity extends AppCompatActivity {
private MediaPlayerHelper mediaPlayer = new MediaPlayerHelper();
diff --git a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/text/ObjectFactory.java b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/text/ObjectFactory.java
index d9a25ba..8374acc 100644
--- a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/text/ObjectFactory.java
+++ b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/text/ObjectFactory.java
@@ -1,14 +1,14 @@
package com.chillingvan.canvasglsample.text;
-import android.support.annotation.Nullable;
-import android.support.v4.util.Pools;
-
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Queue;
import java.util.concurrent.LinkedBlockingQueue;
+import androidx.annotation.Nullable;
+import androidx.core.util.Pools;
+
/**
* Created by Chilling on 2018/4/14.
*/
diff --git a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/textureView/CameraPreviewTextureView.java b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/textureView/CameraPreviewTextureView.java
index 83aa300..2c111fd 100644
--- a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/textureView/CameraPreviewTextureView.java
+++ b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/textureView/CameraPreviewTextureView.java
@@ -22,7 +22,6 @@
import android.content.Context;
import android.graphics.SurfaceTexture;
-import android.support.annotation.Nullable;
import android.util.AttributeSet;
import com.chillingvan.canvasgl.ICanvasGL;
@@ -32,6 +31,8 @@
import com.chillingvan.canvasgl.textureFilter.BasicTextureFilter;
import com.chillingvan.canvasgl.textureFilter.TextureFilter;
+import androidx.annotation.Nullable;
+
/**
* Created by Chilling on 2016/11/3.
*/
diff --git a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/textureView/CameraUtils.java b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/textureView/CameraUtils.java
index bb34683..e3cbbd1 100644
--- a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/textureView/CameraUtils.java
+++ b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/textureView/CameraUtils.java
@@ -22,7 +22,6 @@
import android.hardware.Camera;
import android.os.Build;
-import android.support.annotation.RequiresApi;
import android.util.Log;
import android.util.Size;
@@ -31,6 +30,8 @@
import java.util.Comparator;
import java.util.List;
+import androidx.annotation.RequiresApi;
+
/**
* Camera-related utility functions.
*/
diff --git a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/textureView/TextureCameraActivity.java b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/textureView/TextureCameraActivity.java
index 5614dc1..5899eb4 100644
--- a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/textureView/TextureCameraActivity.java
+++ b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/textureView/TextureCameraActivity.java
@@ -25,23 +25,24 @@
import android.graphics.SurfaceTexture;
import android.hardware.Camera;
import android.os.Bundle;
-import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
-import com.chillingvan.canvasgl.glview.texture.GLTexture;
-import com.chillingvan.canvasgl.util.Loggers;
import com.chillingvan.canvasgl.glcanvas.RawTexture;
import com.chillingvan.canvasgl.glview.GLView;
import com.chillingvan.canvasgl.glview.texture.GLSurfaceTextureProducerView;
+import com.chillingvan.canvasgl.glview.texture.GLTexture;
import com.chillingvan.canvasgl.glview.texture.gles.EglContextWrapper;
import com.chillingvan.canvasgl.glview.texture.gles.GLThread;
import com.chillingvan.canvasgl.textureFilter.PixelationFilter;
+import com.chillingvan.canvasgl.util.Loggers;
import com.chillingvan.canvasglsample.R;
import java.io.IOException;
+import androidx.appcompat.app.AppCompatActivity;
+
public class TextureCameraActivity extends AppCompatActivity {
private Camera mCamera;
diff --git a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/util/adapter/BaseItemView.java b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/util/adapter/BaseItemView.java
index 299fc27..71480b0 100644
--- a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/util/adapter/BaseItemView.java
+++ b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/util/adapter/BaseItemView.java
@@ -1,8 +1,9 @@
package com.chillingvan.canvasglsample.util.adapter;
-import android.support.v7.widget.RecyclerView;
import android.view.View;
+import androidx.recyclerview.widget.RecyclerView;
+
/**
* Created by Matthew on 2016/4/8.
*/
diff --git a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/util/adapter/CommonRecyclerAdapter.java b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/util/adapter/CommonRecyclerAdapter.java
index b546443..617d5ac 100644
--- a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/util/adapter/CommonRecyclerAdapter.java
+++ b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/util/adapter/CommonRecyclerAdapter.java
@@ -1,11 +1,12 @@
package com.chillingvan.canvasglsample.util.adapter;
-import android.support.v7.widget.RecyclerView;
import android.util.SparseArray;
import android.view.ViewGroup;
import java.util.List;
+import androidx.recyclerview.widget.RecyclerView;
+
/**
* Created by Matthew on 2016/4/7.
*/
diff --git a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/video/MediaPlayerActivity.java b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/video/MediaPlayerActivity.java
index 08b9c8f..50a1ad5 100644
--- a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/video/MediaPlayerActivity.java
+++ b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/video/MediaPlayerActivity.java
@@ -2,7 +2,6 @@
import android.graphics.SurfaceTexture;
import android.os.Bundle;
-import android.support.v7.app.AppCompatActivity;
import android.view.Surface;
import android.view.View;
@@ -11,6 +10,8 @@
import com.chillingvan.canvasgl.util.Loggers;
import com.chillingvan.canvasglsample.R;
+import androidx.appcompat.app.AppCompatActivity;
+
public class MediaPlayerActivity extends AppCompatActivity {
private MediaPlayerHelper mediaPlayer = new MediaPlayerHelper();
diff --git a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/video/MediaPlayerTextureView.java b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/video/MediaPlayerTextureView.java
index e7d283a..ab54109 100644
--- a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/video/MediaPlayerTextureView.java
+++ b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/video/MediaPlayerTextureView.java
@@ -2,7 +2,6 @@
import android.content.Context;
import android.graphics.SurfaceTexture;
-import android.support.annotation.Nullable;
import android.util.AttributeSet;
import com.chillingvan.canvasgl.ICanvasGL;
@@ -12,6 +11,8 @@
import com.chillingvan.canvasgl.textureFilter.BasicTextureFilter;
import com.chillingvan.canvasgl.textureFilter.TextureFilter;
+import androidx.annotation.Nullable;
+
/**
* Created by Chilling on 2017/12/16.
*/
diff --git a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/video/MergeVideoActivity.java b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/video/MergeVideoActivity.java
index 37784e4..20aa988 100644
--- a/canvasglsample/src/main/java/com/chillingvan/canvasglsample/video/MergeVideoActivity.java
+++ b/canvasglsample/src/main/java/com/chillingvan/canvasglsample/video/MergeVideoActivity.java
@@ -3,7 +3,7 @@
import android.graphics.SurfaceTexture;
import android.os.Bundle;
import android.os.Handler;
-import android.support.v7.app.AppCompatActivity;
+import androidx.appcompat.app.AppCompatActivity;
import android.view.Surface;
import android.view.View;
diff --git a/canvasglsample/src/main/res/layout/activity_draw_text.xml b/canvasglsample/src/main/res/layout/activity_draw_text.xml
index 6717392..232c192 100644
--- a/canvasglsample/src/main/res/layout/activity_draw_text.xml
+++ b/canvasglsample/src/main/res/layout/activity_draw_text.xml
@@ -1,5 +1,5 @@
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/canvasglsample/src/main/res/layout/activity_media_player.xml b/canvasglsample/src/main/res/layout/activity_media_player.xml
index 40a233d..82bec49 100644
--- a/canvasglsample/src/main/res/layout/activity_media_player.xml
+++ b/canvasglsample/src/main/res/layout/activity_media_player.xml
@@ -1,5 +1,5 @@
-
-
+
diff --git a/canvasglsample/src/main/res/layout/activity_test_matrix.xml b/canvasglsample/src/main/res/layout/activity_test_matrix.xml
index 3d95880..117b4e5 100644
--- a/canvasglsample/src/main/res/layout/activity_test_matrix.xml
+++ b/canvasglsample/src/main/res/layout/activity_test_matrix.xml
@@ -1,5 +1,5 @@
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/canvasglsample/src/main/res/layout/activity_test_matrix_surface.xml b/canvasglsample/src/main/res/layout/activity_test_matrix_surface.xml
index b9423b1..1360cb6 100644
--- a/canvasglsample/src/main/res/layout/activity_test_matrix_surface.xml
+++ b/canvasglsample/src/main/res/layout/activity_test_matrix_surface.xml
@@ -1,5 +1,5 @@
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/canvasglsample/src/main/res/layout/activity_texture_list.xml b/canvasglsample/src/main/res/layout/activity_texture_list.xml
index 46960a5..4bc6455 100644
--- a/canvasglsample/src/main/res/layout/activity_texture_list.xml
+++ b/canvasglsample/src/main/res/layout/activity_texture_list.xml
@@ -1,5 +1,5 @@
-
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/canvasglsample/src/main/res/layout/item_texture_list.xml b/canvasglsample/src/main/res/layout/item_texture_list.xml
index 95c5767..783867c 100644
--- a/canvasglsample/src/main/res/layout/item_texture_list.xml
+++ b/canvasglsample/src/main/res/layout/item_texture_list.xml
@@ -1,5 +1,5 @@
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/gradle.properties b/gradle.properties
index 48b7bf9..ef7f6ee 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -29,6 +29,8 @@
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
+android.enableJetifier=true
+android.useAndroidX=true
org.gradle.jvmargs=-Xmx1536m
# When configured, Gradle will run in incubating parallel mode.
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index a3fbdd2..e6ecedf 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip