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

Side by Side Diff: src/gpu/GrDefaultPathRenderer.cpp

Issue 1242033002: All batches do their own pipeline compare (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add quick accept to pipeline compare Created 5 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 | « src/gpu/GrBatch.h ('k') | src/gpu/GrDrawContext.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 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 "GrBatch.h" 10 #include "GrBatch.h"
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 this->initClassID<DefaultPathBatch>(); 377 this->initClassID<DefaultPathBatch>();
378 fBatch.fCoverage = coverage; 378 fBatch.fCoverage = coverage;
379 fBatch.fIsHairline = isHairline; 379 fBatch.fIsHairline = isHairline;
380 fBatch.fViewMatrix = viewMatrix; 380 fBatch.fViewMatrix = viewMatrix;
381 fGeoData.push_back(geometry); 381 fGeoData.push_back(geometry);
382 382
383 this->setBounds(devBounds); 383 this->setBounds(devBounds);
384 } 384 }
385 385
386 bool onCombineIfPossible(GrBatch* t) override { 386 bool onCombineIfPossible(GrBatch* t) override {
387 if (!this->pipeline()->isEqual(*t->pipeline())) {
388 return false;
389 }
390
387 DefaultPathBatch* that = t->cast<DefaultPathBatch>(); 391 DefaultPathBatch* that = t->cast<DefaultPathBatch>();
388 392
389 if (this->color() != that->color()) { 393 if (this->color() != that->color()) {
390 return false; 394 return false;
391 } 395 }
392 396
393 if (this->coverage() != that->coverage()) { 397 if (this->coverage() != that->coverage()) {
394 return false; 398 return false;
395 } 399 }
396 400
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 geometry.fColor = color; 762 geometry.fColor = color;
759 geometry.fPath = path; 763 geometry.fPath = path;
760 geometry.fTolerance = srcSpaceTol; 764 geometry.fTolerance = srcSpaceTol;
761 765
762 viewMatrix.mapRect(&bounds); 766 viewMatrix.mapRect(&bounds);
763 uint8_t coverage = GrRandomCoverage(random); 767 uint8_t coverage = GrRandomCoverage(random);
764 return DefaultPathBatch::Create(geometry, coverage, viewMatrix, true, bounds ); 768 return DefaultPathBatch::Create(geometry, coverage, viewMatrix, true, bounds );
765 } 769 }
766 770
767 #endif 771 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrBatch.h ('k') | src/gpu/GrDrawContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698