13#define ASSERT_ARRAY_UPLOAD_IN_BOUNDS(UNI, COUNT) \
14 SkASSERT((COUNT) <= (UNI).fArrayCount || \
15 (1 == (COUNT) && GrShaderVar::kNonArray == (UNI).fArrayCount))
24 builderUniform.fVariable.getArrayCount() > 0);
26 uniform.fArrayCount = builderUniform.fVariable.getArrayCount();
27 uniform.fType = builderUniform.fVariable.getType();
29 uniform.fLocation = builderUniform.fLocation;
34 int startUnit)
const {
38 if (kUnusedUniform != sampler.fLocation) {
46 const Uniform& uni = fUniforms[u.toIndex()];
49 if (kUnusedUniform != uni.fLocation) {
56 const int32_t v[])
const {
57 const Uniform& uni = fUniforms[u.toIndex()];
61 if (kUnusedUniform != uni.fLocation) {
67 const Uniform& uni = fUniforms[u.toIndex()];
70 if (kUnusedUniform != uni.fLocation) {
77 const float v[])
const {
78 const Uniform& uni = fUniforms[u.toIndex()];
86 if (kUnusedUniform != uni.fLocation) {
92 const Uniform& uni = fUniforms[u.toIndex()];
95 if (kUnusedUniform != uni.fLocation) {
102 const int32_t v[])
const {
103 const Uniform& uni = fUniforms[u.toIndex()];
107 if (kUnusedUniform != uni.fLocation) {
113 const Uniform& uni = fUniforms[u.toIndex()];
116 if (kUnusedUniform != uni.fLocation) {
123 const float v[])
const {
124 const Uniform& uni = fUniforms[u.toIndex()];
128 if (kUnusedUniform != uni.fLocation) {
134 const Uniform& uni = fUniforms[u.toIndex()];
137 if (kUnusedUniform != uni.fLocation) {
144 const int32_t v[])
const {
145 const Uniform& uni = fUniforms[u.toIndex()];
149 if (kUnusedUniform != uni.fLocation) {
155 const Uniform& uni = fUniforms[u.toIndex()];
158 if (kUnusedUniform != uni.fLocation) {
165 const float v[])
const {
166 const Uniform& uni = fUniforms[u.toIndex()];
170 if (kUnusedUniform != uni.fLocation) {
180 const Uniform& uni = fUniforms[u.toIndex()];
183 if (kUnusedUniform != uni.fLocation) {
190 const int32_t v[])
const {
191 const Uniform& uni = fUniforms[u.toIndex()];
195 if (kUnusedUniform != uni.fLocation) {
205 const Uniform& uni = fUniforms[u.toIndex()];
208 if (kUnusedUniform != uni.fLocation) {
215 const float v[])
const {
216 const Uniform& uni = fUniforms[u.toIndex()];
220 if (kUnusedUniform != uni.fLocation) {
226 this->setMatrices<2>(u, 1,
matrix);
230 this->setMatrices<3>(u, 1,
matrix);
234 this->setMatrices<4>(u, 1,
matrix);
238 this->setMatrices<2>(u, arrayCount,
m);
242 this->setMatrices<3>(u, arrayCount,
m);
246 this->setMatrices<4>(u, arrayCount,
m);
251template<
int N>
inline void GrGLProgramDataManager::setMatrices(UniformHandle u,
253 const float matrices[])
const {
254 const Uniform& uni = fUniforms[u.toIndex()];
259 if (kUnusedUniform != uni.fLocation) {
266 GR_GL_CALL(gli, UniformMatrix2fv(loc, cnt,
false,
m));
272 GR_GL_CALL(gli, UniformMatrix3fv(loc, cnt,
false,
m));
278 GR_GL_CALL(gli, UniformMatrix4fv(loc, cnt,
false,
m));
#define ASSERT_ARRAY_UPLOAD_IN_BOUNDS(UNI, COUNT)
#define GR_GL_CALL(IFACE, X)
SkMeshSpecification::Uniform Uniform
SkDEBUGCODE(SK_SPI) SkThreadID SkGetThreadID()
const GrGLInterface * glInterface() const
void set1iv(UniformHandle, int arrayCount, const int32_t v[]) const override
void setMatrix4fv(UniformHandle, int arrayCount, const float matrices[]) const override
void set2i(UniformHandle, int32_t, int32_t) const override
void set3iv(UniformHandle, int arrayCount, const int32_t v[]) const override
void set4fv(UniformHandle, int arrayCount, const float v[]) const override
void set4iv(UniformHandle, int arrayCount, const int32_t v[]) const override
void setMatrix3fv(UniformHandle, int arrayCount, const float matrices[]) const override
void setMatrix3f(UniformHandle, const float matrix[]) const override
GrGLProgramDataManager(GrGLGpu *, const UniformInfoArray &)
void setSamplerUniforms(const UniformInfoArray &samplers, int startUnit) const
void set3f(UniformHandle, float, float, float) const override
void setMatrix2fv(UniformHandle, int arrayCount, const float matrices[]) const override
void setMatrix2f(UniformHandle, const float matrix[]) const override
void setMatrix4f(UniformHandle, const float matrix[]) const override
void set4i(UniformHandle, int32_t, int32_t, int32_t, int32_t) const override
void set3fv(UniformHandle, int arrayCount, const float v[]) const override
void set4f(UniformHandle, float, float, float, float) const override
void set1i(UniformHandle, int32_t) const override
void set1f(UniformHandle, float v0) const override
void set2f(UniformHandle, float, float) const override
void set1fv(UniformHandle, int arrayCount, const float v[]) const override
void set2iv(UniformHandle, int arrayCount, const int32_t v[]) const override
void set2fv(UniformHandle, int arrayCount, const float v[]) const override
void set3i(UniformHandle, int32_t, int32_t, int32_t) const override
unsigned useCenter Optional< SkMatrix > matrix
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not set