Add support for skew()
Change-Id: Ia3a9a867f74fd78b61f75179e3788fdc2f0cacd0
diff --git a/core/java/android/view/GLES20Canvas.java b/core/java/android/view/GLES20Canvas.java
index 5fac525..99b686e 100644
--- a/core/java/android/view/GLES20Canvas.java
+++ b/core/java/android/view/GLES20Canvas.java
@@ -374,16 +374,18 @@
@Override
public void translate(float dx, float dy) {
- nTranslate(mRenderer, dx, dy);
+ if (dx != 0.0f || dy != 0.0f) nTranslate(mRenderer, dx, dy);
}
private native void nTranslate(int renderer, float dx, float dy);
@Override
public void skew(float sx, float sy) {
- throw new UnsupportedOperationException();
+ nSkew(mRenderer, sx, sy);
}
+ private native void nSkew(int renderer, float sx, float sy);
+
@Override
public void rotate(float degrees) {
nRotate(mRenderer, degrees);