aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu/GrTypesPriv.h
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2016-12-13 10:22:54 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-12-13 18:10:31 +0000
commit0abc8b43fddf7dae83bbe698ae61e9c8bc930ee8 (patch)
tree940ea59285613b4b179069d4106e3e5a3cf12dbc /include/gpu/GrTypesPriv.h
parent4431de6af930a8638c194b072558ea3a4b79d908 (diff)
Add helper for idenitfying hw GrAATypes.
Change-Id: I7f4e5d87706df24ffb94e41902e0746bd149d733 Reviewed-on: https://skia-review.googlesource.com/5922 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'include/gpu/GrTypesPriv.h')
-rw-r--r--include/gpu/GrTypesPriv.h23
1 files changed, 19 insertions, 4 deletions
diff --git a/include/gpu/GrTypesPriv.h b/include/gpu/GrTypesPriv.h
index 53e71e74ab..a0e96a2a22 100644
--- a/include/gpu/GrTypesPriv.h
+++ b/include/gpu/GrTypesPriv.h
@@ -26,10 +26,25 @@ enum class GrAAType {
kMixedSamples
};
- /**
- * Types of shader-language-specific boxed variables we can create. (Currently only GrGLShaderVars,
- * but should be applicable to other shader languages.)
- */
+static inline bool GrAATypeIsHW(GrAAType type) {
+ switch (type) {
+ case GrAAType::kNone:
+ return false;
+ case GrAAType::kCoverage:
+ return false;
+ case GrAAType::kMSAA:
+ return true;
+ case GrAAType::kMixedSamples:
+ return true;
+ }
+ SkFAIL("Unknown AA Type");
+ return false;
+}
+
+/**
+ * Types of shader-language-specific boxed variables we can create. (Currently only GrGLShaderVars,
+ * but should be applicable to other shader languages.)
+ */
enum GrSLType {
kVoid_GrSLType,
kBool_GrSLType,