| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 GrGLProgramDataManager_DEFINED | 8 #ifndef GrGLProgramDataManager_DEFINED |
| 9 #define GrGLProgramDataManager_DEFINED | 9 #define GrGLProgramDataManager_DEFINED |
| 10 | 10 |
| 11 #include <cstdint> |
| 12 |
| 11 #include "glsl/GrGLSLProgramDataManager.h" | 13 #include "glsl/GrGLSLProgramDataManager.h" |
| 12 | 14 |
| 13 #include "GrAllocator.h" | 15 #include "GrAllocator.h" |
| 14 #include "gl/GrGLSampler.h" | 16 #include "gl/GrGLSampler.h" |
| 15 #include "gl/GrGLTypes.h" | 17 #include "gl/GrGLTypes.h" |
| 16 #include "glsl/GrGLSLShaderVar.h" | 18 #include "glsl/GrGLSLShaderVar.h" |
| 17 | 19 |
| 18 #include "SkTArray.h" | 20 #include "SkTArray.h" |
| 19 | 21 |
| 20 class GrGLGpu; | 22 class GrGLGpu; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 46 | 48 |
| 47 GrGLProgramDataManager(GrGLGpu*, GrGLuint programID, const UniformInfoArray&
, | 49 GrGLProgramDataManager(GrGLGpu*, GrGLuint programID, const UniformInfoArray&
, |
| 48 const VaryingInfoArray&); | 50 const VaryingInfoArray&); |
| 49 | 51 |
| 50 | 52 |
| 51 void setSamplers(const SkTArray<GrGLSampler>& samplers) const; | 53 void setSamplers(const SkTArray<GrGLSampler>& samplers) const; |
| 52 | 54 |
| 53 /** Functions for uploading uniform values. The varities ending in v can be
used to upload to an | 55 /** Functions for uploading uniform values. The varities ending in v can be
used to upload to an |
| 54 * array of uniforms. arrayCount must be <= the array count of the uniform. | 56 * array of uniforms. arrayCount must be <= the array count of the uniform. |
| 55 */ | 57 */ |
| 58 void set1i(UniformHandle, int32_t) const override; |
| 56 void set1f(UniformHandle, float v0) const override; | 59 void set1f(UniformHandle, float v0) const override; |
| 57 void set1fv(UniformHandle, int arrayCount, const float v[]) const override; | 60 void set1fv(UniformHandle, int arrayCount, const float v[]) const override; |
| 58 void set2f(UniformHandle, float, float) const override; | 61 void set2f(UniformHandle, float, float) const override; |
| 59 void set2fv(UniformHandle, int arrayCount, const float v[]) const override; | 62 void set2fv(UniformHandle, int arrayCount, const float v[]) const override; |
| 60 void set3f(UniformHandle, float, float, float) const override; | 63 void set3f(UniformHandle, float, float, float) const override; |
| 61 void set3fv(UniformHandle, int arrayCount, const float v[]) const override; | 64 void set3fv(UniformHandle, int arrayCount, const float v[]) const override; |
| 62 void set4f(UniformHandle, float, float, float, float) const override; | 65 void set4f(UniformHandle, float, float, float, float) const override; |
| 63 void set4fv(UniformHandle, int arrayCount, const float v[]) const override; | 66 void set4fv(UniformHandle, int arrayCount, const float v[]) const override; |
| 64 // matrices are column-major, the first three upload a single matrix, the la
tter three upload | 67 // matrices are column-major, the first three upload a single matrix, the la
tter three upload |
| 65 // arrayCount matrices into a uniform array. | 68 // arrayCount matrices into a uniform array. |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 | 109 |
| 107 SkTArray<Uniform, true> fUniforms; | 110 SkTArray<Uniform, true> fUniforms; |
| 108 SkTArray<PathProcVarying, true> fPathProcVaryings; | 111 SkTArray<PathProcVarying, true> fPathProcVaryings; |
| 109 GrGLGpu* fGpu; | 112 GrGLGpu* fGpu; |
| 110 GrGLuint fProgramID; | 113 GrGLuint fProgramID; |
| 111 | 114 |
| 112 typedef GrGLSLProgramDataManager INHERITED; | 115 typedef GrGLSLProgramDataManager INHERITED; |
| 113 }; | 116 }; |
| 114 | 117 |
| 115 #endif | 118 #endif |
| OLD | NEW |