xref: /aosp_15_r20/external/skia/src/sksl/SkSLGraphiteModules.h (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
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 #ifndef SKSL_GRAPHITE_MODULES
9 #define SKSL_GRAPHITE_MODULES
10 
11 namespace SkSL::Loader {
12 struct GraphiteModules {
13     const char* fFragmentShader;
14     const char* fFragmentShaderES2;
15     const char* fVertexShader;
16     const char* fVertexShaderES2;
17 };
18 
19 // These need to be two different functions so we can implement them in two different files.
20 // In particular, the GetGraphiteModules() needs to be implemented in a graphite specific
21 // file, but SetGraphiteModuleLoader needs to be implemented in the common file (used by both
22 // Ganesh and Graphite).
23 GraphiteModules GetGraphiteModules();
24 void SetGraphiteModuleData(const GraphiteModules&);
25 
26 }  // namespace SkSL::Loader
27 
28 #endif  // SKSL_GRAPHITE_MODULES
29