| 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 "GrGLGLSL.h" | 10 #include "GrGLGLSL.h" |
| (...skipping 1483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1494 } | 1494 } |
| 1495 } | 1495 } |
| 1496 | 1496 |
| 1497 // See fall through note above | 1497 // See fall through note above |
| 1498 this->disableScissor(); | 1498 this->disableScissor(); |
| 1499 } | 1499 } |
| 1500 | 1500 |
| 1501 bool GrGLGpu::flushGLState(const DrawArgs& args) { | 1501 bool GrGLGpu::flushGLState(const DrawArgs& args) { |
| 1502 GrXferProcessor::BlendInfo blendInfo; | 1502 GrXferProcessor::BlendInfo blendInfo; |
| 1503 const GrPipeline& pipeline = *args.fPipeline; | 1503 const GrPipeline& pipeline = *args.fPipeline; |
| 1504 args.fPipeline->getXferProcessor()->getBlendInfo(&blendInfo); | 1504 args.fPipeline->getXferProcessor().getBlendInfo(&blendInfo); |
| 1505 | 1505 |
| 1506 this->flushColorWrite(blendInfo.fWriteColor); | 1506 this->flushColorWrite(blendInfo.fWriteColor); |
| 1507 this->flushDrawFace(pipeline.getDrawFace()); | 1507 this->flushDrawFace(pipeline.getDrawFace()); |
| 1508 | 1508 |
| 1509 SkAutoTUnref<GrGLProgram> program(fProgramCache->refProgram(args)); | 1509 SkAutoTUnref<GrGLProgram> program(fProgramCache->refProgram(args)); |
| 1510 if (!program) { | 1510 if (!program) { |
| 1511 GrCapsDebugf(this->caps(), "Failed to create program!\n"); | 1511 GrCapsDebugf(this->caps(), "Failed to create program!\n"); |
| 1512 return false; | 1512 return false; |
| 1513 } | 1513 } |
| 1514 | 1514 |
| (...skipping 2061 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3576 this->setVertexArrayID(gpu, 0); | 3576 this->setVertexArrayID(gpu, 0); |
| 3577 } | 3577 } |
| 3578 int attrCount = gpu->glCaps().maxVertexAttributes(); | 3578 int attrCount = gpu->glCaps().maxVertexAttributes(); |
| 3579 if (fDefaultVertexArrayAttribState.count() != attrCount) { | 3579 if (fDefaultVertexArrayAttribState.count() != attrCount) { |
| 3580 fDefaultVertexArrayAttribState.resize(attrCount); | 3580 fDefaultVertexArrayAttribState.resize(attrCount); |
| 3581 } | 3581 } |
| 3582 attribState = &fDefaultVertexArrayAttribState; | 3582 attribState = &fDefaultVertexArrayAttribState; |
| 3583 } | 3583 } |
| 3584 return attribState; | 3584 return attribState; |
| 3585 } | 3585 } |
| OLD | NEW |