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

Side by Side Diff: src/gpu/batches/GrPLSPathRenderer.cpp

Issue 1967513002: Revert of Replace GrStrokeInfo with GrStyle. (Closed) Base URL: https://chromium.googlesource.com/skia.git@resscale
Patch Set: Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 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 "GrPLSPathRenderer.h" 8 #include "GrPLSPathRenderer.h"
9 9
10 #include "SkChunkAlloc.h" 10 #include "SkChunkAlloc.h"
11 #include "SkGeometry.h" 11 #include "SkGeometry.h"
12 #include "SkPathPriv.h" 12 #include "SkPathPriv.h"
13 #include "SkString.h" 13 #include "SkString.h"
14 #include "SkTSort.h" 14 #include "SkTSort.h"
15 #include "SkTraceEvent.h" 15 #include "SkTraceEvent.h"
16 #include "GrBatchFlushState.h" 16 #include "GrBatchFlushState.h"
17 #include "GrBatchTest.h" 17 #include "GrBatchTest.h"
18 #include "GrCaps.h" 18 #include "GrCaps.h"
19 #include "GrContext.h" 19 #include "GrContext.h"
20 #include "GrDefaultGeoProcFactory.h" 20 #include "GrDefaultGeoProcFactory.h"
21 #include "GrPLSGeometryProcessor.h" 21 #include "GrPLSGeometryProcessor.h"
22 #include "GrInvariantOutput.h" 22 #include "GrInvariantOutput.h"
23 #include "GrPathUtils.h" 23 #include "GrPathUtils.h"
24 #include "GrProcessor.h" 24 #include "GrProcessor.h"
25 #include "GrPipelineBuilder.h" 25 #include "GrPipelineBuilder.h"
26 #include "GrStyle.h" 26 #include "GrStrokeInfo.h"
27 #include "GrTessellator.h" 27 #include "GrTessellator.h"
28 #include "batches/GrVertexBatch.h" 28 #include "batches/GrVertexBatch.h"
29 #include "glsl/GrGLSLGeometryProcessor.h" 29 #include "glsl/GrGLSLGeometryProcessor.h"
30 #include "gl/builders/GrGLProgramBuilder.h" 30 #include "gl/builders/GrGLProgramBuilder.h"
31 #include "glsl/GrGLSLPLSPathRendering.h" 31 #include "glsl/GrGLSLPLSPathRendering.h"
32 32
33 GrPLSPathRenderer::GrPLSPathRenderer() { 33 GrPLSPathRenderer::GrPLSPathRenderer() {
34 } 34 }
35 35
36 struct PLSVertex { 36 struct PLSVertex {
(...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 771
772 typedef GrGeometryProcessor INHERITED; 772 typedef GrGeometryProcessor INHERITED;
773 }; 773 };
774 774
775 /////////////////////////////////////////////////////////////////////////////// 775 ///////////////////////////////////////////////////////////////////////////////
776 776
777 bool GrPLSPathRenderer::onCanDrawPath(const CanDrawPathArgs& args) const { 777 bool GrPLSPathRenderer::onCanDrawPath(const CanDrawPathArgs& args) const {
778 // We have support for even-odd rendering, but are having some troublesome 778 // We have support for even-odd rendering, but are having some troublesome
779 // seams. Disable in the presence of even-odd for now. 779 // seams. Disable in the presence of even-odd for now.
780 return args.fShaderCaps->shaderDerivativeSupport() && args.fAntiAlias && 780 return args.fShaderCaps->shaderDerivativeSupport() && args.fAntiAlias &&
781 args.fStyle->isSimpleFill() && !args.fPath->isInverseFillType() && 781 args.fStroke->isFillStyle() && !args.fPath->isInverseFillType() &&
782 args.fPath->getFillType() == SkPath::FillType::kWinding_FillType; 782 args.fPath->getFillType() == SkPath::FillType::kWinding_FillType;
783 } 783 }
784 784
785 class PLSPathBatch : public GrVertexBatch { 785 class PLSPathBatch : public GrVertexBatch {
786 public: 786 public:
787 DEFINE_BATCH_CLASS_ID 787 DEFINE_BATCH_CLASS_ID
788 struct Geometry { 788 struct Geometry {
789 GrColor fColor; 789 GrColor fColor;
790 SkMatrix fViewMatrix; 790 SkMatrix fViewMatrix;
791 SkPath fPath; 791 SkPath fPath;
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
999 DRAW_BATCH_TEST_DEFINE(PLSPathBatch) { 999 DRAW_BATCH_TEST_DEFINE(PLSPathBatch) {
1000 PLSPathBatch::Geometry geometry; 1000 PLSPathBatch::Geometry geometry;
1001 geometry.fColor = GrRandomColor(random); 1001 geometry.fColor = GrRandomColor(random);
1002 geometry.fViewMatrix = GrTest::TestMatrixInvertible(random); 1002 geometry.fViewMatrix = GrTest::TestMatrixInvertible(random);
1003 geometry.fPath = GrTest::TestPathConvex(random); 1003 geometry.fPath = GrTest::TestPathConvex(random);
1004 1004
1005 return PLSPathBatch::Create(geometry); 1005 return PLSPathBatch::Create(geometry);
1006 } 1006 }
1007 1007
1008 #endif 1008 #endif
OLDNEW
« no previous file with comments | « src/gpu/batches/GrMSAAPathRenderer.cpp ('k') | src/gpu/batches/GrStencilAndCoverPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698