| 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 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::blendBarrier() { |
| 2772 // This shouldn't be called if there is coherent (or no) support for advance
d blend equations. |
| 2773 SkASSERT(GrDrawTargetCaps::kAdvanced_BlendEquationSupport == |
| 2774 this->caps()->blendEquationSupport()); |
| 2775 GL_CALL(BlendBarrier()); |
| 2776 } |
| 2777 |
| 2771 void GrGLGpu::didAddGpuTraceMarker() { | 2778 void GrGLGpu::didAddGpuTraceMarker() { |
| 2772 if (this->caps()->gpuTracingSupport()) { | 2779 if (this->caps()->gpuTracingSupport()) { |
| 2773 const GrTraceMarkerSet& markerArray = this->getActiveTraceMarkers(); | 2780 const GrTraceMarkerSet& markerArray = this->getActiveTraceMarkers(); |
| 2774 SkString markerString = markerArray.toStringLast(); | 2781 SkString markerString = markerArray.toStringLast(); |
| 2775 #if GR_FORCE_GPU_TRACE_DEBUGGING | 2782 #if GR_FORCE_GPU_TRACE_DEBUGGING |
| 2776 SkDebugf("%s\n", markerString.c_str()); | 2783 SkDebugf("%s\n", markerString.c_str()); |
| 2777 #else | 2784 #else |
| 2778 GL_CALL(PushGroupMarker(0, markerString.c_str())); | 2785 GL_CALL(PushGroupMarker(0, markerString.c_str())); |
| 2779 #endif | 2786 #endif |
| 2780 } | 2787 } |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2816 this->setVertexArrayID(gpu, 0); | 2823 this->setVertexArrayID(gpu, 0); |
| 2817 } | 2824 } |
| 2818 int attrCount = gpu->glCaps().maxVertexAttributes(); | 2825 int attrCount = gpu->glCaps().maxVertexAttributes(); |
| 2819 if (fDefaultVertexArrayAttribState.count() != attrCount) { | 2826 if (fDefaultVertexArrayAttribState.count() != attrCount) { |
| 2820 fDefaultVertexArrayAttribState.resize(attrCount); | 2827 fDefaultVertexArrayAttribState.resize(attrCount); |
| 2821 } | 2828 } |
| 2822 attribState = &fDefaultVertexArrayAttribState; | 2829 attribState = &fDefaultVertexArrayAttribState; |
| 2823 } | 2830 } |
| 2824 return attribState; | 2831 return attribState; |
| 2825 } | 2832 } |
| OLD | NEW |