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

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

Issue 23703010: Replace uses of GR_DEBUGCODE by SkDEBUGCODE. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 3 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 | « no previous file | include/gpu/GrConfig.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 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * 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
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef GrBackendEffectFactory_DEFINED 8 #ifndef GrBackendEffectFactory_DEFINED
9 #define GrBackendEffectFactory_DEFINED 9 #define GrBackendEffectFactory_DEFINED
10 10
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 enum { 60 enum {
61 kIllegalEffectClassID = 0, 61 kIllegalEffectClassID = 0,
62 }; 62 };
63 63
64 GrBackendEffectFactory() { 64 GrBackendEffectFactory() {
65 fEffectClassID = kIllegalEffectClassID; 65 fEffectClassID = kIllegalEffectClassID;
66 } 66 }
67 virtual ~GrBackendEffectFactory() {} 67 virtual ~GrBackendEffectFactory() {}
68 68
69 static EffectKey GenID() { 69 static EffectKey GenID() {
70 GR_DEBUGCODE(static const int32_t kClassIDBits = 8 * sizeof(EffectKey) - 70 SkDEBUGCODE(static const int32_t kClassIDBits = 8 * sizeof(EffectKey) -
71 kTextureKeyBits - kEffectKeyBits - kAttribKeyBits); 71 kTextureKeyBits - kEffectKeyBits - kAttribKeyBits);
72 // fCurrEffectClassID has been initialized to kIllegalEffectClassID. The 72 // fCurrEffectClassID has been initialized to kIllegalEffectClassID. The
73 // atomic inc returns the old value not the incremented value. So we add 73 // atomic inc returns the old value not the incremented value. So we add
74 // 1 to the returned value. 74 // 1 to the returned value.
75 int32_t id = sk_atomic_inc(&fCurrEffectClassID) + 1; 75 int32_t id = sk_atomic_inc(&fCurrEffectClassID) + 1;
76 SkASSERT(id < (1 << kClassIDBits)); 76 SkASSERT(id < (1 << kClassIDBits));
77 return static_cast<EffectKey>(id); 77 return static_cast<EffectKey>(id);
78 } 78 }
79 79
80 EffectKey fEffectClassID; 80 EffectKey fEffectClassID;
81 81
82 private: 82 private:
83 static int32_t fCurrEffectClassID; 83 static int32_t fCurrEffectClassID;
84 }; 84 };
85 85
86 #endif 86 #endif
OLDNEW
« no previous file with comments | « no previous file | include/gpu/GrConfig.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698