| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 "GrGLProgramBuilder.h" | 8 #include "GrGLProgramBuilder.h" |
| 9 | 9 |
| 10 #include "GrAutoLocaleSetter.h" | 10 #include "GrAutoLocaleSetter.h" |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 programID = 0; | 227 programID = 0; |
| 228 } | 228 } |
| 229 return SkToBool(linked); | 229 return SkToBool(linked); |
| 230 } | 230 } |
| 231 | 231 |
| 232 void GrGLProgramBuilder::resolveProgramResourceLocations(GrGLuint programID) { | 232 void GrGLProgramBuilder::resolveProgramResourceLocations(GrGLuint programID) { |
| 233 fUniformHandler.getUniformLocations(programID, fGpu->glCaps()); | 233 fUniformHandler.getUniformLocations(programID, fGpu->glCaps()); |
| 234 | 234 |
| 235 // handle NVPR separable varyings | 235 // handle NVPR separable varyings |
| 236 if (!fGpu->glCaps().shaderCaps()->pathRenderingSupport() || | 236 if (!fGpu->glCaps().shaderCaps()->pathRenderingSupport() || |
| 237 !fGpu->glPathRendering()->shouldBindFragmentInputs()) { | 237 fGpu->glPathRendering()->shouldBindFragmentInputs()) { |
| 238 return; | 238 return; |
| 239 } | 239 } |
| 240 int count = fVaryingHandler.fPathProcVaryingInfos.count(); | 240 int count = fVaryingHandler.fPathProcVaryingInfos.count(); |
| 241 for (int i = 0; i < count; ++i) { | 241 for (int i = 0; i < count; ++i) { |
| 242 GrGLint location; | 242 GrGLint location; |
| 243 GL_CALL_RET(location, GetProgramResourceLocation( | 243 GL_CALL_RET(location, GetProgramResourceLocation( |
| 244 programID, | 244 programID, |
| 245 GR_GL_FRAGMENT_INPUT, | 245 GR_GL_FRAGMENT_INPUT, |
| 246 fVaryingHandler.fPathProcVaryingInfos[i].
fVariable.c_str())); | 246 fVaryingHandler.fPathProcVaryingInfos[i].
fVariable.c_str())); |
| 247 fVaryingHandler.fPathProcVaryingInfos[i].fLocation = location; | 247 fVaryingHandler.fPathProcVaryingInfos[i].fLocation = location; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 265 fUniformHandles, | 265 fUniformHandles, |
| 266 programID, | 266 programID, |
| 267 fUniformHandler.fUniforms, | 267 fUniformHandler.fUniforms, |
| 268 fVaryingHandler.fPathProcVaryingInfos, | 268 fVaryingHandler.fPathProcVaryingInfos, |
| 269 fGeometryProcessor, | 269 fGeometryProcessor, |
| 270 fXferProcessor, | 270 fXferProcessor, |
| 271 fFragmentProcessors, | 271 fFragmentProcessors, |
| 272 &fSamplerUniforms); | 272 &fSamplerUniforms); |
| 273 } | 273 } |
| 274 | 274 |
| OLD | NEW |