aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sksl/SkSLUtil.h
diff options
context:
space:
mode:
authorGravatar Ethan Nicholas <ethannicholas@google.com>2016-12-09 17:22:59 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-12-12 16:42:34 +0000
commitce33f10677630e34187b661a02161378d8304d68 (patch)
tree570afa6dc9fc971ab1b886563a04b48cfd41156b /src/sksl/SkSLUtil.h
parentf44703a87f532b3f593d91605d66d52c6bbc45c9 (diff)
added sk_FragCoord support to skslc
BUG=skia: Change-Id: If78a4d08121699f87659f0d2e35f3edbf1867401 Reviewed-on: https://skia-review.googlesource.com/5408 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Diffstat (limited to 'src/sksl/SkSLUtil.h')
-rw-r--r--src/sksl/SkSLUtil.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/sksl/SkSLUtil.h b/src/sksl/SkSLUtil.h
index 95b25298ae..678241d205 100644
--- a/src/sksl/SkSLUtil.h
+++ b/src/sksl/SkSLUtil.h
@@ -72,6 +72,21 @@ public:
return result;
}
+ static sk_sp<GrShaderCaps> FragCoordsOld() {
+ sk_sp<GrShaderCaps> result = sk_make_sp<GrShaderCaps>(GrContextOptions());
+ result->fVersionDeclString = "#version 110";
+ result->fGLSLGeneration = GrGLSLGeneration::k110_GrGLSLGeneration;
+ result->fFragCoordConventionsExtensionString = "GL_ARB_fragment_coord_conventions";
+ return result;
+ }
+
+ static sk_sp<GrShaderCaps> FragCoordsNew() {
+ sk_sp<GrShaderCaps> result = sk_make_sp<GrShaderCaps>(GrContextOptions());
+ result->fVersionDeclString = "#version 400";
+ result->fFragCoordConventionsExtensionString = "GL_ARB_fragment_coord_conventions";
+ return result;
+ }
+
static sk_sp<GrShaderCaps> VariousCaps() {
sk_sp<GrShaderCaps> result = sk_make_sp<GrShaderCaps>(GrContextOptions());
result->fVersionDeclString = "#version 400";