Merge "Clear native shader when Paint shader changes" into oc-dev am: d3e78478aa

am: 4ee3fb4c54

Change-Id: I9fceeec5fd1db92c7f47f0bcde5278b0e84a6b55
This commit is contained in:
John Reck
2017-06-07 16:58:09 +00:00
committed by android-build-merger

View File

@@ -1115,6 +1115,8 @@ public class Paint {
// old shader's pointer may be reused by another shader allocation later
if (mShader != shader) {
mNativeShader = -1;
// Release any native references to the old shader content
nSetShader(mNativePaint, 0);
}
// Defer setting the shader natively until getNativeInstance() is called
mShader = shader;