Chromium Code Reviews| Index: include/core/SkTemplates.h |
| diff --git a/include/core/SkTemplates.h b/include/core/SkTemplates.h |
| index 1d22a642dae3ba959d4f7a9a9bee8fb4ff7072e7..a8b276950d91dc3e413eda568f6c6bfbc65fe40f 100644 |
| --- a/include/core/SkTemplates.h |
| +++ b/include/core/SkTemplates.h |
| @@ -112,6 +112,14 @@ public: |
| T* operator->() const { SkASSERT(fObj); return fObj; } |
| T* detach() { T* obj = fObj; fObj = NULL; return obj; } |
| + void reset(T* obj = NULL) { |
| + if (fObj != obj) { |
| + if (fObj) { |
| + P(fObj); |
| + } |
| + fObj = obj; |
| + } |
| + } |
|
msarett
2015/04/09 16:26:32
I'm sure it is possible to implement gif rewinding
scroggo
2015/04/09 17:37:17
git blame is your friend. Using blame, I see we ad
msarett
2015/04/09 19:21:31
All good points. Seems like using SkAutoTCallCPro
|
| private: |
| T* fObj; |
| }; |