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

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

Issue 1105263002: Remove vertex/index buffer factilities from GrDrawTarget. (Closed) Base URL: https://skia.googlesource.com/skia.git@josh
Patch Set: rebase Created 5 years, 7 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/GrDrawTarget.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 "GrBatch.h" 10 #include "GrBatch.h"
11 #include "GrBatchTarget.h" 11 #include "GrBatchTarget.h"
12 #include "GrBufferAllocPool.h" 12 #include "GrBufferAllocPool.h"
13 #include "GrContext.h" 13 #include "GrContext.h"
14 #include "GrDefaultGeoProcFactory.h" 14 #include "GrDefaultGeoProcFactory.h"
15 #include "GrPathUtils.h" 15 #include "GrPathUtils.h"
16 #include "GrPipelineBuilder.h" 16 #include "GrPipelineBuilder.h"
17 #include "GrVertexBuffer.h"
17 #include "SkGeometry.h" 18 #include "SkGeometry.h"
18 #include "SkString.h" 19 #include "SkString.h"
19 #include "SkStrokeRec.h" 20 #include "SkStrokeRec.h"
20 #include "SkTLazy.h" 21 #include "SkTLazy.h"
21 #include "SkTraceEvent.h" 22 #include "SkTraceEvent.h"
22 23
23 GrDefaultPathRenderer::GrDefaultPathRenderer(bool separateStencilSupport, 24 GrDefaultPathRenderer::GrDefaultPathRenderer(bool separateStencilSupport,
24 bool stencilWrapOpsSupport) 25 bool stencilWrapOpsSupport)
25 : fSeparateStencil(separateStencilSupport) 26 : fSeparateStencil(separateStencilSupport)
26 , fStencilWrapOps(stencilWrapOpsSupport) { 27 , fStencilWrapOps(stencilWrapOpsSupport) {
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 if (!viewMatrix.hasPerspective() && viewMatrix.invert(&vmi)) { 685 if (!viewMatrix.hasPerspective() && viewMatrix.invert(&vmi)) {
685 vmi.mapRect(&bounds); 686 vmi.mapRect(&bounds);
686 } else { 687 } else {
687 if (!viewMatrix.invert(&localMatrix)) { 688 if (!viewMatrix.invert(&localMatrix)) {
688 return false; 689 return false;
689 } 690 }
690 } 691 }
691 } else { 692 } else {
692 bounds = path.getBounds(); 693 bounds = path.getBounds();
693 } 694 }
694 GrDrawTarget::AutoGeometryPush agp(target);
695 const SkMatrix& viewM = (reverse && viewMatrix.hasPerspective()) ? S kMatrix::I() : 695 const SkMatrix& viewM = (reverse && viewMatrix.hasPerspective()) ? S kMatrix::I() :
696 v iewMatrix; 696 v iewMatrix;
697 target->drawRect(pipelineBuilder, color, viewM, bounds, NULL, &local Matrix); 697 target->drawRect(pipelineBuilder, color, viewM, bounds, NULL, &local Matrix);
698 } else { 698 } else {
699 if (passCount > 1) { 699 if (passCount > 1) {
700 pipelineBuilder->setDisableColorXPFactory(); 700 pipelineBuilder->setDisableColorXPFactory();
701 } 701 }
702 702
703 DefaultPathBatch::Geometry geometry; 703 DefaultPathBatch::Geometry geometry;
704 geometry.fColor = color; 704 geometry.fColor = color;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
745 745
746 void GrDefaultPathRenderer::onStencilPath(GrDrawTarget* target, 746 void GrDefaultPathRenderer::onStencilPath(GrDrawTarget* target,
747 GrPipelineBuilder* pipelineBuilder, 747 GrPipelineBuilder* pipelineBuilder,
748 const SkMatrix& viewMatrix, 748 const SkMatrix& viewMatrix,
749 const SkPath& path, 749 const SkPath& path,
750 const GrStrokeInfo& stroke) { 750 const GrStrokeInfo& stroke) {
751 SkASSERT(SkPath::kInverseEvenOdd_FillType != path.getFillType()); 751 SkASSERT(SkPath::kInverseEvenOdd_FillType != path.getFillType());
752 SkASSERT(SkPath::kInverseWinding_FillType != path.getFillType()); 752 SkASSERT(SkPath::kInverseWinding_FillType != path.getFillType());
753 this->internalDrawPath(target, pipelineBuilder, GrColor_WHITE, viewMatrix, p ath, stroke, true); 753 this->internalDrawPath(target, pipelineBuilder, GrColor_WHITE, viewMatrix, p ath, stroke, true);
754 } 754 }
OLDNEW
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/gpu/GrDrawTarget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698