| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |