| 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 2643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2654 if(!SkIRect::IntersectsNoEmptyCheck(dstRect, srcRect)) { | 2654 if(!SkIRect::IntersectsNoEmptyCheck(dstRect, srcRect)) { |
| 2655 return true; | 2655 return true; |
| 2656 } | 2656 } |
| 2657 } else { | 2657 } else { |
| 2658 return true; | 2658 return true; |
| 2659 } | 2659 } |
| 2660 } | 2660 } |
| 2661 return INHERITED::onCanCopySurface(dst, src, srcRect, dstPoint); | 2661 return INHERITED::onCanCopySurface(dst, src, srcRect, dstPoint); |
| 2662 } | 2662 } |
| 2663 | 2663 |
| 2664 void GrGpuGL::onInstantGpuTraceEvent(const char* marker) { | 2664 void GrGpuGL::didAddGpuTraceMarker() { |
| 2665 if (this->caps()->gpuTracingSupport()) { | 2665 if (this->caps()->gpuTracingSupport()) { |
| 2666 // GL_CALL(InsertEventMarker(0, marker)); | 2666 const GrTraceMarkerSet& markerArray = this->getActiveTraceMarkers(); |
| 2667 SkString markerString = markerArray.toString(); |
| 2668 GL_CALL(PushGroupMarker(0, markerString.c_str())); |
| 2667 } | 2669 } |
| 2668 } | 2670 } |
| 2669 | 2671 |
| 2670 void GrGpuGL::onPushGpuTraceEvent(const char* marker) { | 2672 void GrGpuGL::didRemoveGpuTraceMarker() { |
| 2671 if (this->caps()->gpuTracingSupport()) { | 2673 if (this->caps()->gpuTracingSupport()) { |
| 2672 // GL_CALL(PushGroupMarker(0, marker)); | 2674 GL_CALL(PopGroupMarker()); |
| 2673 } | 2675 } |
| 2674 } | 2676 } |
| 2675 | |
| 2676 void GrGpuGL::onPopGpuTraceEvent() { | |
| 2677 if (this->caps()->gpuTracingSupport()) { | |
| 2678 // GL_CALL(PopGroupMarker()); | |
| 2679 } | |
| 2680 } | |
| 2681 | |
| 2682 /////////////////////////////////////////////////////////////////////////////// | 2677 /////////////////////////////////////////////////////////////////////////////// |
| 2683 | 2678 |
| 2684 GrGLAttribArrayState* GrGpuGL::HWGeometryState::bindArrayAndBuffersToDraw( | 2679 GrGLAttribArrayState* GrGpuGL::HWGeometryState::bindArrayAndBuffersToDraw( |
| 2685 GrGpuGL* gpu, | 2680 GrGpuGL* gpu, |
| 2686 const GrGLVertexBuffer* vbuffer, | 2681 const GrGLVertexBuffer* vbuffer, |
| 2687 const GrGLIndexBuffer* ibuffer)
{ | 2682 const GrGLIndexBuffer* ibuffer)
{ |
| 2688 SkASSERT(NULL != vbuffer); | 2683 SkASSERT(NULL != vbuffer); |
| 2689 GrGLAttribArrayState* attribState; | 2684 GrGLAttribArrayState* attribState; |
| 2690 | 2685 |
| 2691 // We use a vertex array if we're on a core profile and the verts are in a V
BO. | 2686 // 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... |
| 2705 this->setVertexArrayID(gpu, 0); | 2700 this->setVertexArrayID(gpu, 0); |
| 2706 } | 2701 } |
| 2707 int attrCount = gpu->glCaps().maxVertexAttributes(); | 2702 int attrCount = gpu->glCaps().maxVertexAttributes(); |
| 2708 if (fDefaultVertexArrayAttribState.count() != attrCount) { | 2703 if (fDefaultVertexArrayAttribState.count() != attrCount) { |
| 2709 fDefaultVertexArrayAttribState.resize(attrCount); | 2704 fDefaultVertexArrayAttribState.resize(attrCount); |
| 2710 } | 2705 } |
| 2711 attribState = &fDefaultVertexArrayAttribState; | 2706 attribState = &fDefaultVertexArrayAttribState; |
| 2712 } | 2707 } |
| 2713 return attribState; | 2708 return attribState; |
| 2714 } | 2709 } |
| OLD | NEW |