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 2736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2747 if(!SkIRect::IntersectsNoEmptyCheck(dstRect, srcRect)) { | 2747 if(!SkIRect::IntersectsNoEmptyCheck(dstRect, srcRect)) { |
2748 return true; | 2748 return true; |
2749 } | 2749 } |
2750 } else { | 2750 } else { |
2751 return true; | 2751 return true; |
2752 } | 2752 } |
2753 } | 2753 } |
2754 return INHERITED::onCanCopySurface(dst, src, srcRect, dstPoint); | 2754 return INHERITED::onCanCopySurface(dst, src, srcRect, dstPoint); |
2755 } | 2755 } |
2756 | 2756 |
2757 void GrGpuGL::onInstantGpuTraceEvent(const char* marker) { | 2757 void GrGpuGL::didAddGpuTraceMarker() { |
2758 if (this->caps()->gpuTracingSupport()) { | 2758 if (this->caps()->gpuTracingSupport()) { |
2759 // GL_CALL(InsertEventMarker(0, marker)); | 2759 const GrTraceMarkerSet& markerArray = this->getActiveTraceMarkers(); |
| 2760 SkString markerString = markerArray.toString(); |
| 2761 GL_CALL(PushGroupMarker(0, markerString.c_str())); |
2760 } | 2762 } |
2761 } | 2763 } |
2762 | 2764 |
2763 void GrGpuGL::onPushGpuTraceEvent(const char* marker) { | 2765 void GrGpuGL::didRemoveGpuTraceMarker() { |
2764 if (this->caps()->gpuTracingSupport()) { | 2766 if (this->caps()->gpuTracingSupport()) { |
2765 // GL_CALL(PushGroupMarker(0, marker)); | 2767 GL_CALL(PopGroupMarker()); |
2766 } | 2768 } |
2767 } | 2769 } |
2768 | |
2769 void GrGpuGL::onPopGpuTraceEvent() { | |
2770 if (this->caps()->gpuTracingSupport()) { | |
2771 // GL_CALL(PopGroupMarker()); | |
2772 } | |
2773 } | |
2774 | |
2775 /////////////////////////////////////////////////////////////////////////////// | 2770 /////////////////////////////////////////////////////////////////////////////// |
2776 | 2771 |
2777 GrGLAttribArrayState* GrGpuGL::HWGeometryState::bindArrayAndBuffersToDraw( | 2772 GrGLAttribArrayState* GrGpuGL::HWGeometryState::bindArrayAndBuffersToDraw( |
2778 GrGpuGL* gpu, | 2773 GrGpuGL* gpu, |
2779 const GrGLVertexBuffer* vbuffer, | 2774 const GrGLVertexBuffer* vbuffer, |
2780 const GrGLIndexBuffer* ibuffer)
{ | 2775 const GrGLIndexBuffer* ibuffer)
{ |
2781 SkASSERT(NULL != vbuffer); | 2776 SkASSERT(NULL != vbuffer); |
2782 GrGLAttribArrayState* attribState; | 2777 GrGLAttribArrayState* attribState; |
2783 | 2778 |
2784 // We use a vertex array if we're on a core profile and the verts are in a V
BO. | 2779 // 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... |
2798 this->setVertexArrayID(gpu, 0); | 2793 this->setVertexArrayID(gpu, 0); |
2799 } | 2794 } |
2800 int attrCount = gpu->glCaps().maxVertexAttributes(); | 2795 int attrCount = gpu->glCaps().maxVertexAttributes(); |
2801 if (fDefaultVertexArrayAttribState.count() != attrCount) { | 2796 if (fDefaultVertexArrayAttribState.count() != attrCount) { |
2802 fDefaultVertexArrayAttribState.resize(attrCount); | 2797 fDefaultVertexArrayAttribState.resize(attrCount); |
2803 } | 2798 } |
2804 attribState = &fDefaultVertexArrayAttribState; | 2799 attribState = &fDefaultVertexArrayAttribState; |
2805 } | 2800 } |
2806 return attribState; | 2801 return attribState; |
2807 } | 2802 } |
OLD | NEW |