| 1 |
/* |
| 2 |
* Copyright 2024 Google LLC |
| 3 |
* |
| 4 |
* Use of this source code is governed by a BSD-style license that can be |
| 5 |
* found in the LICENSE file. |
| 6 |
*/ |
| 7 |
|
| 8 |
#include "src/sksl/SkSLGraphiteModules.h" |
| 9 |
|
| 10 |
#include "include/core/SkTypes.h" |
| 11 |
|
| 12 |
// We include minified SkSL module code and pass it directly to the compiler. |
| 13 |
#if defined(SK_ENABLE_OPTIMIZE_SIZE) || !defined(SK_DEBUG) |
| 14 |
#include "src/sksl/generated/sksl_graphite_frag.minified.sksl" |
| 15 |
#include "src/sksl/generated/sksl_graphite_vert.minified.sksl" |
| 16 |
#else |
| 17 |
#include "src/sksl/generated/sksl_graphite_frag.unoptimized.sksl" |
| 18 |
#include "src/sksl/generated/sksl_graphite_vert.unoptimized.sksl" |
| 19 |
#endif |
| 20 |
|
| 21 |
namespace SkSL::Loader { |
| 22 |
|
| 23 |
GraphiteModules GetGraphiteModules() { |
| 24 |
#define M(name) SKSL_MINIFIED_##name |
| 25 |
return GraphiteModules{ |
| 26 |
M(sksl_graphite_frag), |
| 27 |
M(sksl_graphite_vert), |
| 28 |
}; |
| 29 |
} |
| 30 |
|
| 31 |
} // namespace SkSL::Loader |