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

Side by Side Diff: include/utils/win/SkTScopedComPtr.h

Issue 1272293004: Move SkTemplates.h to private. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: It's a struct! Created 5 years, 4 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 unified diff | Download patch
« no previous file with comments | « include/utils/win/SkAutoCoInitialize.h ('k') | include/xml/SkDOM.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1
2 /* 1 /*
3 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
4 * 3 *
5 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 5 * found in the LICENSE file.
7 */ 6 */
8 7
9 #ifndef SkTScopedComPtr_DEFINED 8 #ifndef SkTScopedComPtr_DEFINED
10 #define SkTScopedComPtr_DEFINED 9 #define SkTScopedComPtr_DEFINED
11 10
12 #include "SkTypes.h" 11 #include "SkTypes.h"
13 #include "SkTemplates.h"
14 12
15 template<typename T> 13 template<typename T>
16 class SkBlockComRef : public T { 14 class SkBlockComRef : public T {
17 private: 15 private:
18 virtual ULONG STDMETHODCALLTYPE AddRef(void) = 0; 16 virtual ULONG STDMETHODCALLTYPE AddRef(void) = 0;
19 virtual ULONG STDMETHODCALLTYPE Release(void) = 0; 17 virtual ULONG STDMETHODCALLTYPE Release(void) = 0;
20 }; 18 };
21 19
22 template<typename T> T* SkRefComPtr(T* ptr) { 20 template<typename T> T* SkRefComPtr(T* ptr) {
23 ptr->AddRef(); 21 ptr->AddRef();
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 } 65 }
68 66
69 T* release() { 67 T* release() {
70 T* temp = this->fPtr; 68 T* temp = this->fPtr;
71 this->fPtr = NULL; 69 this->fPtr = NULL;
72 return temp; 70 return temp;
73 } 71 }
74 }; 72 };
75 73
76 #endif 74 #endif
OLDNEW
« no previous file with comments | « include/utils/win/SkAutoCoInitialize.h ('k') | include/xml/SkDOM.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698