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

Side by Side Diff: src/gpu/instanced/InstancedRendering.h

Issue 2119123002: Don't batch large instanced rects with other shapes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Don't batch large instanced rects with other shapes 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 | « bench/ShapesBench.cpp ('k') | src/gpu/instanced/InstancedRendering.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 2016 Google Inc. 2 * Copyright 2016 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 gr_instanced_InstancedRendering_DEFINED 8 #ifndef gr_instanced_InstancedRendering_DEFINED
9 #define gr_instanced_InstancedRendering_DEFINED 9 #define gr_instanced_InstancedRendering_DEFINED
10 10
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 121
122 void computePipelineOptimizations(GrInitInvariantOutput* color, 122 void computePipelineOptimizations(GrInitInvariantOutput* color,
123 GrInitInvariantOutput* coverage, 123 GrInitInvariantOutput* coverage,
124 GrBatchToXPOverrides*) const override; 124 GrBatchToXPOverrides*) const override;
125 125
126 void onPrepare(GrBatchFlushState*) override {} 126 void onPrepare(GrBatchFlushState*) override {}
127 void onDraw(GrBatchFlushState*) override; 127 void onDraw(GrBatchFlushState*) override;
128 128
129 InstancedRendering* const fInstancedRendering; 129 InstancedRendering* const fInstancedRendering;
130 BatchInfo fInfo; 130 BatchInfo fInfo;
131 SkScalar fPixelLoad;
131 SkSTArray<5, ParamsTexel, true> fParams; 132 SkSTArray<5, ParamsTexel, true> fParams;
132 bool fIsTracked; 133 bool fIsTracked;
133 int fNumDraws; 134 int fNumDraws;
134 int fNumChangesInGeometry; 135 int fNumChangesInGeometry;
135 Draw* fHeadDraw; 136 Draw* fHeadDraw;
136 Draw* fTailDraw; 137 Draw* fTailDraw;
137 138
138 typedef GrDrawBatch INHERITED; 139 typedef GrDrawBatch INHERITED;
139 140
140 friend class InstancedRendering; 141 friend class InstancedRendering;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 SkSTArray<1024, ParamsTexel, true> fParams; 178 SkSTArray<1024, ParamsTexel, true> fParams;
178 BatchList fTrackedBatches; 179 BatchList fTrackedBatches;
179 SkAutoTUnref<const GrBuffer> fVertexBuffer; 180 SkAutoTUnref<const GrBuffer> fVertexBuffer;
180 SkAutoTUnref<const GrBuffer> fIndexBuffer; 181 SkAutoTUnref<const GrBuffer> fIndexBuffer;
181 SkAutoTUnref<GrBuffer> fParamsBuffer; 182 SkAutoTUnref<GrBuffer> fParamsBuffer;
182 }; 183 };
183 184
184 } 185 }
185 186
186 #endif 187 #endif
OLDNEW
« no previous file with comments | « bench/ShapesBench.cpp ('k') | src/gpu/instanced/InstancedRendering.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698