commit | b2e091a5ffd9e2c395084b2c0bb09a35645af3a3 | [log] [tgz] |
---|---|---|
author | Björn Isaksson <bjorn.isaksson@sonymobile.com> | Mon Oct 29 14:13:36 2012 +0100 |
committer | John Reck <jreck@google.com> | Mon Apr 01 10:48:50 2013 -0700 |
tree | 5b2a72d6c49c302c99a7c42aea03037b1216a3c7 | |
parent | d307f7f0361f3102cb4d3dade523484cb1463e5a [diff] |
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
diff --git a/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextSkia.cpp b/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextSkia.cpp index cd3ef7d..b9fc2f5 100644 --- a/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextSkia.cpp +++ b/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextSkia.cpp
@@ -239,7 +239,7 @@ SkPaint paint; setupPaintCommon(&paint); paint.setAlpha(getNormalizedAlpha()); - paint.setShader(shader); + paint.setShader(shader)->unref(); paint.setXfermodeMode(WebCoreCompositeToSkiaComposite(compositeOp)); fixPaintForBitmapsThatMaySeam(&paint); mCanvas->drawRect(destRect, paint);