Skip to content
This repository has been archived by the owner on Jul 30, 2022. It is now read-only.

Commit

Permalink
DO NOT MERGE Fix memory leak when creating SkBitmapProcShader
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Björn Isaksson authored and jreck committed Apr 1, 2013
1 parent d307f7f commit b2e091a
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -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);
Expand Down

0 comments on commit b2e091a

Please sign in to comment.