Fix SkShader leak for Gradient VectorDrawable and test
This CL fixes a SkShader leak in VD when applying local matrix to the shader. Specifically, the usage of newWithLocalMatrix(...) increments the shader's ref count in every draw() call for Gradient VectorDrawable, whereas there's no balancing call to decrement the ref count in draw(). In this CL, we assume the ownership of the shader returned from newWithLocalMatrix(...) to ensure the correct ref count management. Also, add test to verify that shader is no longer being leaked BUG: 32067647 Test: this CL Change-Id: Ic15fe46cde06a73d81b44e2d3c56b51907344cc0
Loading
Please register or sign in to comment