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 2760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2771 return true; | 2771 return true; |
2772 } | 2772 } |
2773 } | 2773 } |
2774 return false; | 2774 return false; |
2775 } | 2775 } |
2776 | 2776 |
2777 void GrGLGpu::didAddGpuTraceMarker() { | 2777 void GrGLGpu::didAddGpuTraceMarker() { |
2778 if (this->caps()->gpuTracingSupport()) { | 2778 if (this->caps()->gpuTracingSupport()) { |
2779 const GrTraceMarkerSet& markerArray = this->getActiveTraceMarkers(); | 2779 const GrTraceMarkerSet& markerArray = this->getActiveTraceMarkers(); |
2780 SkString markerString = markerArray.toStringLast(); | 2780 SkString markerString = markerArray.toStringLast(); |
| 2781 #if GR_FORCE_GPU_TRACE_DEBUGGING |
| 2782 SkDebugf("%s\n", markerString.c_str()); |
| 2783 #else |
2781 GL_CALL(PushGroupMarker(0, markerString.c_str())); | 2784 GL_CALL(PushGroupMarker(0, markerString.c_str())); |
| 2785 #endif |
2782 } | 2786 } |
2783 } | 2787 } |
2784 | 2788 |
2785 void GrGLGpu::didRemoveGpuTraceMarker() { | 2789 void GrGLGpu::didRemoveGpuTraceMarker() { |
2786 if (this->caps()->gpuTracingSupport()) { | 2790 if (this->caps()->gpuTracingSupport()) { |
| 2791 #if GR_FORCE_GPU_TRACE_DEBUGGING |
| 2792 SkDebugf("Pop trace marker.\n"); |
| 2793 #else |
2787 GL_CALL(PopGroupMarker()); | 2794 GL_CALL(PopGroupMarker()); |
| 2795 #endif |
2788 } | 2796 } |
2789 } | 2797 } |
2790 | 2798 |
2791 /////////////////////////////////////////////////////////////////////////////// | 2799 /////////////////////////////////////////////////////////////////////////////// |
2792 | 2800 |
2793 GrGLAttribArrayState* GrGLGpu::HWGeometryState::bindArrayAndBuffersToDraw( | 2801 GrGLAttribArrayState* GrGLGpu::HWGeometryState::bindArrayAndBuffersToDraw( |
2794 GrGLGpu* gpu, | 2802 GrGLGpu* gpu, |
2795 const GrGLVertexBuffer* vbuffer, | 2803 const GrGLVertexBuffer* vbuffer, |
2796 const GrGLIndexBuffer* ibuffer)
{ | 2804 const GrGLIndexBuffer* ibuffer)
{ |
2797 SkASSERT(vbuffer); | 2805 SkASSERT(vbuffer); |
(...skipping 16 matching lines...) Expand all Loading... |
2814 this->setVertexArrayID(gpu, 0); | 2822 this->setVertexArrayID(gpu, 0); |
2815 } | 2823 } |
2816 int attrCount = gpu->glCaps().maxVertexAttributes(); | 2824 int attrCount = gpu->glCaps().maxVertexAttributes(); |
2817 if (fDefaultVertexArrayAttribState.count() != attrCount) { | 2825 if (fDefaultVertexArrayAttribState.count() != attrCount) { |
2818 fDefaultVertexArrayAttribState.resize(attrCount); | 2826 fDefaultVertexArrayAttribState.resize(attrCount); |
2819 } | 2827 } |
2820 attribState = &fDefaultVertexArrayAttribState; | 2828 attribState = &fDefaultVertexArrayAttribState; |
2821 } | 2829 } |
2822 return attribState; | 2830 return attribState; |
2823 } | 2831 } |
OLD | NEW |