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

Side by Side Diff: src/gpu/batches/GrAAConvexPathRenderer.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
« no previous file with comments | « src/gpu/SkGpuDevice_drawTexture.cpp ('k') | src/gpu/batches/GrAADistanceFieldPathRenderer.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 2012 Google Inc. 2 * Copyright 2012 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 "GrAAConvexPathRenderer.h" 8 #include "GrAAConvexPathRenderer.h"
9 9
10 #include "GrAAConvexTessellator.h" 10 #include "GrAAConvexTessellator.h"
11 #include "GrBatchFlushState.h" 11 #include "GrBatchFlushState.h"
12 #include "GrBatchTest.h" 12 #include "GrBatchTest.h"
13 #include "GrCaps.h" 13 #include "GrCaps.h"
14 #include "GrContext.h" 14 #include "GrContext.h"
15 #include "GrDefaultGeoProcFactory.h" 15 #include "GrDefaultGeoProcFactory.h"
16 #include "GrGeometryProcessor.h" 16 #include "GrGeometryProcessor.h"
17 #include "GrInvariantOutput.h" 17 #include "GrInvariantOutput.h"
18 #include "GrPathUtils.h" 18 #include "GrPathUtils.h"
19 #include "GrProcessor.h" 19 #include "GrProcessor.h"
20 #include "GrPipelineBuilder.h" 20 #include "GrPipelineBuilder.h"
21 #include "GrStrokeInfo.h"
21 #include "SkGeometry.h" 22 #include "SkGeometry.h"
22 #include "SkPathPriv.h" 23 #include "SkPathPriv.h"
23 #include "SkString.h" 24 #include "SkString.h"
24 #include "SkTraceEvent.h" 25 #include "SkTraceEvent.h"
25 #include "batches/GrVertexBatch.h" 26 #include "batches/GrVertexBatch.h"
26 #include "glsl/GrGLSLFragmentShaderBuilder.h" 27 #include "glsl/GrGLSLFragmentShaderBuilder.h"
27 #include "glsl/GrGLSLGeometryProcessor.h" 28 #include "glsl/GrGLSLGeometryProcessor.h"
28 #include "glsl/GrGLSLProgramDataManager.h" 29 #include "glsl/GrGLSLProgramDataManager.h"
29 #include "glsl/GrGLSLUniformHandler.h" 30 #include "glsl/GrGLSLUniformHandler.h"
30 #include "glsl/GrGLSLVarying.h" 31 #include "glsl/GrGLSLVarying.h"
(...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 return d->fCaps->shaderCaps()->shaderDerivativeSupport() ? 675 return d->fCaps->shaderCaps()->shaderDerivativeSupport() ?
675 QuadEdgeEffect::Create(GrRandomColor(d->fRandom), 676 QuadEdgeEffect::Create(GrRandomColor(d->fRandom),
676 GrTest::TestMatrix(d->fRandom), 677 GrTest::TestMatrix(d->fRandom),
677 d->fRandom->nextBool()) : nullptr; 678 d->fRandom->nextBool()) : nullptr;
678 } 679 }
679 680
680 /////////////////////////////////////////////////////////////////////////////// 681 ///////////////////////////////////////////////////////////////////////////////
681 682
682 bool GrAAConvexPathRenderer::onCanDrawPath(const CanDrawPathArgs& args) const { 683 bool GrAAConvexPathRenderer::onCanDrawPath(const CanDrawPathArgs& args) const {
683 return (args.fShaderCaps->shaderDerivativeSupport() && args.fAntiAlias && 684 return (args.fShaderCaps->shaderDerivativeSupport() && args.fAntiAlias &&
684 args.fStyle->isSimpleFill() && !args.fPath->isInverseFillType() && 685 args.fStroke->isFillStyle() && !args.fPath->isInverseFillType() &&
685 args.fPath->isConvex()); 686 args.fPath->isConvex());
686 } 687 }
687 688
688 // extract the result vertices and indices from the GrAAConvexTessellator 689 // extract the result vertices and indices from the GrAAConvexTessellator
689 static void extract_verts(const GrAAConvexTessellator& tess, 690 static void extract_verts(const GrAAConvexTessellator& tess,
690 void* vertices, 691 void* vertices,
691 size_t vertexStride, 692 size_t vertexStride,
692 GrColor color, 693 GrColor color,
693 uint16_t* idxs, 694 uint16_t* idxs,
694 bool tweakAlphaForCoverage) { 695 bool tweakAlphaForCoverage) {
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
1019 DRAW_BATCH_TEST_DEFINE(AAConvexPathBatch) { 1020 DRAW_BATCH_TEST_DEFINE(AAConvexPathBatch) {
1020 AAConvexPathBatch::Geometry geometry; 1021 AAConvexPathBatch::Geometry geometry;
1021 geometry.fColor = GrRandomColor(random); 1022 geometry.fColor = GrRandomColor(random);
1022 geometry.fViewMatrix = GrTest::TestMatrixInvertible(random); 1023 geometry.fViewMatrix = GrTest::TestMatrixInvertible(random);
1023 geometry.fPath = GrTest::TestPathConvex(random); 1024 geometry.fPath = GrTest::TestPathConvex(random);
1024 1025
1025 return AAConvexPathBatch::Create(geometry); 1026 return AAConvexPathBatch::Create(geometry);
1026 } 1027 }
1027 1028
1028 #endif 1029 #endif
OLDNEW
« no previous file with comments | « src/gpu/SkGpuDevice_drawTexture.cpp ('k') | src/gpu/batches/GrAADistanceFieldPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698