Index: include/utils/win/SkTScopedComPtr.h |
=================================================================== |
--- include/utils/win/SkTScopedComPtr.h (revision 8940) |
+++ include/utils/win/SkTScopedComPtr.h (working copy) |
@@ -24,6 +24,13 @@ |
return ptr; |
} |
+template<typename T> T* SkSafeRefComPtr(T* ptr) { |
+ if (ptr) { |
+ ptr->AddRef(); |
+ } |
+ return ptr; |
+} |
+ |
template<typename T> |
class SkTScopedComPtr : SkNoncopyable { |
private: |