| 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 | 8 |
| 9 #include "GrGLGpu.h" | 9 #include "GrGLGpu.h" |
| 10 #include "GrGLStencilBuffer.h" | 10 #include "GrGLStencilBuffer.h" |
| (...skipping 1433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1444 reinterpret_cast<GrGLvoid*>(vertexOffsetInBytes + o
ffset)); | 1444 reinterpret_cast<GrGLvoid*>(vertexOffsetInBytes + o
ffset)); |
| 1445 offset += attrib.fOffset; | 1445 offset += attrib.fOffset; |
| 1446 } | 1446 } |
| 1447 attribState->disableUnusedArrays(this, usedAttribArraysMask); | 1447 attribState->disableUnusedArrays(this, usedAttribArraysMask); |
| 1448 } | 1448 } |
| 1449 } | 1449 } |
| 1450 | 1450 |
| 1451 void GrGLGpu::buildProgramDesc(GrProgramDesc* desc, | 1451 void GrGLGpu::buildProgramDesc(GrProgramDesc* desc, |
| 1452 const GrPrimitiveProcessor& primProc, | 1452 const GrPrimitiveProcessor& primProc, |
| 1453 const GrPipeline& pipeline, | 1453 const GrPipeline& pipeline, |
| 1454 const GrProgramDesc::DescInfo& descInfo, |
| 1454 const GrBatchTracker& batchTracker) const { | 1455 const GrBatchTracker& batchTracker) const { |
| 1455 if (!GrGLProgramDescBuilder::Build(desc, primProc, pipeline, this, batchTrac
ker)) { | 1456 if (!GrGLProgramDescBuilder::Build(desc, primProc, pipeline, descInfo, this, |
| 1457 batchTracker)) { |
| 1456 SkDEBUGFAIL("Failed to generate GL program descriptor"); | 1458 SkDEBUGFAIL("Failed to generate GL program descriptor"); |
| 1457 } | 1459 } |
| 1458 } | 1460 } |
| 1459 | 1461 |
| 1460 void GrGLGpu::disableScissor() { | 1462 void GrGLGpu::disableScissor() { |
| 1461 if (kNo_TriState != fHWScissorSettings.fEnabled) { | 1463 if (kNo_TriState != fHWScissorSettings.fEnabled) { |
| 1462 GL_CALL(Disable(GR_GL_SCISSOR_TEST)); | 1464 GL_CALL(Disable(GR_GL_SCISSOR_TEST)); |
| 1463 fHWScissorSettings.fEnabled = kNo_TriState; | 1465 fHWScissorSettings.fEnabled = kNo_TriState; |
| 1464 return; | 1466 return; |
| 1465 } | 1467 } |
| (...skipping 1299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2765 this->setVertexArrayID(gpu, 0); | 2767 this->setVertexArrayID(gpu, 0); |
| 2766 } | 2768 } |
| 2767 int attrCount = gpu->glCaps().maxVertexAttributes(); | 2769 int attrCount = gpu->glCaps().maxVertexAttributes(); |
| 2768 if (fDefaultVertexArrayAttribState.count() != attrCount) { | 2770 if (fDefaultVertexArrayAttribState.count() != attrCount) { |
| 2769 fDefaultVertexArrayAttribState.resize(attrCount); | 2771 fDefaultVertexArrayAttribState.resize(attrCount); |
| 2770 } | 2772 } |
| 2771 attribState = &fDefaultVertexArrayAttribState; | 2773 attribState = &fDefaultVertexArrayAttribState; |
| 2772 } | 2774 } |
| 2773 return attribState; | 2775 return attribState; |
| 2774 } | 2776 } |
| OLD | NEW |