aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Chris Dalton <csmartdalton@google.com>2017-09-26 09:56:43 -0600
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-09-26 17:00:06 +0000
commit8d1776970097502f9cff5fb9504a656c8be3193c (patch)
tree249987d38cacd1b894bd918980dc5ad214b67a9c
parent90f28ec3da530d1720a0a74283a44cfd9c207126 (diff)
CCPR: Remove kCombinedTriangleHullsAndEdges
Removes the mode that generates edge and hull geometry simultaneously from the geometry shader. Perf was hit and miss and it's not compatible with vertex shaders. We can revisit if geometry shaders still show promise on some platforms after a vertex shader impl is finished. Bug: skia: Change-Id: I984231e9a5bb60fe31d3ba280c7390a74aa5bc27 Reviewed-on: https://skia-review.googlesource.com/51300 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
-rw-r--r--samplecode/SampleCCPRGeometry.cpp3
-rw-r--r--src/gpu/ccpr/GrCCPRCoverageOp.cpp4
-rw-r--r--src/gpu/ccpr/GrCCPRCoverageProcessor.cpp4
-rw-r--r--src/gpu/ccpr/GrCCPRCoverageProcessor.h1
4 files changed, 3 insertions, 9 deletions
diff --git a/samplecode/SampleCCPRGeometry.cpp b/samplecode/SampleCCPRGeometry.cpp
index 1a3431973d..e152e1ec62 100644
--- a/samplecode/SampleCCPRGeometry.cpp
+++ b/samplecode/SampleCCPRGeometry.cpp
@@ -375,9 +375,6 @@ bool CCPRGeometryView::onQuery(SkEvent* evt) {
if (SampleCode::CharQ(*evt, &unichar)) {
if (unichar >= '1' && unichar <= '7') {
fMode = Mode(unichar - '1');
- if (fMode >= Mode::kCombinedTriangleHullsAndEdges) {
- fMode = Mode(int(fMode) + 1);
- }
if (fMode >= Mode::kLoopHulls) {
// '6' -> kSerpentineHulls, '7' -> kSerpentineCorners. updateGpuData converts to
// kLoop* if needed.
diff --git a/src/gpu/ccpr/GrCCPRCoverageOp.cpp b/src/gpu/ccpr/GrCCPRCoverageOp.cpp
index a923726713..0903d4b32b 100644
--- a/src/gpu/ccpr/GrCCPRCoverageOp.cpp
+++ b/src/gpu/ccpr/GrCCPRCoverageOp.cpp
@@ -396,7 +396,9 @@ void GrCCPRCoverageOp::onExecute(GrOpFlushState* flushState) {
// Triangles.
auto constexpr kTrianglesGrPrimitiveType = GrCCPRCoverageProcessor::kTrianglesGrPrimitiveType;
- this->drawMaskPrimitives(flushState, pipeline, Mode::kCombinedTriangleHullsAndEdges,
+ this->drawMaskPrimitives(flushState, pipeline, Mode::kTriangleHulls,
+ kTrianglesGrPrimitiveType, 3, &PrimitiveTallies::fTriangles);
+ this->drawMaskPrimitives(flushState, pipeline, Mode::kTriangleEdges,
kTrianglesGrPrimitiveType, 3, &PrimitiveTallies::fTriangles);
this->drawMaskPrimitives(flushState, pipeline, Mode::kTriangleCorners,
kTrianglesGrPrimitiveType, 3, &PrimitiveTallies::fTriangles);
diff --git a/src/gpu/ccpr/GrCCPRCoverageProcessor.cpp b/src/gpu/ccpr/GrCCPRCoverageProcessor.cpp
index 2d69c00188..a295f05d47 100644
--- a/src/gpu/ccpr/GrCCPRCoverageProcessor.cpp
+++ b/src/gpu/ccpr/GrCCPRCoverageProcessor.cpp
@@ -22,8 +22,6 @@ const char* GrCCPRCoverageProcessor::GetProcessorName(Mode mode) {
return "GrCCPRTriangleHullAndEdgeProcessor (hulls)";
case Mode::kTriangleEdges:
return "GrCCPRTriangleHullAndEdgeProcessor (edges)";
- case Mode::kCombinedTriangleHullsAndEdges:
- return "GrCCPRTriangleHullAndEdgeProcessor (combined hulls & edges)";
case Mode::kTriangleCorners:
return "GrCCPRTriangleCornerProcessor";
case Mode::kQuadraticHulls:
@@ -68,8 +66,6 @@ GrGLSLPrimitiveProcessor* GrCCPRCoverageProcessor::createGLSLInstance(const GrSh
return new GrCCPRTriangleHullAndEdgeProcessor(GeometryType::kHulls);
case Mode::kTriangleEdges:
return new GrCCPRTriangleHullAndEdgeProcessor(GeometryType::kEdges);
- case Mode::kCombinedTriangleHullsAndEdges:
- return new GrCCPRTriangleHullAndEdgeProcessor(GeometryType::kHullsAndEdges);
case Mode::kTriangleCorners:
return new GrCCPRTriangleCornerProcessor();
case Mode::kQuadraticHulls:
diff --git a/src/gpu/ccpr/GrCCPRCoverageProcessor.h b/src/gpu/ccpr/GrCCPRCoverageProcessor.h
index 8120136fad..879f724f4f 100644
--- a/src/gpu/ccpr/GrCCPRCoverageProcessor.h
+++ b/src/gpu/ccpr/GrCCPRCoverageProcessor.h
@@ -60,7 +60,6 @@ public:
// Triangles.
kTriangleHulls,
kTriangleEdges,
- kCombinedTriangleHullsAndEdges,
kTriangleCorners,
// Quadratics.