diff options
author | Chris Craik <ccraik@google.com> | 2015-03-05 17:37:44 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-03-05 17:37:45 +0000 |
commit | a0bfb2d99f071aa42d2b04dcd77972d9a0888853 (patch) | |
tree | 84c812c50ba3ee0983306b6c2dfc5a1d2a2aac8f /graphics | |
parent | af3435481214b839fc462fcfe5e5ff378a31fb91 (diff) | |
parent | 6170cd1f351d8a8e6833137a3de8d2b949f989a3 (diff) | |
download | frameworks_base-a0bfb2d99f071aa42d2b04dcd77972d9a0888853.zip frameworks_base-a0bfb2d99f071aa42d2b04dcd77972d9a0888853.tar.gz frameworks_base-a0bfb2d99f071aa42d2b04dcd77972d9a0888853.tar.bz2 |
Merge "Fix push shader to native"
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/java/android/graphics/Paint.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/graphics/java/android/graphics/Paint.java b/graphics/java/android/graphics/Paint.java index 91c8dba..681bc62 100644 --- a/graphics/java/android/graphics/Paint.java +++ b/graphics/java/android/graphics/Paint.java @@ -534,8 +534,9 @@ public class Paint { * @hide */ public long getNativeInstance() { - if (mShader != null && mShader.getNativeInstance() != mNativeShader) { - mNativeShader = mShader.getNativeInstance(); + long newNativeShader = mShader == null ? 0 : mShader.getNativeInstance(); + if (newNativeShader != mNativeShader) { + mNativeShader = newNativeShader; native_setShader(mNativePaint, mNativeShader); } return mNativePaint; |