diff options
author | fmalita <fmalita@chromium.org> | 2016-01-12 07:21:11 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-01-12 07:21:11 -0800 |
commit | 32cdc32522bf39a8236880f57ff4ee5b26bdd363 (patch) | |
tree | 4dc6f63fe1c65ae124985be47c79b57d116d2e88 /include/core/SkTLazy.h | |
parent | a51e7782b2e028a38712a159c412e6151eca1666 (diff) |
SkTCopyOnFirstWrite-based SkPaintFilterCanvas API
I find this version preferable because
1) it consolidates the in/out paint args without compromising
efficiency or flexibility
2) relieves overriders from having to set the SkTLazy explicitly
BUG=skia:4782
R=mtklein@google.com,reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1576183002
Review URL: https://codereview.chromium.org/1576183002
Diffstat (limited to 'include/core/SkTLazy.h')
-rw-r--r-- | include/core/SkTLazy.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/core/SkTLazy.h b/include/core/SkTLazy.h index c8ae3178f7..8032538c44 100644 --- a/include/core/SkTLazy.h +++ b/include/core/SkTLazy.h @@ -131,6 +131,8 @@ class SkTCopyOnFirstWrite { public: SkTCopyOnFirstWrite(const T& initial) : fObj(&initial) {} + SkTCopyOnFirstWrite(const T* initial) : fObj(initial) {} + // Constructor for delayed initialization. SkTCopyOnFirstWrite() : fObj(NULL) {} |