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

Issue 378643003: Remove ability for Release code to call getRefCnt() or getWeakRefCnt(). (Closed)

Created:
6 years, 5 months ago by mtklein_C
Modified:
6 years, 5 months ago
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Project:
skia
Visibility:
Public.

Description

Remove ability for Release code to call getRefCnt() or getWeakRefCnt(). These getRefCnt() methods are not thread safe, so Skia code should not be calling them. unique() is fine. SkDEBUG code (SkASSERTs) can still call getRefCnt() / getWeakRefCnt(). This adds tools/RefCntIs.{h,cpp}, which lets tests make their assertions in both debug and release modes. BUG=skia:2726 Committed: https://skia.googlesource.com/skia/+/4ae94ffce5ecf1b71cb5e295b68bf4ec9e697443 Committed: https://skia.googlesource.com/skia/+/bd7746da97e389c1068333117407b213b378f9db

Patch Set 1 #

Total comments: 3

Patch Set 2 : use unique() #

Patch Set 3 : update #

Patch Set 4 : remove suppression #

Total comments: 1

Patch Set 5 : Just SkImageFilter changes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+9 lines, -5 lines) Patch
M include/core/SkImageFilter.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M src/core/SkImageFilter.cpp View 1 2 3 4 2 chunks +8 lines, -2 lines 0 comments Download
M tools/tsan.supp View 1 2 3 4 1 chunk +0 lines, -3 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
mtklein
6 years, 5 months ago (2014-07-07 21:02:43 UTC) #1
Stephen White
https://codereview.chromium.org/378643003/diff/1/src/core/SkImageFilter.cpp File src/core/SkImageFilter.cpp (right): https://codereview.chromium.org/378643003/diff/1/src/core/SkImageFilter.cpp#newcode427 src/core/SkImageFilter.cpp:427: //if (key->getRefCnt() >= fMinChildren) { I would ask that ...
6 years, 5 months ago (2014-07-07 21:10:27 UTC) #2
reed1
https://codereview.chromium.org/378643003/diff/1/src/core/SkImageFilter.cpp File src/core/SkImageFilter.cpp (right): https://codereview.chromium.org/378643003/diff/1/src/core/SkImageFilter.cpp#newcode427 src/core/SkImageFilter.cpp:427: //if (key->getRefCnt() >= fMinChildren) { On 2014/07/07 21:10:27, Stephen ...
6 years, 5 months ago (2014-07-07 21:12:54 UTC) #3
mtklein
https://codereview.chromium.org/378643003/diff/1/src/core/SkImageFilter.cpp File src/core/SkImageFilter.cpp (right): https://codereview.chromium.org/378643003/diff/1/src/core/SkImageFilter.cpp#newcode427 src/core/SkImageFilter.cpp:427: //if (key->getRefCnt() >= fMinChildren) { So, would something like ...
6 years, 5 months ago (2014-07-07 22:25:23 UTC) #4
Stephen White
On 2014/07/07 22:25:23, mtklein wrote: > https://codereview.chromium.org/378643003/diff/1/src/core/SkImageFilter.cpp > File src/core/SkImageFilter.cpp (right): > > https://codereview.chromium.org/378643003/diff/1/src/core/SkImageFilter.cpp#newcode427 > ...
6 years, 5 months ago (2014-07-08 00:47:26 UTC) #5
mtklein
On 2014/07/08 00:47:26, Stephen White wrote: > On 2014/07/07 22:25:23, mtklein wrote: > > https://codereview.chromium.org/378643003/diff/1/src/core/SkImageFilter.cpp ...
6 years, 5 months ago (2014-07-08 01:12:53 UTC) #6
Stephen White
On 2014/07/08 01:12:53, mtklein wrote: > On 2014/07/08 00:47:26, Stephen White wrote: > > On ...
6 years, 5 months ago (2014-07-08 02:31:50 UTC) #7
mtklein
Have a look Mike?
6 years, 5 months ago (2014-07-08 11:48:26 UTC) #8
reed1
lgtm https://codereview.chromium.org/378643003/diff/60001/tools/RefCntIs.h File tools/RefCntIs.h (right): https://codereview.chromium.org/378643003/diff/60001/tools/RefCntIs.h#newcode10 tools/RefCntIs.h:10: bool RefCntIs(const SkRefCntBase&, int32_t); Seems out of place ...
6 years, 5 months ago (2014-07-08 13:10:56 UTC) #9
mtklein
The CQ bit was checked by mtklein@google.com
6 years, 5 months ago (2014-07-08 13:17:54 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/mtklein@chromium.org/378643003/60001
6 years, 5 months ago (2014-07-08 13:18:11 UTC) #11
commit-bot: I haz the power
Change committed as 4ae94ffce5ecf1b71cb5e295b68bf4ec9e697443
6 years, 5 months ago (2014-07-08 13:48:24 UTC) #12
mtklein
A revert of this CL has been created in https://codereview.chromium.org/380703002/ by mtklein@google.com. The reason for ...
6 years, 5 months ago (2014-07-09 12:58:01 UTC) #13
mtklein
Going to reland just the SkImageFilter changes for now, then follow up hiding getRefCnt().
6 years, 5 months ago (2014-07-09 14:30:41 UTC) #14
mtklein
The CQ bit was checked by mtklein@google.com
6 years, 5 months ago (2014-07-09 14:30:55 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/mtklein@chromium.org/378643003/80001
6 years, 5 months ago (2014-07-09 14:32:00 UTC) #16
commit-bot: I haz the power
6 years, 5 months ago (2014-07-09 14:52:37 UTC) #17
Message was sent while issue was closed.
Change committed as bd7746da97e389c1068333117407b213b378f9db

Powered by Google App Engine
This is Rietveld 408576698