DescriptionTinker 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 #Messages
Total messages: 11 (0 generated)
|