diff options
author | Doris Liu <tianliu@google.com> | 2016-10-10 15:50:01 -0700 |
---|---|---|
committer | Doris Liu <tianliu@google.com> | 2016-10-12 01:22:11 +0000 |
commit | fc9cf72339c7ce61adb11ceb3b247f112577fb6b (patch) | |
tree | 3ba78d43724d731fe47fbda1c0b2fbd3db27129e /libs/androidfw/AssetManager.cpp | |
parent | 6c816c6707a5539a7a951617a8b621887c36eb38 (diff) |
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
Diffstat (limited to 'libs/androidfw/AssetManager.cpp')
0 files changed, 0 insertions, 0 deletions