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 "GrGLStencilAttachment.h" | 10 #include "GrGLStencilAttachment.h" |
(...skipping 2750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2761 if(!SkIRect::IntersectsNoEmptyCheck(dstRect, srcRect)) { | 2761 if(!SkIRect::IntersectsNoEmptyCheck(dstRect, srcRect)) { |
2762 return true; | 2762 return true; |
2763 } | 2763 } |
2764 } else { | 2764 } else { |
2765 return true; | 2765 return true; |
2766 } | 2766 } |
2767 } | 2767 } |
2768 return false; | 2768 return false; |
2769 } | 2769 } |
2770 | 2770 |
2771 void GrGLGpu::setXferBarrier(GrXferBarrierType type) { | |
2772 switch (type) { | |
2773 case kTexture_GrXferBarrierType: | |
2774 SkASSERT(this->caps()->textureBarrierSupport()); | |
Chris Dalton
2015/04/17 08:06:05
I can update this to an if instead of an assert, t
bsalomon
2015/04/21 15:19:27
I think an assert is fine. Technically a client co
| |
2775 GL_CALL(TextureBarrier()); | |
2776 return; | |
2777 } | |
2778 } | |
2779 | |
2771 void GrGLGpu::didAddGpuTraceMarker() { | 2780 void GrGLGpu::didAddGpuTraceMarker() { |
2772 if (this->caps()->gpuTracingSupport()) { | 2781 if (this->caps()->gpuTracingSupport()) { |
2773 const GrTraceMarkerSet& markerArray = this->getActiveTraceMarkers(); | 2782 const GrTraceMarkerSet& markerArray = this->getActiveTraceMarkers(); |
2774 SkString markerString = markerArray.toStringLast(); | 2783 SkString markerString = markerArray.toStringLast(); |
2775 #if GR_FORCE_GPU_TRACE_DEBUGGING | 2784 #if GR_FORCE_GPU_TRACE_DEBUGGING |
2776 SkDebugf("%s\n", markerString.c_str()); | 2785 SkDebugf("%s\n", markerString.c_str()); |
2777 #else | 2786 #else |
2778 GL_CALL(PushGroupMarker(0, markerString.c_str())); | 2787 GL_CALL(PushGroupMarker(0, markerString.c_str())); |
2779 #endif | 2788 #endif |
2780 } | 2789 } |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2816 this->setVertexArrayID(gpu, 0); | 2825 this->setVertexArrayID(gpu, 0); |
2817 } | 2826 } |
2818 int attrCount = gpu->glCaps().maxVertexAttributes(); | 2827 int attrCount = gpu->glCaps().maxVertexAttributes(); |
2819 if (fDefaultVertexArrayAttribState.count() != attrCount) { | 2828 if (fDefaultVertexArrayAttribState.count() != attrCount) { |
2820 fDefaultVertexArrayAttribState.resize(attrCount); | 2829 fDefaultVertexArrayAttribState.resize(attrCount); |
2821 } | 2830 } |
2822 attribState = &fDefaultVertexArrayAttribState; | 2831 attribState = &fDefaultVertexArrayAttribState; |
2823 } | 2832 } |
2824 return attribState; | 2833 return attribState; |
2825 } | 2834 } |
OLD | NEW |