Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(643)

Side by Side Diff: src/gpu/GrTraceMarker.h

Issue 341583002: Modify gpu debug markers to store gpu device markers when a flush occurs. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/gpu/GrInOrderDrawBuffer.cpp ('k') | src/gpu/GrTraceMarker.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "SkTDArray.h" 9 #include "SkTDArray.h"
10 10
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 class Iter; 58 class Iter;
59 59
60 Iter begin() const; 60 Iter begin() const;
61 61
62 Iter end() const; 62 Iter end() const;
63 63
64 private: 64 private:
65 mutable SkTDArray<GrGpuTraceMarker> fMarkerArray; 65 mutable SkTDArray<GrGpuTraceMarker> fMarkerArray;
66 }; 66 };
67 67
68 class GrTraceMarkerSet::Iter {
69 public:
70 Iter() {};
71 Iter& operator=(const Iter& i) {
72 fCurrentIndex = i.fCurrentIndex;
73 fMarkers = i.fMarkers;
74 return *this;
75 }
76 bool operator==(const Iter& i) const {
77 return fCurrentIndex == i.fCurrentIndex && fMarkers == i.fMarkers;
78 }
79 bool operator!=(const Iter& i) const { return !(*this == i); }
80 const GrGpuTraceMarker& operator*() const { return fMarkers->fMarkerArray[fC urrentIndex]; }
81 Iter& operator++() {
82 SkASSERT(*this != fMarkers->end());
83 ++fCurrentIndex;
84 return *this;
85 }
86
87 private:
88 friend class GrTraceMarkerSet;
89 Iter(const GrTraceMarkerSet* markers, int index)
90 : fMarkers(markers), fCurrentIndex(index) {
91 SkASSERT(markers);
92 }
93
94 const GrTraceMarkerSet* fMarkers;
95 int fCurrentIndex;
96 };
97
68 #endif 98 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrInOrderDrawBuffer.cpp ('k') | src/gpu/GrTraceMarker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698