From 16ea8d373b03b1e115dd505af70dbee4e3a3a182 Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Fri, 21 Jun 2013 11:35:52 -0700 Subject: [PATCH] Refcount the paint used by Canvas.drawPatch() Prevents crashes :) Change-Id: I62103ce97490613142321f080b82c2edaed67a95 --- libs/hwui/DisplayListRenderer.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/libs/hwui/DisplayListRenderer.cpp b/libs/hwui/DisplayListRenderer.cpp index 41b1507f144be..5d23e1d574f7d 100644 --- a/libs/hwui/DisplayListRenderer.cpp +++ b/libs/hwui/DisplayListRenderer.cpp @@ -318,6 +318,7 @@ status_t DisplayListRenderer::drawBitmapMesh(SkBitmap* bitmap, int meshWidth, in status_t DisplayListRenderer::drawPatch(SkBitmap* bitmap, Res_png_9patch* patch, float left, float top, float right, float bottom, SkPaint* paint) { bitmap = refBitmap(bitmap); + paint = refPaint(paint); addDrawOp(new (alloc()) DrawPatchOp(bitmap, patch, left, top, right, bottom, paint)); return DrawGlInfo::kStatusDone;