summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Isaksson <bjorn.isaksson@sonymobile.com>2012-10-29 14:13:36 +0100
committerLorD ClockaN <davor@losinj.com>2013-03-30 19:08:02 +0100
commit25c2cc29cfdd5e0c438bd5387f338d72ba446a5f (patch)
tree5c93eced7da9a787b58431f04ac73b95f61ffee2
parent6d89cd5a29bb59264bb009d24b27e98e003381d7 (diff)
downloadexternal_webkit-25c2cc29cfdd5e0c438bd5387f338d72ba446a5f.zip
external_webkit-25c2cc29cfdd5e0c438bd5387f338d72ba446a5f.tar.gz
external_webkit-25c2cc29cfdd5e0c438bd5387f338d72ba446a5f.tar.bz2
Fix memory leak when creating SkBitmapProcShader
A SkShader is ref counted, but the first but unref() was never called for the local reference in PlatformGraphicsContextSkia::drawBitmapPattern(). Change-Id: Ia1936d62f052f9440ef0316cc642b0aebd79cfe1
-rw-r--r--Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextSkia.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextSkia.cpp b/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextSkia.cpp
index fcd9ade..915970b 100644
--- a/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextSkia.cpp
+++ b/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextSkia.cpp
@@ -238,7 +238,7 @@ void PlatformGraphicsContextSkia::drawBitmapPattern(
SkPaint paint;
setupPaintCommon(&paint);
paint.setAlpha(getNormalizedAlpha());
- paint.setShader(shader);
+ paint.setShader(shader)->unref();
paint.setXfermodeMode(WebCoreCompositeToSkiaComposite(compositeOp));
fixPaintForBitmapsThatMaySeam(&paint);
mCanvas->drawRect(destRect, paint);