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 namespace cc { | 7 namespace cc { |
8 | 8 |
9 Region::Region() { | 9 Region::Region() { |
10 } | 10 } |
(...skipping 12 matching lines...) Expand all Loading... |
23 const Region& Region::operator=(gfx::Rect rect) { | 23 const Region& Region::operator=(gfx::Rect rect) { |
24 skregion_ = SkRegion(gfx::RectToSkIRect(rect)); | 24 skregion_ = SkRegion(gfx::RectToSkIRect(rect)); |
25 return *this; | 25 return *this; |
26 } | 26 } |
27 | 27 |
28 const Region& Region::operator=(const Region& region) { | 28 const Region& Region::operator=(const Region& region) { |
29 skregion_ = region.skregion_; | 29 skregion_ = region.skregion_; |
30 return *this; | 30 return *this; |
31 } | 31 } |
32 | 32 |
33 void Region::Swap(Region& region) { | 33 void Region::Swap(Region* region) { |
34 region.skregion_.swap(skregion_); | 34 region->skregion_.swap(skregion_); |
35 } | 35 } |
36 | 36 |
37 void Region::Clear() { | 37 void Region::Clear() { |
38 skregion_.setEmpty(); | 38 skregion_.setEmpty(); |
39 } | 39 } |
40 | 40 |
41 bool Region::IsEmpty() const { | 41 bool Region::IsEmpty() const { |
42 return skregion_.isEmpty(); | 42 return skregion_.isEmpty(); |
43 } | 43 } |
44 | 44 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 } | 107 } |
108 | 108 |
109 Region::Iterator::Iterator(const Region& region) | 109 Region::Iterator::Iterator(const Region& region) |
110 : it_(region.skregion_) { | 110 : it_(region.skregion_) { |
111 } | 111 } |
112 | 112 |
113 Region::Iterator::~Iterator() { | 113 Region::Iterator::~Iterator() { |
114 } | 114 } |
115 | 115 |
116 } // namespace cc | 116 } // namespace cc |
OLD | NEW |