Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(112)

Issue 240303003: Fix memory leak in SkGradientShader. (Closed)

Created:
6 years, 8 months ago by Dominik Grewe
Modified:
6 years, 8 months ago
Reviewers:
scroggo, reed1
CC:
skia-review_googlegroups.com
Base URL:
https://skia.googlesource.com/skia.git@master
Visibility:
Public.

Description

Fix memory leak in SkGradientShader. Make sure pointer to gradient shader cache is unreffed in SkGradientShaderBase::getGradientTableBitmap. Rename methods returning a "pre-reffed" object to indicate obligations. BUG=skia:1976 Committed: http://code.google.com/p/skia/source/detail?r=14223

Patch Set 1 #

Patch Set 2 : getCache -> refCache; buildBitmapShader -> refBitmapShader #

Unified diffs Side-by-side diffs Delta from patch set Stats (+12 lines, -17 lines) Patch
M src/core/SkPictureShader.h View 1 1 chunk +1 line, -1 line 0 comments Download
M src/core/SkPictureShader.cpp View 1 4 chunks +7 lines, -12 lines 0 comments Download
M src/effects/gradients/SkGradientShader.cpp View 1 3 chunks +3 lines, -3 lines 0 comments Download
M src/effects/gradients/SkGradientShaderPriv.h View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 9 (0 generated)
Dominik Grewe
PTAL
6 years, 8 months ago (2014-04-16 14:29:39 UTC) #1
reed1
if getCache() always calls ref, perhaps we should rename it to refCache(), to make this ...
6 years, 8 months ago (2014-04-16 14:42:15 UTC) #2
Dominik Grewe
On 2014/04/16 14:42:15, reed1 wrote: > if getCache() always calls ref, perhaps we should rename ...
6 years, 8 months ago (2014-04-16 14:53:02 UTC) #3
scroggo
On 2014/04/16 14:53:02, Dominik Grewe wrote: > On 2014/04/16 14:42:15, reed1 wrote: > > if ...
6 years, 8 months ago (2014-04-16 15:13:10 UTC) #4
reed1
lgtm
6 years, 8 months ago (2014-04-16 15:47:42 UTC) #5
Dominik Grewe
The CQ bit was checked by dominikg@chromium.org
6 years, 8 months ago (2014-04-16 15:57:10 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/dominikg@chromium.org/240303003/20001
6 years, 8 months ago (2014-04-16 15:57:26 UTC) #7
commit-bot: I haz the power
Change committed as 14223
6 years, 8 months ago (2014-04-16 16:17:44 UTC) #8
bungeman-skia
6 years, 8 months ago (2014-04-17 21:01:27 UTC) #9
Message was sent while issue was closed.
A revert of this CL has been created in
https://codereview.chromium.org/241603002/ by bungeman@google.com.

The reason for reverting is: This and https://codereview.chromium.org/207683004
are causing memory leaks..

Powered by Google App Engine
This is Rietveld 408576698