| 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 "GrGLNameAllocator.h" | 10 #include "GrGLNameAllocator.h" |
| (...skipping 2964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2975 } else { | 2975 } else { |
| 2976 return true; | 2976 return true; |
| 2977 } | 2977 } |
| 2978 } | 2978 } |
| 2979 return INHERITED::onCanCopySurface(dst, src, srcRect, dstPoint); | 2979 return INHERITED::onCanCopySurface(dst, src, srcRect, dstPoint); |
| 2980 } | 2980 } |
| 2981 | 2981 |
| 2982 void GrGpuGL::didAddGpuTraceMarker() { | 2982 void GrGpuGL::didAddGpuTraceMarker() { |
| 2983 if (this->caps()->gpuTracingSupport()) { | 2983 if (this->caps()->gpuTracingSupport()) { |
| 2984 const GrTraceMarkerSet& markerArray = this->getActiveTraceMarkers(); | 2984 const GrTraceMarkerSet& markerArray = this->getActiveTraceMarkers(); |
| 2985 SkString markerString = markerArray.toString(); | 2985 SkString markerString = markerArray.toStringLast(); |
| 2986 GL_CALL(PushGroupMarker(0, markerString.c_str())); | 2986 GL_CALL(PushGroupMarker(0, markerString.c_str())); |
| 2987 } | 2987 } |
| 2988 } | 2988 } |
| 2989 | 2989 |
| 2990 void GrGpuGL::didRemoveGpuTraceMarker() { | 2990 void GrGpuGL::didRemoveGpuTraceMarker() { |
| 2991 if (this->caps()->gpuTracingSupport()) { | 2991 if (this->caps()->gpuTracingSupport()) { |
| 2992 GL_CALL(PopGroupMarker()); | 2992 GL_CALL(PopGroupMarker()); |
| 2993 } | 2993 } |
| 2994 } | 2994 } |
| 2995 /////////////////////////////////////////////////////////////////////////////// | 2995 /////////////////////////////////////////////////////////////////////////////// |
| (...skipping 22 matching lines...) Expand all Loading... |
| 3018 this->setVertexArrayID(gpu, 0); | 3018 this->setVertexArrayID(gpu, 0); |
| 3019 } | 3019 } |
| 3020 int attrCount = gpu->glCaps().maxVertexAttributes(); | 3020 int attrCount = gpu->glCaps().maxVertexAttributes(); |
| 3021 if (fDefaultVertexArrayAttribState.count() != attrCount) { | 3021 if (fDefaultVertexArrayAttribState.count() != attrCount) { |
| 3022 fDefaultVertexArrayAttribState.resize(attrCount); | 3022 fDefaultVertexArrayAttribState.resize(attrCount); |
| 3023 } | 3023 } |
| 3024 attribState = &fDefaultVertexArrayAttribState; | 3024 attribState = &fDefaultVertexArrayAttribState; |
| 3025 } | 3025 } |
| 3026 return attribState; | 3026 return attribState; |
| 3027 } | 3027 } |
| OLD | NEW |