diff options
| author | Romain Guy <romainguy@google.com> | 2010-07-15 14:45:37 -0700 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-07-15 14:45:37 -0700 |
| commit | c96cdc9844d60d54683fb7700fc5908fdb8ff856 (patch) | |
| tree | 2184b07adc8e48adcd5023dd17d8d14c65ee1073 /graphics | |
| parent | 4911b783aa9f4af5ac919db861751d350471f5ef (diff) | |
| parent | d27977d1a91d5a6b3cc9fa7664ac7e835e7bd895 (diff) | |
| download | frameworks_base-c96cdc9844d60d54683fb7700fc5908fdb8ff856.zip frameworks_base-c96cdc9844d60d54683fb7700fc5908fdb8ff856.tar.gz frameworks_base-c96cdc9844d60d54683fb7700fc5908fdb8ff856.tar.bz2 | |
Merge "Add support for BitmapShader."
Diffstat (limited to 'graphics')
| -rw-r--r-- | graphics/java/android/graphics/Shader.java | 19 |
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); } |
