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

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

Issue 2108503004: Dump batch bounds and scissor rect (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update to match B.'s formatting Created 4 years, 5 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 | « no previous file | src/gpu/batches/GrClearBatch.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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 void prepare(GrBatchFlushState* state) { this->onPrepare(state); } 111 void prepare(GrBatchFlushState* state) { this->onPrepare(state); }
112 112
113 /** Issues the batches commands to GrGpu. */ 113 /** Issues the batches commands to GrGpu. */
114 void draw(GrBatchFlushState* state) { this->onDraw(state); } 114 void draw(GrBatchFlushState* state) { this->onDraw(state); }
115 115
116 /** Used to block batching across render target changes. Remove this once we store 116 /** Used to block batching across render target changes. Remove this once we store
117 GrBatches for different RTs in different targets. */ 117 GrBatches for different RTs in different targets. */
118 virtual uint32_t renderTargetUniqueID() const = 0; 118 virtual uint32_t renderTargetUniqueID() const = 0;
119 119
120 /** Used for spewing information about batches when debugging. */ 120 /** Used for spewing information about batches when debugging. */
121 virtual SkString dumpInfo() const = 0; 121 virtual SkString dumpInfo() const {
122 SkString string;
123 string.appendf("BatchBounds: [L: %.2f, T: %.2f, R: %.2f, B: %.2f]\n",
124 fBounds.fLeft, fBounds.fTop, fBounds.fRight, fBounds.fBot tom);
125 return string;
126 }
122 127
123 /** Can remove this when multi-draw-buffer lands */ 128 /** Can remove this when multi-draw-buffer lands */
124 virtual GrRenderTarget* renderTarget() const = 0; 129 virtual GrRenderTarget* renderTarget() const = 0;
125 130
126 protected: 131 protected:
127 // NOTE, compute some bounds, even if extremely conservative. Do *NOT* setL argest on the bounds 132 // NOTE, compute some bounds, even if extremely conservative. Do *NOT* setL argest on the bounds
128 // rect because we outset it for dst copy textures 133 // rect because we outset it for dst copy textures
129 void setBounds(const SkRect& newBounds) { fBounds = newBounds; } 134 void setBounds(const SkRect& newBounds) { fBounds = newBounds; }
130 135
131 void joinBounds(const SkRect& otherBounds) { 136 void joinBounds(const SkRect& otherBounds) {
(...skipping 27 matching lines...) Expand all
159 164
160 SkDEBUGCODE(bool fUsed;) 165 SkDEBUGCODE(bool fUsed;)
161 const uint32_t fClassID; 166 const uint32_t fClassID;
162 static uint32_t GenBatchID() { return GenID(&gCurrBatchUniqueID); } 167 static uint32_t GenBatchID() { return GenID(&gCurrBatchUniqueID); }
163 mutable uint32_t fUniqueID; 168 mutable uint32_t fUniqueID;
164 static int32_t gCurrBatchUniqueID; 169 static int32_t gCurrBatchUniqueID;
165 static int32_t gCurrBatchClassID; 170 static int32_t gCurrBatchClassID;
166 }; 171 };
167 172
168 #endif 173 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/batches/GrClearBatch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698