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

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

Issue 1467253002: Restrict query bounds for reduce clip to dev bounds (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comments Created 5 years 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
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 13 matching lines...) Expand all
24 * subclasses complete freedom to decide how / what they can batch. 24 * subclasses complete freedom to decide how / what they can batch.
25 * 25 *
26 * Batches are created when GrContext processes a draw call. Batches of the same subclass may be 26 * Batches are created when GrContext processes a draw call. Batches of the same subclass may be
27 * merged using combineIfPossible. When two batches merge, one takes on the unio n of the data 27 * merged using combineIfPossible. When two batches merge, one takes on the unio n of the data
28 * and the other is left empty. The merged batch becomes responsible for drawing the data from both 28 * and the other is left empty. The merged batch becomes responsible for drawing the data from both
29 * the original batches. 29 * the original batches.
30 * 30 *
31 * If there are any possible optimizations which might require knowing more abou t the full state of 31 * If there are any possible optimizations which might require knowing more abou t the full state of
32 * the draw, ie whether or not the GrBatch is allowed to tweak alpha for coverag e, then this 32 * the draw, ie whether or not the GrBatch is allowed to tweak alpha for coverag e, then this
33 * information will be communicated to the GrBatch prior to geometry generation. 33 * information will be communicated to the GrBatch prior to geometry generation.
34 *
35 * The bounds of the batch must contain all the vertices in device space *irresp ective* of the clip.
36 * The bounds are used in determining which clip elements must be applied and th us the bounds cannot
37 * in turn depend upon the clip.
34 */ 38 */
35 #define GR_BATCH_SPEW 0 39 #define GR_BATCH_SPEW 0
36 #if GR_BATCH_SPEW 40 #if GR_BATCH_SPEW
37 #define GrBATCH_INFO(...) SkDebugf(__VA_ARGS__) 41 #define GrBATCH_INFO(...) SkDebugf(__VA_ARGS__)
38 #define GrBATCH_SPEW(code) code 42 #define GrBATCH_SPEW(code) code
39 #else 43 #else
40 #define GrBATCH_SPEW(code) 44 #define GrBATCH_SPEW(code)
41 #define GrBATCH_INFO(...) 45 #define GrBATCH_INFO(...)
42 #endif 46 #endif
43 47
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 #if GR_BATCH_SPEW 152 #if GR_BATCH_SPEW
149 static uint32_t GenBatchID() { return GenID(&gCurrBatchUniqueID); } 153 static uint32_t GenBatchID() { return GenID(&gCurrBatchUniqueID); }
150 const uint32_t fUniqueID; 154 const uint32_t fUniqueID;
151 static int32_t gCurrBatchUniqueID; 155 static int32_t gCurrBatchUniqueID;
152 #endif 156 #endif
153 static int32_t gCurrBatchClassID; 157 static int32_t gCurrBatchClassID;
154 typedef GrNonAtomicRef INHERITED; 158 typedef GrNonAtomicRef INHERITED;
155 }; 159 };
156 160
157 #endif 161 #endif
OLDNEW
« no previous file with comments | « src/gpu/batches/GrAALinearizingConvexPathRenderer.cpp ('k') | src/gpu/batches/GrTessellatingPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698