| 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 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 void set1f(UniformHandle, float v0) const override; | 54 void set1f(UniformHandle, float v0) const override; |
| 55 void set1fv(UniformHandle, int arrayCount, const float v[]) const override; | 55 void set1fv(UniformHandle, int arrayCount, const float v[]) const override; |
| 56 void set2f(UniformHandle, float, float) const override; | 56 void set2f(UniformHandle, float, float) const override; |
| 57 void set2fv(UniformHandle, int arrayCount, const float v[]) const override; | 57 void set2fv(UniformHandle, int arrayCount, const float v[]) const override; |
| 58 void set3f(UniformHandle, float, float, float) const override; | 58 void set3f(UniformHandle, float, float, float) const override; |
| 59 void set3fv(UniformHandle, int arrayCount, const float v[]) const override; | 59 void set3fv(UniformHandle, int arrayCount, const float v[]) const override; |
| 60 void set4f(UniformHandle, float, float, float, float) const override; | 60 void set4f(UniformHandle, float, float, float, float) const override; |
| 61 void set4fv(UniformHandle, int arrayCount, const float v[]) const override; | 61 void set4fv(UniformHandle, int arrayCount, const float v[]) const override; |
| 62 // matrices are column-major, the first three upload a single matrix, the la
tter three upload | 62 // matrices are column-major, the first three upload a single matrix, the la
tter three upload |
| 63 // arrayCount matrices into a uniform array. | 63 // arrayCount matrices into a uniform array. |
| 64 void setMatrix2f(UniformHandle, const float matrix[]) const override; |
| 64 void setMatrix3f(UniformHandle, const float matrix[]) const override; | 65 void setMatrix3f(UniformHandle, const float matrix[]) const override; |
| 65 void setMatrix4f(UniformHandle, const float matrix[]) const override; | 66 void setMatrix4f(UniformHandle, const float matrix[]) const override; |
| 67 void setMatrix2fv(UniformHandle, int arrayCount, const float matrices[]) con
st override; |
| 66 void setMatrix3fv(UniformHandle, int arrayCount, const float matrices[]) con
st override; | 68 void setMatrix3fv(UniformHandle, int arrayCount, const float matrices[]) con
st override; |
| 67 void setMatrix4fv(UniformHandle, int arrayCount, const float matrices[]) con
st override; | 69 void setMatrix4fv(UniformHandle, int arrayCount, const float matrices[]) con
st override; |
| 68 | 70 |
| 69 // for nvpr only | 71 // for nvpr only |
| 70 void setPathFragmentInputTransform(VaryingHandle u, int components, | 72 void setPathFragmentInputTransform(VaryingHandle u, int components, |
| 71 const SkMatrix& matrix) const override; | 73 const SkMatrix& matrix) const override; |
| 72 | 74 |
| 73 private: | 75 private: |
| 74 enum { | 76 enum { |
| 75 kUnusedUniform = -1, | 77 kUnusedUniform = -1, |
| (...skipping 14 matching lines...) Expand all Loading... |
| 90 struct PathProcVarying { | 92 struct PathProcVarying { |
| 91 GrGLint fLocation; | 93 GrGLint fLocation; |
| 92 SkDEBUGCODE( | 94 SkDEBUGCODE( |
| 93 GrSLType fType; | 95 GrSLType fType; |
| 94 int fArrayCount; | 96 int fArrayCount; |
| 95 ); | 97 ); |
| 96 }; | 98 }; |
| 97 | 99 |
| 98 SkDEBUGCODE(void printUnused(const Uniform&) const;) | 100 SkDEBUGCODE(void printUnused(const Uniform&) const;) |
| 99 | 101 |
| 102 template<int N> inline void setMatrices(UniformHandle, int arrayCount, |
| 103 const float matrices[]) const; |
| 104 |
| 100 SkTArray<Uniform, true> fUniforms; | 105 SkTArray<Uniform, true> fUniforms; |
| 101 SkTArray<PathProcVarying, true> fPathProcVaryings; | 106 SkTArray<PathProcVarying, true> fPathProcVaryings; |
| 102 GrGLGpu* fGpu; | 107 GrGLGpu* fGpu; |
| 103 GrGLuint fProgramID; | 108 GrGLuint fProgramID; |
| 104 | 109 |
| 105 typedef GrGLSLProgramDataManager INHERITED; | 110 typedef GrGLSLProgramDataManager INHERITED; |
| 106 }; | 111 }; |
| 107 | 112 |
| 108 #endif | 113 #endif |
| OLD | NEW |