| 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 "GrGpuGL.h" | 9 #include "GrGpuGL.h" |
| 10 #include "GrGLStencilBuffer.h" | 10 #include "GrGLStencilBuffer.h" |
| (...skipping 2562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2573 SkString markerString = markerArray.toStringLast(); | 2573 SkString markerString = markerArray.toStringLast(); |
| 2574 GL_CALL(PushGroupMarker(0, markerString.c_str())); | 2574 GL_CALL(PushGroupMarker(0, markerString.c_str())); |
| 2575 } | 2575 } |
| 2576 } | 2576 } |
| 2577 | 2577 |
| 2578 void GrGpuGL::didRemoveGpuTraceMarker() { | 2578 void GrGpuGL::didRemoveGpuTraceMarker() { |
| 2579 if (this->caps()->gpuTracingSupport()) { | 2579 if (this->caps()->gpuTracingSupport()) { |
| 2580 GL_CALL(PopGroupMarker()); | 2580 GL_CALL(PopGroupMarker()); |
| 2581 } | 2581 } |
| 2582 } | 2582 } |
| 2583 |
| 2583 /////////////////////////////////////////////////////////////////////////////// | 2584 /////////////////////////////////////////////////////////////////////////////// |
| 2584 | 2585 |
| 2585 GrGLAttribArrayState* GrGpuGL::HWGeometryState::bindArrayAndBuffersToDraw( | 2586 GrGLAttribArrayState* GrGpuGL::HWGeometryState::bindArrayAndBuffersToDraw( |
| 2586 GrGpuGL* gpu, | 2587 GrGpuGL* gpu, |
| 2587 const GrGLVertexBuffer* vbuffer, | 2588 const GrGLVertexBuffer* vbuffer, |
| 2588 const GrGLIndexBuffer* ibuffer)
{ | 2589 const GrGLIndexBuffer* ibuffer)
{ |
| 2589 SkASSERT(vbuffer); | 2590 SkASSERT(vbuffer); |
| 2590 GrGLAttribArrayState* attribState; | 2591 GrGLAttribArrayState* attribState; |
| 2591 | 2592 |
| 2592 // We use a vertex array if we're on a core profile and the verts are in a V
BO. | 2593 // We use a vertex array if we're on a core profile and the verts are in a V
BO. |
| (...skipping 13 matching lines...) Expand all Loading... |
| 2606 this->setVertexArrayID(gpu, 0); | 2607 this->setVertexArrayID(gpu, 0); |
| 2607 } | 2608 } |
| 2608 int attrCount = gpu->glCaps().maxVertexAttributes(); | 2609 int attrCount = gpu->glCaps().maxVertexAttributes(); |
| 2609 if (fDefaultVertexArrayAttribState.count() != attrCount) { | 2610 if (fDefaultVertexArrayAttribState.count() != attrCount) { |
| 2610 fDefaultVertexArrayAttribState.resize(attrCount); | 2611 fDefaultVertexArrayAttribState.resize(attrCount); |
| 2611 } | 2612 } |
| 2612 attribState = &fDefaultVertexArrayAttribState; | 2613 attribState = &fDefaultVertexArrayAttribState; |
| 2613 } | 2614 } |
| 2614 return attribState; | 2615 return attribState; |
| 2615 } | 2616 } |
| OLD | NEW |