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

Issue 298393005: Tinker with SkLazyFnPtr a bit. (Closed)

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

Description

Tinker with SkLazyFnPtr a bit. I moved the choice function from a get() arg to a template parameter. I think this removes some of the overemphasis on "choose" from the call site, making it a bit more clear it's normally very cheap. It's also now more in line with what I'm thinking now for the general SkLazyPtr<T>, which needs a "create" parameter just like SkLazyFnPtr's "choose", but also a "destroy" that it might use both in .get() but also at process exit. That "destroy" needs to be made part of the type to be called at exit, so might as well make "create" and "choose" template parameters too so it's all consistent. Also, add (C). BUG=skia: Committed: http://code.google.com/p/skia/source/detail?r=14971

Patch Set 1 #

Patch Set 2 : operator F #

Patch Set 3 : Zero-initialization, and put get() back. #

Patch Set 4 : .get() #

Patch Set 5 : drop returns #

Patch Set 6 : namespace #

Unified diffs Side-by-side diffs Delta from patch set Stats (+38 lines, -23 lines) Patch
M src/core/SkLazyFnPtr.h View 1 2 3 6 chunks +17 lines, -8 lines 0 comments Download
M src/core/SkUtils.cpp View 1 2 3 4 5 1 chunk +21 lines, -15 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
mtklein
6 years, 6 months ago (2014-05-29 02:46:45 UTC) #1
mtklein
OK, PTAL.
6 years, 6 months ago (2014-05-29 17:34:31 UTC) #2
bungeman-skia
lgtm
6 years, 6 months ago (2014-05-29 17:47:39 UTC) #3
mtklein
The CQ bit was checked by mtklein@google.com
6 years, 6 months ago (2014-05-29 18:04:13 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/mtklein@chromium.org/298393005/80001
6 years, 6 months ago (2014-05-29 18:05:21 UTC) #5
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 18:08:10 UTC) #6
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-05-29 18:11:01 UTC) #7
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/2562)
6 years, 6 months ago (2014-05-29 18:11:01 UTC) #8
mtklein
The CQ bit was checked by mtklein@google.com
6 years, 6 months ago (2014-05-29 18:23:28 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/mtklein@chromium.org/298393005/100001
6 years, 6 months ago (2014-05-29 18:24:35 UTC) #10
commit-bot: I haz the power
6 years, 6 months ago (2014-05-29 18:29:59 UTC) #11
Message was sent while issue was closed.
Change committed as 14971

Powered by Google App Engine
This is Rietveld 408576698