aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sksl/SkSLUtil.h
diff options
context:
space:
mode:
authorGravatar Ethan Nicholas <ethannicholas@google.com>2016-12-12 15:33:30 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-12-13 14:28:53 +0000
commit941e7e2c9567ab1d8a3b2d1b0e3db71ee5eb75c9 (patch)
tree7f0ad6c5b2c3772d2c83be545fe04c53044746bd /src/sksl/SkSLUtil.h
parent3dc73f3596d93a89f71b0c7e96d5d63dafeaf378 (diff)
re-land of added sk_FragCoord support to skslc
BUG=skia: Change-Id: Ifac1aa39839058787ad1794200c3dbb93c147a69 Reviewed-on: https://skia-review.googlesource.com/5850 Reviewed-by: Ethan Nicholas <ethannicholas@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";