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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 setMatrix3f(UniformHandle, const float matrix[]) const override; | 64 void setMatrix3f(UniformHandle, const float matrix[]) const override; |
65 void setMatrix4f(UniformHandle, const float matrix[]) const override; | 65 void setMatrix4f(UniformHandle, const float matrix[]) const override; |
66 void setMatrix3fv(UniformHandle, int arrayCount, const float matrices[]) con
st override; | 66 void setMatrix3fv(UniformHandle, int arrayCount, const float matrices[]) con
st override; |
67 void setMatrix4fv(UniformHandle, int arrayCount, const float matrices[]) con
st override; | 67 void setMatrix4fv(UniformHandle, int arrayCount, const float matrices[]) con
st override; |
68 | 68 |
69 // convenience method for uploading a SkMatrix to a 3x3 matrix uniform | |
70 void setSkMatrix(UniformHandle, const SkMatrix&) const override; | |
71 | |
72 // for nvpr only | 69 // for nvpr only |
73 void setPathFragmentInputTransform(VaryingHandle u, int components, | 70 void setPathFragmentInputTransform(VaryingHandle u, int components, |
74 const SkMatrix& matrix) const override; | 71 const SkMatrix& matrix) const override; |
75 | 72 |
76 private: | 73 private: |
77 enum { | 74 enum { |
78 kUnusedUniform = -1, | 75 kUnusedUniform = -1, |
79 }; | 76 }; |
80 | 77 |
81 struct Uniform { | 78 struct Uniform { |
(...skipping 20 matching lines...) Expand all Loading... |
102 | 99 |
103 SkTArray<Uniform, true> fUniforms; | 100 SkTArray<Uniform, true> fUniforms; |
104 SkTArray<PathProcVarying, true> fPathProcVaryings; | 101 SkTArray<PathProcVarying, true> fPathProcVaryings; |
105 GrGLGpu* fGpu; | 102 GrGLGpu* fGpu; |
106 GrGLuint fProgramID; | 103 GrGLuint fProgramID; |
107 | 104 |
108 typedef GrGLSLProgramDataManager INHERITED; | 105 typedef GrGLSLProgramDataManager INHERITED; |
109 }; | 106 }; |
110 | 107 |
111 #endif | 108 #endif |
OLD | NEW |