summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjörn Isaksson <bjorn.isaksson@sonymobile.com>2012-10-29 14:13:36 +0100
committerJohan Redestig <johan.redestig@sonymobile.com>2013-03-28 12:55:40 +0100
commitbb73be040ccaedc1ac5da830ed32eaa80b5bd119 (patch)
treed02942a3429bd996033a2a54b3259ad1145008c9
parent30ca089e04a091c4eea95d62185d120a61f0e0ba (diff)
downloadwebkit-bb73be040ccaedc1ac5da830ed32eaa80b5bd119.tar.gz
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 fcd9adee9..915970bec 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);