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

Side by Side Diff: src/gpu/gl/debug/GrDebugGL.h

Issue 22850006: Replace uses of GrAssert by SkASSERT. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rebase Created 7 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 | Annotate | Revision Log
« no previous file with comments | « src/gpu/gl/GrGpuGL_program.cpp ('k') | src/gpu/gl/debug/GrDebugGL.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #ifndef GrDebugGL_DEFINED 9 #ifndef GrDebugGL_DEFINED
10 #define GrDebugGL_DEFINED 10 #define GrDebugGL_DEFINED
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 } 83 }
84 GrGLint getPackRowLength() const { return fPackRowLength; } 84 GrGLint getPackRowLength() const { return fPackRowLength; }
85 85
86 void setUnPackRowLength(GrGLint unPackRowLength) { 86 void setUnPackRowLength(GrGLint unPackRowLength) {
87 fUnPackRowLength = unPackRowLength; 87 fUnPackRowLength = unPackRowLength;
88 } 88 }
89 GrGLint getUnPackRowLength() const { return fUnPackRowLength; } 89 GrGLint getUnPackRowLength() const { return fUnPackRowLength; }
90 90
91 static GrDebugGL *getInstance() { 91 static GrDebugGL *getInstance() {
92 // someone should admit to actually using this class 92 // someone should admit to actually using this class
93 GrAssert(0 < gStaticRefCount); 93 SkASSERT(0 < gStaticRefCount);
94 94
95 if (NULL == gObj) { 95 if (NULL == gObj) {
96 gObj = SkNEW(GrDebugGL); 96 gObj = SkNEW(GrDebugGL);
97 } 97 }
98 98
99 return gObj; 99 return gObj;
100 } 100 }
101 101
102 void report() const; 102 void report() const;
103 103
104 static void staticRef() { 104 static void staticRef() {
105 gStaticRefCount++; 105 gStaticRefCount++;
106 } 106 }
107 107
108 static void staticUnRef() { 108 static void staticUnRef() {
109 GrAssert(gStaticRefCount > 0); 109 SkASSERT(gStaticRefCount > 0);
110 gStaticRefCount--; 110 gStaticRefCount--;
111 if (0 == gStaticRefCount) { 111 if (0 == gStaticRefCount) {
112 SkDELETE(gObj); 112 SkDELETE(gObj);
113 gObj = NULL; 113 gObj = NULL;
114 } 114 }
115 } 115 }
116 116
117 protected: 117 protected:
118 118
119 private: 119 private:
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 // type) easier 151 // type) easier
152 #define GR_CREATE(className, classEnum) \ 152 #define GR_CREATE(className, classEnum) \
153 reinterpret_cast<className *>(GrDebugGL::getInstance()->createObj(classEnum) ) 153 reinterpret_cast<className *>(GrDebugGL::getInstance()->createObj(classEnum) )
154 154
155 //////////////////////////////////////////////////////////////////////////////// 155 ////////////////////////////////////////////////////////////////////////////////
156 // Helper macro to make finding objects less painful 156 // Helper macro to make finding objects less painful
157 #define GR_FIND(id, className, classEnum) \ 157 #define GR_FIND(id, className, classEnum) \
158 reinterpret_cast<className *>(GrDebugGL::getInstance()->findObject(id, class Enum)) 158 reinterpret_cast<className *>(GrDebugGL::getInstance()->findObject(id, class Enum))
159 159
160 #endif // GrDebugGL_DEFINED 160 #endif // GrDebugGL_DEFINED
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGpuGL_program.cpp ('k') | src/gpu/gl/debug/GrDebugGL.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698