| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2014 Google Inc. | 3 * Copyright 2014 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 #include "GrTraceMarker.h" | 9 #include "GrTraceMarker.h" |
| 10 #include "GrTracing.h" | 10 #include "GrTracing.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 } | 55 } |
| 56 | 56 |
| 57 SkString GrTraceMarkerSet::toString() const { | 57 SkString GrTraceMarkerSet::toString() const { |
| 58 SkTQSort<GrGpuTraceMarker>(this->fMarkerArray.begin(), this->fMarkerArray.en
d() - 1); | 58 SkTQSort<GrGpuTraceMarker>(this->fMarkerArray.begin(), this->fMarkerArray.en
d() - 1); |
| 59 SkString marker_string; | 59 SkString marker_string; |
| 60 const char* prevMarkerName = ""; | 60 const char* prevMarkerName = ""; |
| 61 int prevMarkerID = -1; | 61 int prevMarkerID = -1; |
| 62 int counter = 0; | 62 int counter = 0; |
| 63 const int numMarkers = this->fMarkerArray.count(); | 63 const int numMarkers = this->fMarkerArray.count(); |
| 64 | 64 |
| 65 // check used for GrGpuGL device after we've already collapsed all markers | 65 // check used for GrGLGpu device after we've already collapsed all markers |
| 66 if (1 == numMarkers && -1 == this->fMarkerArray[0].fID) { | 66 if (1 == numMarkers && -1 == this->fMarkerArray[0].fID) { |
| 67 marker_string.append(this->fMarkerArray[0].fMarker); | 67 marker_string.append(this->fMarkerArray[0].fMarker); |
| 68 return marker_string; | 68 return marker_string; |
| 69 } | 69 } |
| 70 | 70 |
| 71 for (int i = 0; i < numMarkers; ++i ) { | 71 for (int i = 0; i < numMarkers; ++i ) { |
| 72 GrGpuTraceMarker& currMarker = this->fMarkerArray[i]; | 72 GrGpuTraceMarker& currMarker = this->fMarkerArray[i]; |
| 73 const char* currCmd = currMarker.fMarker; | 73 const char* currCmd = currMarker.fMarker; |
| 74 if (currCmd != prevMarkerName) { | 74 if (currCmd != prevMarkerName) { |
| 75 if (prevMarkerID != -1) { | 75 if (prevMarkerID != -1) { |
| (...skipping 19 matching lines...) Expand all Loading... |
| 95 } | 95 } |
| 96 | 96 |
| 97 GrTraceMarkerSet::Iter GrTraceMarkerSet::begin() const { | 97 GrTraceMarkerSet::Iter GrTraceMarkerSet::begin() const { |
| 98 return Iter(this, 0); | 98 return Iter(this, 0); |
| 99 } | 99 } |
| 100 | 100 |
| 101 GrTraceMarkerSet::Iter GrTraceMarkerSet::end() const { | 101 GrTraceMarkerSet::Iter GrTraceMarkerSet::end() const { |
| 102 return Iter(this, this->fMarkerArray.count()); | 102 return Iter(this, this->fMarkerArray.count()); |
| 103 } | 103 } |
| 104 | 104 |
| OLD | NEW |