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

Unified Diff: include/core/SkRefCnt.h

Issue 1769093002: add virtual ~Effect() (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/RefCntTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkRefCnt.h
diff --git a/include/core/SkRefCnt.h b/include/core/SkRefCnt.h
index d33117751e0717943ec28b890bd645e98ff8f6bc..f899d1eb98e1462dae0fb115af200ecdf7e5cd5d 100644
--- a/include/core/SkRefCnt.h
+++ b/include/core/SkRefCnt.h
@@ -244,6 +244,10 @@ public:
sk_sp() : fPtr(nullptr) {}
sk_sp(std::nullptr_t) : fPtr(nullptr) {}
+ // TODO: for all these constructors and assignments that take <typename U>,
+ // can we add static assertions that sk_sp<T> -> sk_sp<U> doesn't slice
+ // (something like, T has a trivial destructor or U's destructor is virtual)?
+
bungeman-skia 2016/03/07 19:29:45 Putting this here is a bit over constrained. sk_sp
mtklein_C 2016/03/07 19:40:46 Agreed. Now gone.
/**
* Shares the underlying object by calling ref(), so that both the argument and the newly
* created sk_sp both have a reference to it.
« no previous file with comments | « no previous file | tests/RefCntTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698