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

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

Issue 1276913002: Add Batch logging (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweaks Created 5 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
« no previous file with comments | « no previous file | src/gpu/GrInOrderCommandBuilder.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 * 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 18 matching lines...) Expand all
29 * 29 *
30 * Batches are created when GrContext processes a draw call. Batches of the same subclass may be 30 * Batches are created when GrContext processes a draw call. Batches of the same subclass may be
31 * merged using combineIfPossible. When two batches merge, one takes on the unio n of the data 31 * merged using combineIfPossible. When two batches merge, one takes on the unio n of the data
32 * and the other is left empty. The merged batch becomes responsible for drawing the data from both 32 * and the other is left empty. The merged batch becomes responsible for drawing the data from both
33 * the original batches. 33 * the original batches.
34 * 34 *
35 * If there are any possible optimizations which might require knowing more abou t the full state of 35 * If there are any possible optimizations which might require knowing more abou t the full state of
36 * the draw, ie whether or not the GrBatch is allowed to tweak alpha for coverag e, then this 36 * the draw, ie whether or not the GrBatch is allowed to tweak alpha for coverag e, then this
37 * information will be communicated to the GrBatch prior to geometry generation. 37 * information will be communicated to the GrBatch prior to geometry generation.
38 */ 38 */
39 #define BATCH_SPEW
bsalomon 2015/08/06 17:54:12 Since it's in a header, maybe GR_BATCH_SPEW? Also
40 #ifdef BATCH_SPEW
41 #define GrBATCH_INFO(...) SkDebugf(__VA_ARGS__)
42 #else
43 #define GrBATCH_INFO(...)
44 #endif
39 45
40 class GrBatch : public GrNonAtomicRef { 46 class GrBatch : public GrNonAtomicRef {
41 public: 47 public:
42 GrBatch() : fClassID(kIllegalBatchClassID), fNumberOfDraws(0) { SkDEBUGCODE( fUsed = false;) } 48 GrBatch() : fClassID(kIllegalBatchClassID), fNumberOfDraws(0) { SkDEBUGCODE( fUsed = false;) }
43 virtual ~GrBatch() {} 49 virtual ~GrBatch() {}
44 50
45 virtual const char* name() const = 0; 51 virtual const char* name() const = 0;
46 virtual void getInvariantOutputColor(GrInitInvariantOutput* out) const = 0; 52 virtual void getInvariantOutputColor(GrInitInvariantOutput* out) const = 0;
47 virtual void getInvariantOutputCoverage(GrInitInvariantOutput* out) const = 0; 53 virtual void getInvariantOutputCoverage(GrInitInvariantOutput* out) const = 0;
48 54
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 }; 175 };
170 SkAutoTUnref<const GrPipeline> fPipeline; 176 SkAutoTUnref<const GrPipeline> fPipeline;
171 static int32_t gCurrBatchClassID; 177 static int32_t gCurrBatchClassID;
172 int fNumberOfDraws; 178 int fNumberOfDraws;
173 SkDEBUGCODE(bool fUsed;) 179 SkDEBUGCODE(bool fUsed;)
174 180
175 typedef SkRefCnt INHERITED; 181 typedef SkRefCnt INHERITED;
176 }; 182 };
177 183
178 #endif 184 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrInOrderCommandBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698