| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 #ifndef GrGLSLProgramBuilder_DEFINED | 8 #ifndef GrGLSLProgramBuilder_DEFINED |
| 9 #define GrGLSLProgramBuilder_DEFINED | 9 #define GrGLSLProgramBuilder_DEFINED |
| 10 | 10 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 UniformHandle fRTAdjustmentUni; | 46 UniformHandle fRTAdjustmentUni; |
| 47 | 47 |
| 48 // We use the render target height to provide a y-down frag coord when s
pecifying | 48 // We use the render target height to provide a y-down frag coord when s
pecifying |
| 49 // origin_upper_left is not supported. | 49 // origin_upper_left is not supported. |
| 50 UniformHandle fRTHeightUni; | 50 UniformHandle fRTHeightUni; |
| 51 }; | 51 }; |
| 52 | 52 |
| 53 // Used to add a uniform in the vertex shader for transforming into normaliz
ed device space. | 53 // Used to add a uniform in the vertex shader for transforming into normaliz
ed device space. |
| 54 void addRTAdjustmentUniform(GrSLPrecision precision, const char* name, const
char** outName); | 54 void addRTAdjustmentUniform(GrSLPrecision precision, const char* name, const
char** outName); |
| 55 const char* rtAdjustment() const { return "rtAdjustment"; } | 55 const char* rtAdjustment() const { return "rtAdjustment"; } |
| 56 | 56 |
| 57 // Used to add a uniform for the RenderTarget height (used for frag position
) without mangling | 57 // Used to add a uniform for the RenderTarget height (used for frag position
) without mangling |
| 58 // the name of the uniform inside of a stage. | 58 // the name of the uniform inside of a stage. |
| 59 void addRTHeightUniform(const char* name, const char** outName); | 59 void addRTHeightUniform(const char* name, const char** outName); |
| 60 | 60 |
| 61 // Generates a name for a variable. The generated string will be name prefix
ed by the prefix | 61 // Generates a name for a variable. The generated string will be name prefix
ed by the prefix |
| 62 // char (unless the prefix is '\0'). It also will mangle the name to be stag
e-specific unless | 62 // char (unless the prefix is '\0'). It also will mangle the name to be stag
e-specific unless |
| 63 // explicitly asked not to. | 63 // explicitly asked not to. |
| 64 void nameVariable(SkString* out, char prefix, const char* name, bool mangle
= true); | 64 void nameVariable(SkString* out, char prefix, const char* name, bool mangle
= true); |
| 65 | 65 |
| 66 virtual GrGLSLUniformHandler* uniformHandler() = 0; | 66 virtual GrGLSLUniformHandler* uniformHandler() = 0; |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 #endif | 158 #endif |
| 159 | 159 |
| 160 GrGLSLPrimitiveProcessor::TransformsIn fCoordTransforms; | 160 GrGLSLPrimitiveProcessor::TransformsIn fCoordTransforms; |
| 161 GrGLSLPrimitiveProcessor::TransformsOut fOutCoords; | 161 GrGLSLPrimitiveProcessor::TransformsOut fOutCoords; |
| 162 int fNumVertexSamplers; | 162 int fNumVertexSamplers; |
| 163 int fNumGeometrySamplers; | 163 int fNumGeometrySamplers; |
| 164 int fNumFragmentSamplers; | 164 int fNumFragmentSamplers; |
| 165 }; | 165 }; |
| 166 | 166 |
| 167 #endif | 167 #endif |
| OLD | NEW |