summaryrefslogtreecommitdiffstats
path: root/graphics/java/android/graphics/Shader.java
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/java/android/graphics/Shader.java')
-rw-r--r--graphics/java/android/graphics/Shader.java19
1 files changed, 15 insertions, 4 deletions
diff --git a/graphics/java/android/graphics/Shader.java b/graphics/java/android/graphics/Shader.java
index ae0304e..03eb55b 100644
--- a/graphics/java/android/graphics/Shader.java
+++ b/graphics/java/android/graphics/Shader.java
@@ -23,9 +23,19 @@ package android.graphics;
* drawn with that paint will get its color(s) from the shader.
*/
public class Shader {
+ /**
+ * Local matrix native instance.
+ *
+ * @hide
+ */
+ public int mLocalMatrix;
- // this is set by subclasses, but don't make it public
- /* package */ int native_instance;
+ /**
+ * This is set by subclasses, but don't make it public.
+ *
+ * @hide
+ */
+ public int native_instance;
public enum TileMode {
/**
@@ -64,11 +74,12 @@ public class Shader {
* @param localM The shader's new local matrix, or null to specify identity
*/
public void setLocalMatrix(Matrix localM) {
- nativeSetLocalMatrix(native_instance,
- localM != null ? localM.native_instance : 0);
+ mLocalMatrix = localM != null ? localM.native_instance : 0;
+ nativeSetLocalMatrix(native_instance, mLocalMatrix);
}
protected void finalize() throws Throwable {
+ super.finalize();
nativeDestructor(native_instance);
}