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

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

Issue 935333002: Update from https://crrev.com/316786 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 | « cc/base/region.h ('k') | cc/base/switches.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 6
7 #include "base/trace_event/trace_event_argument.h" 7 #include "base/trace_event/trace_event_argument.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "cc/base/simple_enclosed_region.h" 9 #include "cc/base/simple_enclosed_region.h"
10 10
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 for (Iterator it(*this); it.has_rect(); it.next()) { 123 for (Iterator it(*this); it.has_rect(); it.next()) {
124 gfx::Rect rect(it.rect()); 124 gfx::Rect rect(it.rect());
125 result->AppendInteger(rect.x()); 125 result->AppendInteger(rect.x());
126 result->AppendInteger(rect.y()); 126 result->AppendInteger(rect.y());
127 result->AppendInteger(rect.width()); 127 result->AppendInteger(rect.width());
128 result->AppendInteger(rect.height()); 128 result->AppendInteger(rect.height());
129 } 129 }
130 return result.Pass(); 130 return result.Pass();
131 } 131 }
132 132
133 void Region::AsValueInto(base::debug::TracedValue* result) const { 133 void Region::AsValueInto(base::trace_event::TracedValue* result) const {
134 for (Iterator it(*this); it.has_rect(); it.next()) { 134 for (Iterator it(*this); it.has_rect(); it.next()) {
135 gfx::Rect rect(it.rect()); 135 gfx::Rect rect(it.rect());
136 result->AppendInteger(rect.x()); 136 result->AppendInteger(rect.x());
137 result->AppendInteger(rect.y()); 137 result->AppendInteger(rect.y());
138 result->AppendInteger(rect.width()); 138 result->AppendInteger(rect.width());
139 result->AppendInteger(rect.height()); 139 result->AppendInteger(rect.height());
140 } 140 }
141 } 141 }
142 142
143 Region::Iterator::Iterator() { 143 Region::Iterator::Iterator() {
144 } 144 }
145 145
146 Region::Iterator::Iterator(const Region& region) 146 Region::Iterator::Iterator(const Region& region)
147 : it_(region.skregion_) { 147 : it_(region.skregion_) {
148 } 148 }
149 149
150 Region::Iterator::~Iterator() { 150 Region::Iterator::~Iterator() {
151 } 151 }
152 152
153 } // namespace cc 153 } // namespace cc
OLDNEW
« no previous file with comments | « cc/base/region.h ('k') | cc/base/switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698