summaryrefslogtreecommitdiff
path: root/graphics/java/android
diff options
context:
space:
mode:
author John Reck <jreck@google.com> 2014-08-22 11:15:37 -0700
committer John Reck <jreck@google.com> 2014-08-22 11:15:37 -0700
commit01edef10b9724fa5607d7918addc31a3b0c991dc (patch)
tree93bce27d472d1d52b5629aca1a93c1adf68bf001 /graphics/java/android
parent91d065bcbfa0223d2fc2be8f3bba70a77fcb9355 (diff)
Revert immutable Shader change
Bug: 16733996 Change-Id: I51686aaf8f6ae8d0e390e298ad70f98f81c5f555
Diffstat (limited to 'graphics/java/android')
-rw-r--r--graphics/java/android/graphics/Shader.java20
1 files changed, 4 insertions, 16 deletions
diff --git a/graphics/java/android/graphics/Shader.java b/graphics/java/android/graphics/Shader.java
index 265a564ef1a5..6934955b86b6 100644
--- a/graphics/java/android/graphics/Shader.java
+++ b/graphics/java/android/graphics/Shader.java
@@ -28,8 +28,6 @@ public class Shader {
*/
private long native_instance;
- private long native_with_local_matrix;
-
/**
* Initialization step that should be called by subclasses in their
* constructors. Calling again may result in memory leaks.
@@ -80,24 +78,18 @@ public class Shader {
* Set the shader's local matrix. Passing null will reset the shader's
* matrix to identity.
*
- * Starting with {@link android.os.Build.VERSION_CODES#L}, this does not
- * modify any Paints which use this Shader. In order to modify the Paint,
- * you need to call {@link Paint#setShader} again. Further, any {@link ComposeShader}s
- * created with this Shader will be unaffected.
- *
* @param localM The shader's new local matrix, or null to specify identity
*/
public void setLocalMatrix(Matrix localM) {
mLocalMatrix = localM;
- native_with_local_matrix = nativeSetLocalMatrix(native_instance,
- native_with_local_matrix, localM == null ? 0 : localM.native_instance);
+ nativeSetLocalMatrix(native_instance, localM == null ? 0 : localM.native_instance);
}
protected void finalize() throws Throwable {
try {
super.finalize();
} finally {
- nativeDestructor(native_instance, native_with_local_matrix);
+ nativeDestructor(native_instance);
}
}
@@ -124,13 +116,9 @@ public class Shader {
}
/* package */ long getNativeInstance() {
- if (native_with_local_matrix != 0) {
- return native_with_local_matrix;
- }
return native_instance;
}
- private static native void nativeDestructor(long native_shader, long native_with_local_matrix);
- private static native long nativeSetLocalMatrix(long native_shader,
- long native_with_local_matrix, long matrix_instance);
+ private static native void nativeDestructor(long native_shader);
+ private static native void nativeSetLocalMatrix(long native_shader, long matrix_instance);
}