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

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

Issue 1151283004: Split drawing functionality out of GrContext and into new GrDrawContext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix no-GPU builds Created 5 years, 6 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/GrContext.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 661 matching lines...) Expand 10 before | Expand all | Expand 10 after
672 } else { 672 } else {
673 if (!viewMatrix.invert(&localMatrix)) { 673 if (!viewMatrix.invert(&localMatrix)) {
674 return false; 674 return false;
675 } 675 }
676 } 676 }
677 } else { 677 } else {
678 bounds = path.getBounds(); 678 bounds = path.getBounds();
679 } 679 }
680 const SkMatrix& viewM = (reverse && viewMatrix.hasPerspective()) ? S kMatrix::I() : 680 const SkMatrix& viewM = (reverse && viewMatrix.hasPerspective()) ? S kMatrix::I() :
681 v iewMatrix; 681 v iewMatrix;
682 target->drawRect(pipelineBuilder, color, viewM, bounds, NULL, &local Matrix); 682 target->drawBWRect(pipelineBuilder, color, viewM, bounds, NULL, &loc alMatrix);
683 } else { 683 } else {
684 if (passCount > 1) { 684 if (passCount > 1) {
685 pipelineBuilder->setDisableColorXPFactory(); 685 pipelineBuilder->setDisableColorXPFactory();
686 } 686 }
687 687
688 DefaultPathBatch::Geometry geometry; 688 DefaultPathBatch::Geometry geometry;
689 geometry.fColor = color; 689 geometry.fColor = color;
690 geometry.fPath = path; 690 geometry.fPath = path;
691 geometry.fTolerance = srcSpaceTol; 691 geometry.fTolerance = srcSpaceTol;
692 692
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
759 geometry.fColor = color; 759 geometry.fColor = color;
760 geometry.fPath = path; 760 geometry.fPath = path;
761 geometry.fTolerance = srcSpaceTol; 761 geometry.fTolerance = srcSpaceTol;
762 762
763 viewMatrix.mapRect(&bounds); 763 viewMatrix.mapRect(&bounds);
764 uint8_t coverage = GrRandomCoverage(random); 764 uint8_t coverage = GrRandomCoverage(random);
765 return DefaultPathBatch::Create(geometry, coverage, viewMatrix, true, bounds ); 765 return DefaultPathBatch::Create(geometry, coverage, viewMatrix, true, bounds );
766 } 766 }
767 767
768 #endif 768 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/gpu/GrDrawContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698