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

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

Issue 1229143007: Start to propagate constness of GrPipelineBuilder up the stack (Closed) Base URL: https://skia.googlesource.com/skia.git@const-fix
Patch Set: rebase 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/GrDashLinePathRenderer.cpp ('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 660 matching lines...) Expand 10 before | Expand all | Expand 10 after
671 } else { 671 } else {
672 if (!viewMatrix.invert(&localMatrix)) { 672 if (!viewMatrix.invert(&localMatrix)) {
673 return false; 673 return false;
674 } 674 }
675 } 675 }
676 } else { 676 } else {
677 bounds = path.getBounds(); 677 bounds = path.getBounds();
678 } 678 }
679 const SkMatrix& viewM = (reverse && viewMatrix.hasPerspective()) ? S kMatrix::I() : 679 const SkMatrix& viewM = (reverse && viewMatrix.hasPerspective()) ? S kMatrix::I() :
680 v iewMatrix; 680 v iewMatrix;
681 target->drawBWRect(pipelineBuilder, color, viewM, bounds, NULL, &loc alMatrix); 681 target->drawBWRect(*pipelineBuilder, color, viewM, bounds, NULL, &lo calMatrix);
682 } else { 682 } else {
683 if (passCount > 1) { 683 if (passCount > 1) {
684 pipelineBuilder->setDisableColorXPFactory(); 684 pipelineBuilder->setDisableColorXPFactory();
685 } 685 }
686 686
687 DefaultPathBatch::Geometry geometry; 687 DefaultPathBatch::Geometry geometry;
688 geometry.fColor = color; 688 geometry.fColor = color;
689 geometry.fPath = path; 689 geometry.fPath = path;
690 geometry.fTolerance = srcSpaceTol; 690 geometry.fTolerance = srcSpaceTol;
691 691
692 SkAutoTUnref<GrBatch> batch(DefaultPathBatch::Create(geometry, newCo verage, viewMatrix, 692 SkAutoTUnref<GrBatch> batch(DefaultPathBatch::Create(geometry, newCo verage, viewMatrix,
693 isHairline, dev Bounds)); 693 isHairline, dev Bounds));
694 694
695 target->drawBatch(pipelineBuilder, batch); 695 target->drawBatch(*pipelineBuilder, batch);
696 } 696 }
697 } 697 }
698 return true; 698 return true;
699 } 699 }
700 700
701 bool GrDefaultPathRenderer::canDrawPath(const GrDrawTarget* target, 701 bool GrDefaultPathRenderer::canDrawPath(const GrDrawTarget* target,
702 const GrPipelineBuilder* pipelineBuilder , 702 const GrPipelineBuilder* pipelineBuilder ,
703 const SkMatrix& viewMatrix, 703 const SkMatrix& viewMatrix,
704 const SkPath& path, 704 const SkPath& path,
705 const GrStrokeInfo& stroke, 705 const GrStrokeInfo& stroke,
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 geometry.fColor = color; 758 geometry.fColor = color;
759 geometry.fPath = path; 759 geometry.fPath = path;
760 geometry.fTolerance = srcSpaceTol; 760 geometry.fTolerance = srcSpaceTol;
761 761
762 viewMatrix.mapRect(&bounds); 762 viewMatrix.mapRect(&bounds);
763 uint8_t coverage = GrRandomCoverage(random); 763 uint8_t coverage = GrRandomCoverage(random);
764 return DefaultPathBatch::Create(geometry, coverage, viewMatrix, true, bounds ); 764 return DefaultPathBatch::Create(geometry, coverage, viewMatrix, true, bounds );
765 } 765 }
766 766
767 #endif 767 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrDashLinePathRenderer.cpp ('k') | src/gpu/GrDrawContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698