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

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

Issue 1108403005: Add batch unit tests for ovals (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweaks Created 5 years, 7 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 | « include/gpu/GrTestUtils.h ('k') | src/gpu/GrBatchTest.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 20 matching lines...) Expand all
31 * subclasses complete freedom to decide how / what they can batch. 31 * subclasses complete freedom to decide how / what they can batch.
32 * 32 *
33 * Batches are created when GrContext processes a draw call. Batches of the same subclass may be 33 * Batches are created when GrContext processes a draw call. Batches of the same subclass may be
34 * merged using combineIfPossible. When two batches merge, one takes on the unio n of the data 34 * merged using combineIfPossible. When two batches merge, one takes on the unio n of the data
35 * and the other is left empty. The merged batch becomes responsible for drawing the data from both 35 * and the other is left empty. The merged batch becomes responsible for drawing the data from both
36 * the original batches. 36 * the original batches.
37 * 37 *
38 * If there are any possible optimizations which might require knowing more abou t the full state of 38 * If there are any possible optimizations which might require knowing more abou t the full state of
39 * the draw, ie whether or not the GrBatch is allowed to tweak alpha for coverag e, then this 39 * the draw, ie whether or not the GrBatch is allowed to tweak alpha for coverag e, then this
40 * information will be communicated to the GrBatch prior to geometry generation. 40 * information will be communicated to the GrBatch prior to geometry generation.
41 * TODO Batch should own the draw bounds
41 */ 42 */
42 43
43 class GrBatch : public SkRefCnt { 44 class GrBatch : public SkRefCnt {
44 public: 45 public:
45 SK_DECLARE_INST_COUNT(GrBatch) 46 SK_DECLARE_INST_COUNT(GrBatch)
46 GrBatch() : fClassID(kIllegalBatchClassID), fNumberOfDraws(0) { SkDEBUGCODE( fUsed = false;) } 47 GrBatch() : fClassID(kIllegalBatchClassID), fNumberOfDraws(0) { SkDEBUGCODE( fUsed = false;) }
47 virtual ~GrBatch() {} 48 virtual ~GrBatch() {}
48 49
49 virtual const char* name() const = 0; 50 virtual const char* name() const = 0;
50 virtual void getInvariantOutputColor(GrInitInvariantOutput* out) const = 0; 51 virtual void getInvariantOutputColor(GrInitInvariantOutput* out) const = 0;
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 static int32_t gCurrBatchClassID; 123 static int32_t gCurrBatchClassID;
123 124
124 SkDEBUGCODE(bool fUsed;) 125 SkDEBUGCODE(bool fUsed;)
125 126
126 int fNumberOfDraws; 127 int fNumberOfDraws;
127 128
128 typedef SkRefCnt INHERITED; 129 typedef SkRefCnt INHERITED;
129 }; 130 };
130 131
131 #endif 132 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrTestUtils.h ('k') | src/gpu/GrBatchTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698