aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sksl/SkSLGLSLCodeGenerator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/sksl/SkSLGLSLCodeGenerator.cpp')
-rw-r--r--src/sksl/SkSLGLSLCodeGenerator.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/sksl/SkSLGLSLCodeGenerator.cpp b/src/sksl/SkSLGLSLCodeGenerator.cpp
index 996714ec62..43c1c95327 100644
--- a/src/sksl/SkSLGLSLCodeGenerator.cpp
+++ b/src/sksl/SkSLGLSLCodeGenerator.cpp
@@ -1270,7 +1270,11 @@ void GLSLCodeGenerator::writeProgramElement(const ProgramElement& e) {
this->writeLine();
} else if (builtin == SK_FRAGCOLOR_BUILTIN &&
fProgram.fSettings.fCaps->mustDeclareFragmentShaderOutput()) {
- this->write("out ");
+ if (fProgram.fSettings.fFragColorIsInOut) {
+ this->write("inout ");
+ } else {
+ this->write("out ");
+ }
if (usesPrecisionModifiers()) {
this->write("mediump ");
}