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

Side by Side Diff: src/gpu/GrAALinearizingConvexPathRenderer.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/GrAAHairLinePathRenderer.cpp ('k') | src/gpu/GrAtlasTextContext.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 /* 2 /*
3 * Copyright 2015 Google Inc. 3 * Copyright 2015 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "GrAALinearizingConvexPathRenderer.h" 9 #include "GrAALinearizingConvexPathRenderer.h"
10 10
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 private: 257 private:
258 AAFlatteningConvexPathBatch(const Geometry& geometry) { 258 AAFlatteningConvexPathBatch(const Geometry& geometry) {
259 this->initClassID<AAFlatteningConvexPathBatch>(); 259 this->initClassID<AAFlatteningConvexPathBatch>();
260 fGeoData.push_back(geometry); 260 fGeoData.push_back(geometry);
261 261
262 // compute bounds 262 // compute bounds
263 fBounds = geometry.fPath.getBounds(); 263 fBounds = geometry.fPath.getBounds();
264 geometry.fViewMatrix.mapRect(&fBounds); 264 geometry.fViewMatrix.mapRect(&fBounds);
265 } 265 }
266 266
267 bool onCombineIfPossible(GrBatch* t) override { 267 bool onCombineIfPossible(GrBatch* t, const GrCaps& caps) override {
268 if (!this->pipeline()->isEqual(*t->pipeline())) { 268 if (!GrPipeline::CanCombine(*this->pipeline(), this->bounds(), *t->pipel ine(), t->bounds(),
269 caps)) {
269 return false; 270 return false;
270 } 271 }
271 272
272 AAFlatteningConvexPathBatch* that = t->cast<AAFlatteningConvexPathBatch> (); 273 AAFlatteningConvexPathBatch* that = t->cast<AAFlatteningConvexPathBatch> ();
273 274
274 SkASSERT(this->usesLocalCoords() == that->usesLocalCoords()); 275 SkASSERT(this->usesLocalCoords() == that->usesLocalCoords());
275 if (this->usesLocalCoords() && !this->viewMatrix().cheapEqualTo(that->vi ewMatrix())) { 276 if (this->usesLocalCoords() && !this->viewMatrix().cheapEqualTo(that->vi ewMatrix())) {
276 return false; 277 return false;
277 } 278 }
278 279
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 BATCH_TEST_DEFINE(AAFlatteningConvexPathBatch) { 334 BATCH_TEST_DEFINE(AAFlatteningConvexPathBatch) {
334 AAFlatteningConvexPathBatch::Geometry geometry; 335 AAFlatteningConvexPathBatch::Geometry geometry;
335 geometry.fColor = GrRandomColor(random); 336 geometry.fColor = GrRandomColor(random);
336 geometry.fViewMatrix = GrTest::TestMatrixInvertible(random); 337 geometry.fViewMatrix = GrTest::TestMatrixInvertible(random);
337 geometry.fPath = GrTest::TestPathConvex(random); 338 geometry.fPath = GrTest::TestPathConvex(random);
338 339
339 return AAFlatteningConvexPathBatch::Create(geometry); 340 return AAFlatteningConvexPathBatch::Create(geometry);
340 } 341 }
341 342
342 #endif 343 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrAAHairLinePathRenderer.cpp ('k') | src/gpu/GrAtlasTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698