Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge commit '64e071f'

  • Loading branch information...
commit febdf4900b437b2069661fd371d5469196e26f18 2 parents 596ffb4 + 64e071f
@pboos pboos authored
View
2  library/pom.xml
@@ -9,7 +9,7 @@
<parent>
<groupId>jp.co.cyberagent.android.gpuimage</groupId>
<artifactId>gpuimage-parent</artifactId>
- <version>1.1.0</version>
+ <version>1.1.1</version>
</parent>
<dependencies>
View
11 library/src/jp/co/cyberagent/android/gpuimage/GPUImageFilterGroup.java
@@ -17,6 +17,7 @@
package jp.co.cyberagent.android.gpuimage;
import android.opengl.GLES20;
+import jp.co.cyberagent.android.gpuimage.util.TextureRotationUtil;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
@@ -38,6 +39,7 @@
private final FloatBuffer mGLCubeBuffer;
private final FloatBuffer mGLTextureBuffer;
+ private final FloatBuffer mGLTextureFlipBuffer;
/**
* Instantiates a new GPUImageFilterGroup with the given filters.
@@ -55,6 +57,12 @@ public GPUImageFilterGroup(final List<GPUImageFilter> filters) {
.order(ByteOrder.nativeOrder())
.asFloatBuffer();
mGLTextureBuffer.put(TEXTURE_NO_ROTATION).position(0);
+
+ float[] flipTexture = TextureRotationUtil.getRotation(Rotation.NORMAL, false, true);
+ mGLTextureFlipBuffer = ByteBuffer.allocateDirect(flipTexture.length * 4)
+ .order(ByteOrder.nativeOrder())
+ .asFloatBuffer();
+ mGLTextureFlipBuffer.put(flipTexture).position(0);
}
/*
@@ -151,7 +159,8 @@ public void onDraw(final int textureId, final FloatBuffer cubeBuffer,
GPUImageFilter filter = mFilters.get(i);
GLES20.glBindFramebuffer(GLES20.GL_FRAMEBUFFER, mFrameBuffers[i]);
GLES20.glClearColor(0, 0, 0, 1);
- filter.onDraw(previousTexture, mGLCubeBuffer, mGLTextureBuffer);
+ filter.onDraw(previousTexture, mGLCubeBuffer,
+ (i == 0 && mFilters.size() % 2 == 0) ? mGLTextureFlipBuffer : mGLTextureBuffer);
GLES20.glBindFramebuffer(GLES20.GL_FRAMEBUFFER, 0);
previousTexture = mFrameBufferTextures[i];
}
View
6 library/src/jp/co/cyberagent/android/gpuimage/GPUImageRenderer.java
@@ -303,12 +303,6 @@ public void setRotation(final Rotation rotation, final boolean flipHorizontal,
mRotation = rotation;
mFlipHorizontal = flipHorizontal;
mFlipVertical = flipVertical;
-
- float[] rotatedTex = TextureRotationUtil.getRotation(rotation, flipHorizontal, flipVertical);
-
- mGLTextureBuffer.clear();
- mGLTextureBuffer.put(rotatedTex).position(0);
-
adjustImageScaling();
}
View
4 pom.xml
@@ -10,7 +10,7 @@
<groupId>jp.co.cyberagent.android.gpuimage</groupId>
<artifactId>gpuimage-parent</artifactId>
- <version>1.1.0</version>
+ <version>1.1.1</version>
<packaging>pom</packaging>
<name>GPUImage for Android</name>
<description>Image filters for Android with OpenGL (based on GPUImage for iOS)</description>
@@ -25,7 +25,7 @@
<url>git@github.com:CyberAgent/android-gpuimage.git</url>
<connection>scm:git:git@github.com:CyberAgent/android-gpuimage.git</connection>
<developerConnection>scm:git:git@github.com:CyberAgent/android-gpuimage.git</developerConnection>
- <tag>v1.1.0</tag>
+ <tag>v1.1.1</tag>
</scm>
<developers>
<developer>
View
2  sample/pom.xml
@@ -10,7 +10,7 @@
<parent>
<groupId>jp.co.cyberagent.android.gpuimage</groupId>
<artifactId>gpuimage-parent</artifactId>
- <version>1.1.0</version>
+ <version>1.1.1</version>
</parent>
<dependencies>
Please sign in to comment.
Something went wrong with that request. Please try again.