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

Side by Side Diff: cc/base/region.cc

Issue 421183003: Revert of Add builders for tracing event's structural arguments (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « cc/base/region.h ('k') | cc/debug/frame_viewer_instrumentation.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/base/region.h" 5 #include "cc/base/region.h"
6 #include "base/debug/trace_event_argument.h"
7 #include "base/values.h" 6 #include "base/values.h"
8 7
9 namespace cc { 8 namespace cc {
10 9
11 Region::Region() { 10 Region::Region() {
12 } 11 }
13 12
14 Region::Region(const Region& region) 13 Region::Region(const Region& region)
15 : skregion_(region.skregion_) { 14 : skregion_(region.skregion_) {
16 } 15 }
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 for (Iterator it(*this); it.has_rect(); it.next()) { 113 for (Iterator it(*this); it.has_rect(); it.next()) {
115 gfx::Rect rect(it.rect()); 114 gfx::Rect rect(it.rect());
116 result->AppendInteger(rect.x()); 115 result->AppendInteger(rect.x());
117 result->AppendInteger(rect.y()); 116 result->AppendInteger(rect.y());
118 result->AppendInteger(rect.width()); 117 result->AppendInteger(rect.width());
119 result->AppendInteger(rect.height()); 118 result->AppendInteger(rect.height());
120 } 119 }
121 return result.PassAs<base::Value>(); 120 return result.PassAs<base::Value>();
122 } 121 }
123 122
124 void Region::AsValueInto(base::debug::TracedValue* result) const {
125 for (Iterator it(*this); it.has_rect(); it.next()) {
126 gfx::Rect rect(it.rect());
127 result->AppendInteger(rect.x());
128 result->AppendInteger(rect.y());
129 result->AppendInteger(rect.width());
130 result->AppendInteger(rect.height());
131 }
132 }
133
134 Region::Iterator::Iterator() { 123 Region::Iterator::Iterator() {
135 } 124 }
136 125
137 Region::Iterator::Iterator(const Region& region) 126 Region::Iterator::Iterator(const Region& region)
138 : it_(region.skregion_) { 127 : it_(region.skregion_) {
139 } 128 }
140 129
141 Region::Iterator::~Iterator() { 130 Region::Iterator::~Iterator() {
142 } 131 }
143 132
144 } // namespace cc 133 } // namespace cc
OLDNEW
« no previous file with comments | « cc/base/region.h ('k') | cc/debug/frame_viewer_instrumentation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698