OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 "GrGpuGL.h" | 8 #include "GrGpuGL.h" |
9 | 9 |
10 #include "GrEffect.h" | 10 #include "GrEffect.h" |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 this, | 284 this, |
285 dstCopy, | 285 dstCopy, |
286 &colorStages, | 286 &colorStages, |
287 &coverageStages, | 287 &coverageStages, |
288 &desc); | 288 &desc); |
289 | 289 |
290 fCurrentProgram.reset(fProgramCache->getProgram(desc, | 290 fCurrentProgram.reset(fProgramCache->getProgram(desc, |
291 colorStages.begin(), | 291 colorStages.begin(), |
292 coverageStages.begin()))
; | 292 coverageStages.begin()))
; |
293 if (NULL == fCurrentProgram.get()) { | 293 if (NULL == fCurrentProgram.get()) { |
294 SkASSERT(!"Failed to create program!"); | 294 SkDEBUGFAIL("Failed to create program!"); |
295 return false; | 295 return false; |
296 } | 296 } |
297 fCurrentProgram.get()->ref(); | 297 fCurrentProgram.get()->ref(); |
298 | 298 |
299 GrGLuint programID = fCurrentProgram->programID(); | 299 GrGLuint programID = fCurrentProgram->programID(); |
300 if (fHWProgramID != programID) { | 300 if (fHWProgramID != programID) { |
301 GL_CALL(UseProgram(programID)); | 301 GL_CALL(UseProgram(programID)); |
302 fHWProgramID = programID; | 302 fHWProgramID = programID; |
303 } | 303 } |
304 | 304 |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 GrGLAttribTypeToLayout(attribType).fCount, | 398 GrGLAttribTypeToLayout(attribType).fCount, |
399 GrGLAttribTypeToLayout(attribType).fType, | 399 GrGLAttribTypeToLayout(attribType).fType, |
400 GrGLAttribTypeToLayout(attribType).fNormalized, | 400 GrGLAttribTypeToLayout(attribType).fNormalized, |
401 stride, | 401 stride, |
402 reinterpret_cast<GrGLvoid*>( | 402 reinterpret_cast<GrGLvoid*>( |
403 vertexOffsetInBytes + vertexAttrib->fOffset)); | 403 vertexOffsetInBytes + vertexAttrib->fOffset)); |
404 } | 404 } |
405 | 405 |
406 attribState->disableUnusedAttribArrays(this, usedAttribArraysMask); | 406 attribState->disableUnusedAttribArrays(this, usedAttribArraysMask); |
407 } | 407 } |
OLD | NEW |