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

Issue 306943003: SkLazyPtr, mk. 2 (Closed)

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

Description

SkLazyPtr, mk. 2 SK_DECLARE_STATIC_LAZY_PTR and SK_DECLARE_STATIC_LAZY_PTR_ARRAY let you declare a single or array of static pointers that are lazily initialized. You can think of this as a restricted, lighter-weight version of SkOnce. There's no guarantee that Create will be called exactly once, but we do guarantee all threads will agree on the resulting pointer. We'll clean up any other extra pointers we Create()ed by calling Destroy(), which defaults to SkDELETE. In debug mode, we also clean up the winning pointer at process exit, so we can make sure we didn't leak it or free it early. I've ported SkData (singleton) and SkXfermode (array) as examples. Once this lands I'll port most other users of SkOnce. BUG=skia: Committed: http://code.google.com/p/skia/source/detail?r=14976

Patch Set 1 #

Patch Set 2 : comments #

Patch Set 3 : delete SkData #

Patch Set 4 : namespace #

Patch Set 5 : drop static #

Unified diffs Side-by-side diffs Delta from patch set Stats (+165 lines, -43 lines) Patch
M include/core/SkData.h View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M include/core/SkXfermode.h View 1 chunk +0 lines, -3 lines 0 comments Download
M src/core/SkData.cpp View 1 2 2 chunks +7 lines, -11 lines 0 comments Download
M src/core/SkGraphics.cpp View 1 chunk +0 lines, -1 line 0 comments Download
A src/core/SkLazyPtr.h View 1 2 3 4 1 chunk +143 lines, -0 lines 0 comments Download
M src/core/SkThreadPriv.h View 1 chunk +1 line, -1 line 0 comments Download
M src/core/SkXfermode.cpp View 1 2 3 3 chunks +12 lines, -26 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
mtklein
6 years, 6 months ago (2014-05-29 18:59:01 UTC) #1
bungeman-skia
lgtm
6 years, 6 months ago (2014-05-29 19:23:11 UTC) #2
mtklein
On 2014/05/29 19:23:11, bungeman1 wrote: > lgtm +reed for include/
6 years, 6 months ago (2014-05-29 19:23:39 UTC) #3
mtklein
+reed for include/ for real
6 years, 6 months ago (2014-05-29 19:23:54 UTC) #4
reed1
lgtm
6 years, 6 months ago (2014-05-29 19:34:43 UTC) #5
mtklein
The CQ bit was checked by mtklein@google.com
6 years, 6 months ago (2014-05-29 19:37:40 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/mtklein@chromium.org/306943003/40001
6 years, 6 months ago (2014-05-29 19:39:23 UTC) #7
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: Build-Ubuntu13.10-GCC4.8-x86_64-Release-Trybot on tryserver.chromium ...
6 years, 6 months ago (2014-05-29 19:43:32 UTC) #8
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-05-29 19:46:39 UTC) #9
commit-bot: I haz the power
Try jobs failed on following builders: Build-Ubuntu13.10-GCC4.8-x86_64-Release-Trybot on tryserver.chromium (http://108.170.220.76:10117/builders/Build-Ubuntu13.10-GCC4.8-x86_64-Release-Trybot/builds/2569)
6 years, 6 months ago (2014-05-29 19:46:40 UTC) #10
mtklein
The CQ bit was checked by mtklein@google.com
6 years, 6 months ago (2014-05-29 19:58:37 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/mtklein@chromium.org/306943003/60001
6 years, 6 months ago (2014-05-29 19:59:59 UTC) #12
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: Build-Ubuntu13.10-GCC4.8-x86_64-Release-Trybot on tryserver.chromium ...
6 years, 6 months ago (2014-05-29 20:03:07 UTC) #13
mtklein
The CQ bit was checked by mtklein@google.com
6 years, 6 months ago (2014-05-29 20:03:08 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/mtklein@chromium.org/306943003/70008
6 years, 6 months ago (2014-05-29 20:03:50 UTC) #15
commit-bot: I haz the power
6 years, 6 months ago (2014-05-29 20:13:27 UTC) #16
Message was sent while issue was closed.
Change committed as 14976

Powered by Google App Engine
This is Rietveld 408576698