Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 /* | |
| 2 * Copyright 2014 Google Inc. | |
| 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 GrGLESNvprProgramBuilder_DEFINED | |
| 9 #define GrGLESNvprProgramBuilder_DEFINED | |
| 10 | |
| 11 #include "GrGLSkiaProgramBuilder.h" | |
| 12 | |
| 13 class GrGLESNvprProgramBuilder : public GrGLSkiaProgramBuilder { | |
| 14 public: | |
| 15 GrGLESNvprProgramBuilder(GrGpuGL* gpu, const GrGLProgramDesc& desc); | |
| 16 | |
| 17 /* | |
| 18 * The separable varying info must be passed to GrGLProgram so this must | |
| 19 * be part of the public interface | |
| 20 */ | |
| 21 struct SeparableVaryingInfo { | |
| 22 GrGLShaderVar fVariable; | |
| 23 GrGLint fLocation; | |
| 24 }; | |
| 25 | |
| 26 typedef GrTAllocator<SeparableVaryingInfo> SeparableVaryingInfoArray; | |
| 27 | |
| 28 virtual GrGLProgram* createProgram(GrGLuint programID); | |
| 29 | |
| 30 private: | |
| 31 virtual void emitTransforms(const GrProcessorStage&, | |
| 32 GrGLProcessor::TransformedCoordsArray* outCoords , | |
| 33 GrGLInstalledProcessors*) SK_OVERRIDE; | |
| 34 | |
| 35 typedef GrGLInstalledProcessors::ShaderVarHandle ShaderVarHandle; | |
| 36 | |
| 37 /** Add a separable varying input variable to the current program. | |
| 38 * A separable varying (fragment shader input) is a varying that can be used also when vertex | |
|
bsalomon
2014/09/29 15:43:19
line up the start of each line with "Add..." (or m
joshua.litt
2014/09/29 21:05:22
Done.
| |
| 39 * shaders are not used. With a vertex shader, the operation is same as with other | |
| 40 * varyings. Without a vertex shader, such as with NV_path_rendering, GL API s are used to | |
| 41 * populate the variable. The APIs can refer to the variable through the ret urned handle. | |
| 42 */ | |
| 43 ShaderVarHandle addSeparableVarying(GrSLType type, | |
| 44 const char* name, | |
| 45 const char** vsOutName, | |
| 46 const char** fsInName); | |
| 47 | |
| 48 virtual void resolveSeparableVaryings(GrGLuint programId) SK_OVERRIDE; | |
| 49 | |
| 50 SeparableVaryingInfoArray fSeparableVaryingInfos; | |
| 51 | |
| 52 typedef GrGLSkiaProgramBuilder INHERITED; | |
| 53 }; | |
| 54 | |
| 55 #endif | |
| OLD | NEW |