Merge "libhwui: fix texture memory leak"
am: 550d46d9da
* commit '550d46d9dae8a4de5abd36a5e2d3c101135da696':
libhwui: fix texture memory leak
This commit is contained in:
@ -1699,6 +1699,7 @@ void OpenGLRenderer::drawPatch(const SkBitmap* bitmap, const Patch* mesh,
|
|||||||
|
|
||||||
Texture* texture = entry ? entry->texture : mCaches.textureCache.get(bitmap);
|
Texture* texture = entry ? entry->texture : mCaches.textureCache.get(bitmap);
|
||||||
if (!texture) return;
|
if (!texture) return;
|
||||||
|
const AutoTexture autoCleanup(texture);
|
||||||
|
|
||||||
// 9 patches are built for stretching - always filter
|
// 9 patches are built for stretching - always filter
|
||||||
int textureFillFlags = TextureFillFlags::ForceFilter;
|
int textureFillFlags = TextureFillFlags::ForceFilter;
|
||||||
|
@ -306,6 +306,10 @@ void RenderState::render(const Glop& glop) {
|
|||||||
// Shader uniforms
|
// Shader uniforms
|
||||||
SkiaShader::apply(*mCaches, fill.skiaShaderData);
|
SkiaShader::apply(*mCaches, fill.skiaShaderData);
|
||||||
|
|
||||||
|
Texture* texture = (fill.skiaShaderData.skiaShaderType & kBitmap_SkiaShaderType) ?
|
||||||
|
fill.skiaShaderData.bitmapData.bitmapTexture : nullptr;
|
||||||
|
const AutoTexture autoCleanup(texture);
|
||||||
|
|
||||||
// ------------------------------------
|
// ------------------------------------
|
||||||
// ---------- GL state setup ----------
|
// ---------- GL state setup ----------
|
||||||
// ------------------------------------
|
// ------------------------------------
|
||||||
|
Reference in New Issue
Block a user