diff options
author | Ethan Nicholas <ethannicholas@google.com> | 2017-01-19 16:58:02 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-01-19 22:36:26 +0000 |
commit | de4d301881e7fd084f1f0b359ec6f9b2bf8bd4c5 (patch) | |
tree | edbe55dab521fec2922e3826b4e3d26150254411 /src/sksl/ir | |
parent | 5bee0b6de6b3ad1166d067e6b5046b48b8240a29 (diff) |
Replaced all calls to fragmentPosition() with sk_FragCoord
BUG=skia:
Change-Id: I179576e148ea6caf6e1c40f0a216421898bcb35d
Reviewed-on: https://skia-review.googlesource.com/5941
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/sksl/ir')
-rw-r--r-- | src/sksl/ir/SkSLProgram.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/sksl/ir/SkSLProgram.h b/src/sksl/ir/SkSLProgram.h index 6a73be6983..e4a975b279 100644 --- a/src/sksl/ir/SkSLProgram.h +++ b/src/sksl/ir/SkSLProgram.h @@ -27,6 +27,8 @@ namespace SkSL { struct Program { struct Settings { const GrShaderCaps* fCaps = nullptr; + // if false, sk_FragCoord is exactly the same as gl_FragCoord. If true, the y coordinate + // must be flipped. bool fFlipY = false; }; @@ -34,12 +36,17 @@ struct Program { // if true, this program requires the render target height uniform to be defined bool fRTHeight; + // if true, this program must be recompiled if the flipY setting changes. If false, the + // program will compile to the same code regardless of the flipY setting. + bool fFlipY; + void reset() { fRTHeight = false; + fFlipY = false; } bool isEmpty() { - return !fRTHeight; + return !fRTHeight && !fFlipY; } }; |