| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "SkSLCompiler.h" | 8 #include "SkSLCompiler.h" |
| 9 | 9 |
| 10 #include "Test.h" | 10 #include "Test.h" |
| 11 | 11 |
| 12 #if SK_SUPPORT_GPU | 12 #if SKIA_SUPPORT_GPU |
| 13 | 13 |
| 14 static void test(skiatest::Reporter* r, const char* src, const GrGLSLCaps& caps,
| 14 static void test(skiatest::Reporter* r, const char* src, const GrGLSLCaps& caps,
|
| 15 const char* expected) { | 15 const char* expected) { |
| 16 SkSL::Compiler compiler; | 16 SkSL::Compiler compiler; |
| 17 std::string output; | 17 std::string output; |
| 18 bool result = compiler.toGLSL(SkSL::Program::kFragment_Kind, src, caps, &out
put); | 18 bool result = compiler.toGLSL(SkSL::Program::kFragment_Kind, src, caps, &out
put); |
| 19 if (!result) { | 19 if (!result) { |
| 20 SkDebugf("Unexpected error compiling %s\n%s", src, compiler.errorText().
c_str()); | 20 SkDebugf("Unexpected error compiling %s\n%s", src, compiler.errorText().
c_str()); |
| 21 } | 21 } |
| 22 REPORTER_ASSERT(r, result); | 22 REPORTER_ASSERT(r, result); |
| (...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 517 " int x;\n" | 517 " int x;\n" |
| 518 " x = 1;\n" | 518 " x = 1;\n" |
| 519 " x = 2;\n" | 519 " x = 2;\n" |
| 520 " x = 5;\n" | 520 " x = 5;\n" |
| 521 " {\n" | 521 " {\n" |
| 522 " }\n" | 522 " }\n" |
| 523 "}\n"); | 523 "}\n"); |
| 524 } | 524 } |
| 525 | 525 |
| 526 #endif | 526 #endif |
| OLD | NEW |