aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sksl/SkSLCPPCodeGenerator.cpp
diff options
context:
space:
mode:
authorGravatar Ethan Nicholas <ethannicholas@google.com>2017-07-07 10:13:31 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-07-07 20:42:34 +0000
commit9b80ffc77b8000b493eb1226dc6ec21f1e99edfc (patch)
treeb369cebec300f4017d306eff093e059eaea3298f /src/sksl/SkSLCPPCodeGenerator.cpp
parent66828c02456d6fe30cd4495955dc37f46cc2adf1 (diff)
converted GrCircleBlurFragmentProcessor to sksl
Bug: skia: Change-Id: I1b70ba2003c9e9de2b5b9acadaf25c9ed59b1198 Reviewed-on: https://skia-review.googlesource.com/21727 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/sksl/SkSLCPPCodeGenerator.cpp')
-rw-r--r--src/sksl/SkSLCPPCodeGenerator.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/sksl/SkSLCPPCodeGenerator.cpp b/src/sksl/SkSLCPPCodeGenerator.cpp
index 09622f3e4c..9210dde7a3 100644
--- a/src/sksl/SkSLCPPCodeGenerator.cpp
+++ b/src/sksl/SkSLCPPCodeGenerator.cpp
@@ -542,7 +542,8 @@ bool CPPCodeGenerator::generateCode() {
const char* baseName = fName.c_str();
const char* fullName = fFullName.c_str();
this->writef(kFragmentProcessorHeader, fullName);
- this->writef("#include \"%s.h\"\n", fullName);
+ this->writef("#include \"%s.h\"\n"
+ "#if SK_SUPPORT_GPU\n", fullName);
this->writeSection(CPP_SECTION);
this->writef("#include \"glsl/GrGLSLColorSpaceXformHelper.h\"\n"
"#include \"glsl/GrGLSLFragmentProcessor.h\"\n"
@@ -593,6 +594,7 @@ bool CPPCodeGenerator::generateCode() {
"}\n");
this->writeTest();
this->writeSection(CPP_END_SECTION);
+ this->write("#endif\n");
result &= 0 == fErrors.errorCount();
return result;
}