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

Issue 300553003: Implement sk_atomic_conditional_inc with sk_atomic_cas. (Closed)

Created:
6 years, 7 months ago by mtklein_C
Modified:
6 years, 7 months ago
CC:
skia-review_googlegroups.com
Base URL:
https://skia.googlesource.com/skia.git@master
Visibility:
Public.

Description

Implement sk_atomic_conditional_inc with sk_atomic_cas. Now that we have sk_atomic_cas, we can replace all the platform-specific CAS loops with one. BUG=skia: Committed: http://code.google.com/p/skia/source/detail?r=14892

Patch Set 1 #

Patch Set 2 : 0 == prev #

Patch Set 3 : just the cas loop #

Patch Set 4 : typos #

Patch Set 5 : fmt #

Total comments: 5

Patch Set 6 : inline #

Unified diffs Side-by-side diffs Delta from patch set Stats (+15 lines, -59 lines) Patch
M include/core/SkThread.h View 1 2 3 4 5 2 chunks +15 lines, -6 lines 0 comments Download
M src/ports/SkAtomics_android.h View 1 2 1 chunk +0 lines, -12 lines 0 comments Download
M src/ports/SkAtomics_none.h View 1 2 1 chunk +0 lines, -6 lines 0 comments Download
M src/ports/SkAtomics_sync.h View 1 2 1 chunk +0 lines, -18 lines 0 comments Download
M src/ports/SkAtomics_win.h View 1 2 1 chunk +0 lines, -17 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
mtklein
6 years, 7 months ago (2014-05-27 12:38:23 UTC) #1
bungeman-skia
I agree that this is a good idea since it's the one non-trivial atomic needed ...
6 years, 7 months ago (2014-05-27 14:20:19 UTC) #2
mtklein
https://codereview.chromium.org/300553003/diff/80001/include/core/SkThread.h File include/core/SkThread.h (right): https://codereview.chromium.org/300553003/diff/80001/include/core/SkThread.h#newcode55 include/core/SkThread.h:55: prev = *addr; On 2014/05/27 14:20:20, bungeman1 wrote: > ...
6 years, 7 months ago (2014-05-27 14:27:26 UTC) #3
mtklein
+reed for include/core. No real API change.
6 years, 7 months ago (2014-05-27 14:27:51 UTC) #4
reed1
https://codereview.chromium.org/300553003/diff/80001/include/core/SkThread.h File include/core/SkThread.h (right): https://codereview.chromium.org/300553003/diff/80001/include/core/SkThread.h#newcode56 include/core/SkThread.h:56: if (0 == prev) { Why the test/break? Does ...
6 years, 7 months ago (2014-05-27 14:36:18 UTC) #5
mtklein
https://codereview.chromium.org/300553003/diff/80001/include/core/SkThread.h File include/core/SkThread.h (right): https://codereview.chromium.org/300553003/diff/80001/include/core/SkThread.h#newcode56 include/core/SkThread.h:56: if (0 == prev) { On 2014/05/27 14:36:18, reed1 ...
6 years, 7 months ago (2014-05-27 14:38:29 UTC) #6
reed1
lgtm https://codereview.chromium.org/300553003/diff/80001/include/core/SkThread.h File include/core/SkThread.h (right): https://codereview.chromium.org/300553003/diff/80001/include/core/SkThread.h#newcode56 include/core/SkThread.h:56: if (0 == prev) { On 2014/05/27 14:38:30, ...
6 years, 7 months ago (2014-05-27 14:44:18 UTC) #7
mtklein
The CQ bit was checked by mtklein@google.com
6 years, 7 months ago (2014-05-27 14:49:34 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/mtklein@chromium.org/300553003/80001
6 years, 7 months ago (2014-05-27 14:49:48 UTC) #9
mtklein
The CQ bit was checked by mtklein@google.com
6 years, 7 months ago (2014-05-27 14:54:55 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/300553003/100001
6 years, 7 months ago (2014-05-27 14:55:02 UTC) #11
commit-bot: I haz the power
6 years, 7 months ago (2014-05-27 15:00:35 UTC) #12
Message was sent while issue was closed.
Change committed as 14892

Powered by Google App Engine
This is Rietveld 408576698