| Index: cc/region.h
|
| diff --git a/cc/region.h b/cc/region.h
|
| index 00e2bd1ddc031690d8210c9a8aa51653b8961599..badd33cde5b00155300989642465b08b841a842a 100644
|
| --- a/cc/region.h
|
| +++ b/cc/region.h
|
| @@ -11,6 +11,7 @@
|
| #include "cc/cc_export.h"
|
| #include "third_party/skia/include/core/SkRegion.h"
|
| #include "ui/gfx/rect.h"
|
| +#include "ui/gfx/skia_util.h"
|
|
|
| namespace cc {
|
|
|
| @@ -42,12 +43,12 @@ class CC_EXPORT Region {
|
| void Intersect(gfx::Rect rect);
|
| void Intersect(const Region& region);
|
|
|
| - bool Equals(const Region& other) const { return skregion_ == other.skregion_; }
|
| + bool Equals(const Region& other) const {
|
| + return skregion_ == other.skregion_;
|
| + }
|
|
|
| gfx::Rect bounds() const {
|
| - SkIRect r = skregion_.getBounds();
|
| - // TODO(danakj) Use method from ui/gfx/skia_utils.h when it exists.
|
| - return gfx::Rect(r.x(), r.y(), r.width(), r.height());
|
| + return gfx::SkIRectToRect(skregion_.getBounds());
|
| }
|
|
|
| std::string ToString() const;
|
| @@ -58,14 +59,13 @@ class CC_EXPORT Region {
|
| ~Iterator();
|
|
|
| gfx::Rect rect() const {
|
| - SkIRect r = it_.rect();
|
| - // TODO(danakj) Use method from ui/gfx/skia_utils.h when it exists.
|
| - return gfx::Rect(r.x(), r.y(), r.width(), r.height());
|
| + return gfx::SkIRectToRect(it_.rect());
|
| }
|
|
|
| void next() {
|
| it_.next();
|
| }
|
| +
|
| bool has_rect() const {
|
| return !it_.done();
|
| }
|
|
|