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>
This commit is contained in:
Chris Dalton 2017-09-26 09:56:43 -06:00 committed by Skia Commit-Bot
parent 90f28ec3da
commit 8d17769700
4 changed files with 3 additions and 9 deletions

View File

@ -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.

View File

@ -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);

View File

@ -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:

View File

@ -60,7 +60,6 @@ public:
// Triangles.
kTriangleHulls,
kTriangleEdges,
kCombinedTriangleHullsAndEdges,
kTriangleCorners,
// Quadratics.