| 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 #include "gl/GrGLPathRendering.h" | 8 #include "gl/GrGLProgramDataManager.h" |
| 9 #include "gl/GrGLUniformHandle.h" | 9 #include "gl/GrGLUniformHandle.h" |
| 10 #include "gl/GrGLGpu.h" | 10 #include "gl/GrGLGpu.h" |
| 11 #include "SkMatrix.h" | 11 #include "SkMatrix.h" |
| 12 | 12 |
| 13 #define ASSERT_ARRAY_UPLOAD_IN_BOUNDS(UNI, COUNT) \ | 13 #define ASSERT_ARRAY_UPLOAD_IN_BOUNDS(UNI, COUNT) \ |
| 14 SkASSERT(arrayCount <= uni.fArrayCount || \ | 14 SkASSERT(arrayCount <= uni.fArrayCount || \ |
| 15 (1 == arrayCount && GrGLShaderVar::kNonArray == uni.fArrayCoun
t)) | 15 (1 == arrayCount && GrGLShaderVar::kNonArray == uni.fArrayCoun
t)) |
| 16 | 16 |
| 17 GrGLProgramDataManager::GrGLProgramDataManager(GrGLGpu* gpu, const UniformInfoAr
ray& uniforms) | 17 GrGLProgramDataManager::GrGLProgramDataManager(GrGLGpu* gpu, const UniformInfoAr
ray& uniforms) |
| 18 : fGpu(gpu) { | 18 : fGpu(gpu) { |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 this->setMatrix3f(u, mt); | 258 this->setMatrix3f(u, mt); |
| 259 } | 259 } |
| 260 | 260 |
| 261 #ifdef SK_DEBUG | 261 #ifdef SK_DEBUG |
| 262 void GrGLProgramDataManager::printUnused(const Uniform& uni) const { | 262 void GrGLProgramDataManager::printUnused(const Uniform& uni) const { |
| 263 if (kUnusedUniform == uni.fFSLocation && kUnusedUniform == uni.fVSLocation)
{ | 263 if (kUnusedUniform == uni.fFSLocation && kUnusedUniform == uni.fVSLocation)
{ |
| 264 GrCapsDebugf(fGpu->caps(), "Unused uniform in shader\n"); | 264 GrCapsDebugf(fGpu->caps(), "Unused uniform in shader\n"); |
| 265 } | 265 } |
| 266 } | 266 } |
| 267 #endif | 267 #endif |
| OLD | NEW |