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

Side by Side Diff: src/gpu/batches/GrBatch.h

Issue 1842753002: Style bikeshed - remove extraneous whitespace (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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 | « src/gpu/batches/GrAtlasTextBatch.cpp ('k') | src/gpu/batches/GrDashLinePathRenderer.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 2015 Google Inc. 2 * Copyright 2015 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 GrBatch_DEFINED 8 #ifndef GrBatch_DEFINED
9 #define GrBatch_DEFINED 9 #define GrBatch_DEFINED
10 10
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 } 89 }
90 90
91 template <typename T> T* cast() { 91 template <typename T> T* cast() {
92 SkASSERT(T::ClassID() == this->classID()); 92 SkASSERT(T::ClassID() == this->classID());
93 return static_cast<T*>(this); 93 return static_cast<T*>(this);
94 } 94 }
95 95
96 uint32_t classID() const { SkASSERT(kIllegalBatchID != fClassID); return fCl assID; } 96 uint32_t classID() const { SkASSERT(kIllegalBatchID != fClassID); return fCl assID; }
97 97
98 // We lazily initialize the uniqueID because currently the only user is GrAu ditTrail 98 // We lazily initialize the uniqueID because currently the only user is GrAu ditTrail
99 uint32_t uniqueID() const { 99 uint32_t uniqueID() const {
100 if (kIllegalBatchID == fUniqueID) { 100 if (kIllegalBatchID == fUniqueID) {
101 fUniqueID = GenBatchID(); 101 fUniqueID = GenBatchID();
102 } 102 }
103 return fUniqueID; 103 return fUniqueID;
104 } 104 }
105 SkDEBUGCODE(bool isUsed() const { return fUsed; }) 105 SkDEBUGCODE(bool isUsed() const { return fUsed; })
106 106
107 /** Called prior to drawing. The batch should perform any resource creation necessary to 107 /** Called prior to drawing. The batch should perform any resource creation necessary to
108 to quickly issue its draw when draw is called. */ 108 to quickly issue its draw when draw is called. */
109 void prepare(GrBatchFlushState* state) { this->onPrepare(state); } 109 void prepare(GrBatchFlushState* state) { this->onPrepare(state); }
110 110
111 /** Issues the batches commands to GrGpu. */ 111 /** Issues the batches commands to GrGpu. */
112 void draw(GrBatchFlushState* state) { this->onDraw(state); } 112 void draw(GrBatchFlushState* state) { this->onDraw(state); }
113 113
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 157
158 SkDEBUGCODE(bool fUsed;) 158 SkDEBUGCODE(bool fUsed;)
159 const uint32_t fClassID; 159 const uint32_t fClassID;
160 static uint32_t GenBatchID() { return GenID(&gCurrBatchUniqueID); } 160 static uint32_t GenBatchID() { return GenID(&gCurrBatchUniqueID); }
161 mutable uint32_t fUniqueID; 161 mutable uint32_t fUniqueID;
162 static int32_t gCurrBatchUniqueID; 162 static int32_t gCurrBatchUniqueID;
163 static int32_t gCurrBatchClassID; 163 static int32_t gCurrBatchClassID;
164 }; 164 };
165 165
166 #endif 166 #endif
OLDNEW
« no previous file with comments | « src/gpu/batches/GrAtlasTextBatch.cpp ('k') | src/gpu/batches/GrDashLinePathRenderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698