summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2015-03-05 09:32:19 -0800
committerChris Craik <ccraik@google.com>2015-03-05 09:32:19 -0800
commit6170cd1f351d8a8e6833137a3de8d2b949f989a3 (patch)
treef75594d3e6193b0cc2f18bf60b9cc7597d9d462d /graphics
parent8820fd1d82acaefda98ae73ccf61413d5044f9f3 (diff)
downloadframeworks_base-6170cd1f351d8a8e6833137a3de8d2b949f989a3.zip
frameworks_base-6170cd1f351d8a8e6833137a3de8d2b949f989a3.tar.gz
frameworks_base-6170cd1f351d8a8e6833137a3de8d2b949f989a3.tar.bz2
Fix push shader to native
bug:19586908 Change-Id: Ie6205bc76667222f2df2da60a27244988f3a2b3b
Diffstat (limited to 'graphics')
-rw-r--r--graphics/java/android/graphics/Paint.java5
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;