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