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

Side by Side Diff: src/gpu/GrDefaultPathRenderer.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/GrCommandBuilder.cpp ('k') | src/gpu/GrGpu.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 2011 Google Inc. 2 * Copyright 2011 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 "GrDefaultPathRenderer.h" 8 #include "GrDefaultPathRenderer.h"
9 9
10 #include "GrBatchTarget.h" 10 #include "GrBatchTarget.h"
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 bool isHairline, const SkRect& devBounds) { 382 bool isHairline, const SkRect& devBounds) {
383 this->initClassID<DefaultPathBatch>(); 383 this->initClassID<DefaultPathBatch>();
384 fBatch.fCoverage = coverage; 384 fBatch.fCoverage = coverage;
385 fBatch.fIsHairline = isHairline; 385 fBatch.fIsHairline = isHairline;
386 fBatch.fViewMatrix = viewMatrix; 386 fBatch.fViewMatrix = viewMatrix;
387 fGeoData.push_back(geometry); 387 fGeoData.push_back(geometry);
388 388
389 this->setBounds(devBounds); 389 this->setBounds(devBounds);
390 } 390 }
391 391
392 bool onCombineIfPossible(GrBatch* t) override { 392 bool onCombineIfPossible(GrBatch* t, const GrCaps& caps) override {
393 if (!this->pipeline()->isEqual(*t->pipeline())) { 393 if (!GrPipeline::CanCombine(*this->pipeline(), this->bounds(), *t->pipel ine(), t->bounds(),
394 caps)) {
394 return false; 395 return false;
395 } 396 }
396 397
397 DefaultPathBatch* that = t->cast<DefaultPathBatch>(); 398 DefaultPathBatch* that = t->cast<DefaultPathBatch>();
398 399
399 if (this->color() != that->color()) { 400 if (this->color() != that->color()) {
400 return false; 401 return false;
401 } 402 }
402 403
403 if (this->coverage() != that->coverage()) { 404 if (this->coverage() != that->coverage()) {
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 geometry.fColor = color; 755 geometry.fColor = color;
755 geometry.fPath = path; 756 geometry.fPath = path;
756 geometry.fTolerance = srcSpaceTol; 757 geometry.fTolerance = srcSpaceTol;
757 758
758 viewMatrix.mapRect(&bounds); 759 viewMatrix.mapRect(&bounds);
759 uint8_t coverage = GrRandomCoverage(random); 760 uint8_t coverage = GrRandomCoverage(random);
760 return DefaultPathBatch::Create(geometry, coverage, viewMatrix, true, bounds ); 761 return DefaultPathBatch::Create(geometry, coverage, viewMatrix, true, bounds );
761 } 762 }
762 763
763 #endif 764 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrCommandBuilder.cpp ('k') | src/gpu/GrGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698