aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Ravi Mistry <rmistry@google.com>2017-06-13 14:45:23 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-06-13 14:45:32 +0000
commit7cd974fc7d7d1c197f961136775e188468f02ec9 (patch)
tree48eff63b1d2326320d6b62b01b8409925908d896 /include
parenta611be86f044ae2d17ca5acc12895b53ca067d79 (diff)
Revert "Add GrPrimitiveType::kLinesAdjacency"
This reverts commit f7eb015083aba8942031145736251dd32094115d. Reason for revert: Looks like this is causing build failures: * https://chromium-swarm.appspot.com/task?id=36baaf4d376bbf10&refresh=10 * https://chromium-swarm.appspot.com/task?id=36baad1f17e93510&refresh=10 Original change's description: > Add GrPrimitiveType::kLinesAdjacency > > Converts GrPrimitiveType to an enum class and adds kLinesAdjacency. > > Bug: skia: > Change-Id: If57d26277182aac1375e8181211ddaf7ea6d1e0a > Reviewed-on: https://skia-review.googlesource.com/19581 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Chris Dalton <csmartdalton@google.com> TBR=bsalomon@google.com,csmartdalton@google.com Change-Id: I37a1c575123b357abd8b9af9eea8871fe199f44b No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/19661 Reviewed-by: Ravi Mistry <rmistry@google.com> Commit-Queue: Ravi Mistry <rmistry@google.com>
Diffstat (limited to 'include')
-rw-r--r--include/gpu/GrTypes.h27
1 files changed, 12 insertions, 15 deletions
diff --git a/include/gpu/GrTypes.h b/include/gpu/GrTypes.h
index a4988c8a1a..bad6aa773c 100644
--- a/include/gpu/GrTypes.h
+++ b/include/gpu/GrTypes.h
@@ -216,27 +216,24 @@ static inline GrAA GrBoolToAA(bool aa) { return aa ? GrAA::kYes : GrAA::kNo; }
/**
* Geometric primitives used for drawing.
*/
-enum class GrPrimitiveType {
- kTriangles,
- kTriangleStrip,
- kTriangleFan,
- kPoints,
- kLines, // 1 pix wide only
- kLineStrip, // 1 pix wide only
- kLinesAdjacency // requires geometry shader support.
+enum GrPrimitiveType {
+ kTriangles_GrPrimitiveType,
+ kTriangleStrip_GrPrimitiveType,
+ kTriangleFan_GrPrimitiveType,
+ kPoints_GrPrimitiveType,
+ kLines_GrPrimitiveType, // 1 pix wide only
+ kLineStrip_GrPrimitiveType, // 1 pix wide only
+ kLast_GrPrimitiveType = kLineStrip_GrPrimitiveType
};
-static constexpr int kNumGrPrimitiveTypes = (int) GrPrimitiveType::kLinesAdjacency + 1;
static inline bool GrIsPrimTypeLines(GrPrimitiveType type) {
- return GrPrimitiveType::kLines == type ||
- GrPrimitiveType::kLineStrip == type ||
- GrPrimitiveType::kLinesAdjacency == type;
+ return kLines_GrPrimitiveType == type || kLineStrip_GrPrimitiveType == type;
}
static inline bool GrIsPrimTypeTris(GrPrimitiveType type) {
- return GrPrimitiveType::kTriangles == type ||
- GrPrimitiveType::kTriangleStrip == type ||
- GrPrimitiveType::kTriangleFan == type;
+ return kTriangles_GrPrimitiveType == type ||
+ kTriangleStrip_GrPrimitiveType == type ||
+ kTriangleFan_GrPrimitiveType == type;
}
/**