diff options
author | Björn Isaksson <bjorn.isaksson@sonymobile.com> | 2012-10-29 14:13:36 +0100 |
---|---|---|
committer | John Reck <jreck@google.com> | 2013-04-01 10:48:50 -0700 |
commit | b2e091a5ffd9e2c395084b2c0bb09a35645af3a3 (patch) | |
tree | 5b2a72d6c49c302c99a7c42aea03037b1216a3c7 | |
parent | d307f7f0361f3102cb4d3dade523484cb1463e5a (diff) | |
download | webkit-b2e091a5ffd9e2c395084b2c0bb09a35645af3a3.tar.gz |
DO NOT MERGE Fix memory leak when creating SkBitmapProcShader
cherry pick from AOSP/master
A SkShader is ref counted, but the first but unref() was
never called for the local reference in
PlatformGraphicsContextSkia::drawBitmapPattern().
Change-Id: I2d1a2e95eeaf479e332a2dbd4e1e9f1b8baac0f7
-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 cd3ef7da1..b9fc2f5cb 100644 --- a/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextSkia.cpp +++ b/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextSkia.cpp @@ -239,7 +239,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); |