Merge "Clear native shader when Paint shader changes" into oc-dev
am: d3e78478aa
Change-Id: I7d96db34b1894e1064116b830a8fb159ad4c57b0
This commit is contained in:
@@ -1115,6 +1115,8 @@ public class Paint {
|
|||||||
// old shader's pointer may be reused by another shader allocation later
|
// old shader's pointer may be reused by another shader allocation later
|
||||||
if (mShader != shader) {
|
if (mShader != shader) {
|
||||||
mNativeShader = -1;
|
mNativeShader = -1;
|
||||||
|
// Release any native references to the old shader content
|
||||||
|
nSetShader(mNativePaint, 0);
|
||||||
}
|
}
|
||||||
// Defer setting the shader natively until getNativeInstance() is called
|
// Defer setting the shader natively until getNativeInstance() is called
|
||||||
mShader = shader;
|
mShader = shader;
|
||||||
|
|||||||
Reference in New Issue
Block a user