diff options
author | Björn Isaksson <bjorn.isaksson@sonymobile.com> | 2012-10-29 14:13:36 +0100 |
---|---|---|
committer | LorD ClockaN <davor@losinj.com> | 2013-03-30 19:08:02 +0100 |
commit | 25c2cc29cfdd5e0c438bd5387f338d72ba446a5f (patch) | |
tree | 5c93eced7da9a787b58431f04ac73b95f61ffee2 | |
parent | 6d89cd5a29bb59264bb009d24b27e98e003381d7 (diff) | |
download | external_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.cpp | 2 |
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); |