diff options
Diffstat (limited to 'include/gpu/GrTypesPriv.h')
-rw-r--r-- | include/gpu/GrTypesPriv.h | 23 |
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, |