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

Side by Side Diff: include/gpu/GrTexture.h

Issue 25716003: Make it explicit that some validate methods are debug only ... (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 2 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 | « include/core/SkWeakRefCnt.h ('k') | src/core/SkPathRef.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 2011 Google Inc. 3 * Copyright 2011 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 GrTexture_DEFINED 9 #ifndef GrTexture_DEFINED
10 #define GrTexture_DEFINED 10 #define GrTexture_DEFINED
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 * altered directly, without being tracked by skia. 119 * altered directly, without being tracked by skia.
120 */ 120 */
121 virtual void invalidateCachedState() = 0; 121 virtual void invalidateCachedState() = 0;
122 122
123 #ifdef SK_DEBUG 123 #ifdef SK_DEBUG
124 void validate() const { 124 void validate() const {
125 this->INHERITED::validate(); 125 this->INHERITED::validate();
126 126
127 this->validateDesc(); 127 this->validateDesc();
128 } 128 }
129 #else
130 void validate() const {}
131 #endif 129 #endif
130
132 static GrResourceKey ComputeKey(const GrGpu* gpu, 131 static GrResourceKey ComputeKey(const GrGpu* gpu,
133 const GrTextureParams* params, 132 const GrTextureParams* params,
134 const GrTextureDesc& desc, 133 const GrTextureDesc& desc,
135 const GrCacheID& cacheID); 134 const GrCacheID& cacheID);
136 static GrResourceKey ComputeScratchKey(const GrTextureDesc& desc); 135 static GrResourceKey ComputeScratchKey(const GrTextureDesc& desc);
137 static bool NeedsResizing(const GrResourceKey& key); 136 static bool NeedsResizing(const GrResourceKey& key);
138 static bool NeedsBilerp(const GrResourceKey& key); 137 static bool NeedsBilerp(const GrResourceKey& key);
139 138
140 protected: 139 protected:
141 // A texture refs its rt representation but not vice-versa. It is up to 140 // A texture refs its rt representation but not vice-versa. It is up to
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 GrTexture* setTexture(GrTexture* texture) { 203 GrTexture* setTexture(GrTexture* texture) {
205 fTexture.reset(SkSafeRef(texture)); 204 fTexture.reset(SkSafeRef(texture));
206 return texture; 205 return texture;
207 } 206 }
208 private: 207 private:
209 SkAutoTUnref<GrTexture> fTexture; 208 SkAutoTUnref<GrTexture> fTexture;
210 SkIPoint fOffset; 209 SkIPoint fOffset;
211 }; 210 };
212 211
213 #endif 212 #endif
OLDNEW
« no previous file with comments | « include/core/SkWeakRefCnt.h ('k') | src/core/SkPathRef.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698