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

Side by Side Diff: src/gpu/batches/GrAAStrokeRectBatch.cpp

Issue 1287973003: Check for xfer barriers in GrBatch, auto-issue barriers in GrGpu (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comment 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 | « src/gpu/batches/GrAAStrokeRectBatch.h ('k') | src/gpu/batches/GrBatch.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 #include "GrAAStrokeRectBatch.h" 8 #include "GrAAStrokeRectBatch.h"
9 9
10 #include "GrDefaultGeoProcFactory.h" 10 #include "GrDefaultGeoProcFactory.h"
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 }; 196 };
197 GR_STATIC_ASSERT(SK_ARRAY_COUNT(gBevelIndices) == kBevelIndexCnt); 197 GR_STATIC_ASSERT(SK_ARRAY_COUNT(gBevelIndices) == kBevelIndexCnt);
198 198
199 GR_DEFINE_STATIC_UNIQUE_KEY(gBevelIndexBufferKey); 199 GR_DEFINE_STATIC_UNIQUE_KEY(gBevelIndexBufferKey);
200 return resourceProvider->findOrCreateInstancedIndexBuffer(gBevelIndices, 200 return resourceProvider->findOrCreateInstancedIndexBuffer(gBevelIndices,
201 kBevelIndexCnt, kNumBevelRectsInIndexBuffer, kBevelVertexCnt, 201 kBevelIndexCnt, kNumBevelRectsInIndexBuffer, kBevelVertexCnt,
202 gBevelIndexBufferKey); 202 gBevelIndexBufferKey);
203 } 203 }
204 } 204 }
205 205
206 bool GrAAStrokeRectBatch::onCombineIfPossible(GrBatch* t) { 206 bool GrAAStrokeRectBatch::onCombineIfPossible(GrBatch* t, const GrCaps& caps) {
207 if (!this->pipeline()->isEqual(*t->pipeline())) { 207 if (!GrPipeline::CanCombine(*this->pipeline(), this->bounds(), *t->pipeline( ), t->bounds(),
208 caps)) {
208 return false; 209 return false;
209 } 210 }
210 211
211 GrAAStrokeRectBatch* that = t->cast<GrAAStrokeRectBatch>(); 212 GrAAStrokeRectBatch* that = t->cast<GrAAStrokeRectBatch>();
212 213
213 // TODO batch across miterstroke changes 214 // TODO batch across miterstroke changes
214 if (this->miterStroke() != that->miterStroke()) { 215 if (this->miterStroke() != that->miterStroke()) {
215 return false; 216 return false;
216 } 217 }
217 218
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 geo.fColor = GrRandomColor(random); 372 geo.fColor = GrRandomColor(random);
372 geo.fDevOutside = outside; 373 geo.fDevOutside = outside;
373 geo.fDevOutsideAssist = outsideAssist; 374 geo.fDevOutsideAssist = outsideAssist;
374 geo.fDevInside = inside; 375 geo.fDevInside = inside;
375 geo.fMiterStroke = miterStroke; 376 geo.fMiterStroke = miterStroke;
376 377
377 return GrAAStrokeRectBatch::Create(geo, GrTest::TestMatrix(random)); 378 return GrAAStrokeRectBatch::Create(geo, GrTest::TestMatrix(random));
378 } 379 }
379 380
380 #endif 381 #endif
OLDNEW
« no previous file with comments | « src/gpu/batches/GrAAStrokeRectBatch.h ('k') | src/gpu/batches/GrBatch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698