| 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 #ifndef CC_BASE_REGION_H_ | 5 #ifndef CC_BASE_REGION_H_ |
| 6 #define CC_BASE_REGION_H_ | 6 #define CC_BASE_REGION_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "cc/base/cc_export.h" | 11 #include "cc/base/cc_export.h" |
| 12 #include "third_party/skia/include/core/SkRegion.h" | 12 #include "third_party/skia/include/core/SkRegion.h" |
| 13 #include "ui/gfx/geometry/rect.h" | 13 #include "ui/gfx/geometry/rect.h" |
| 14 #include "ui/gfx/skia_util.h" | 14 #include "ui/gfx/skia_util.h" |
| 15 | 15 |
| 16 namespace base { | 16 namespace base { |
| 17 class Value; | 17 class Value; |
| 18 namespace debug { | 18 namespace trace_event { |
| 19 class TracedValue; | 19 class TracedValue; |
| 20 } | 20 } |
| 21 |
| 22 // TODO(ssid): remove these aliases after the tracing clients are moved to the |
| 23 // new trace_event namespace. See crbug.com/451032. ETA: March 2015. |
| 24 namespace debug { |
| 25 using ::base::trace_event::TracedValue; |
| 21 } | 26 } |
| 27 } // namespace base |
| 22 | 28 |
| 23 namespace cc { | 29 namespace cc { |
| 24 class SimpleEnclosedRegion; | 30 class SimpleEnclosedRegion; |
| 25 | 31 |
| 26 class CC_EXPORT Region { | 32 class CC_EXPORT Region { |
| 27 public: | 33 public: |
| 28 Region(); | 34 Region(); |
| 29 Region(const Region& region); | 35 Region(const Region& region); |
| 30 Region(const gfx::Rect& rect); // NOLINT(runtime/explicit) | 36 Region(const gfx::Rect& rect); // NOLINT(runtime/explicit) |
| 31 ~Region(); | 37 ~Region(); |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 | 137 |
| 132 inline Region UnionRegions(const Region& a, const gfx::Rect& b) { | 138 inline Region UnionRegions(const Region& a, const gfx::Rect& b) { |
| 133 Region result = a; | 139 Region result = a; |
| 134 result.Union(b); | 140 result.Union(b); |
| 135 return result; | 141 return result; |
| 136 } | 142 } |
| 137 | 143 |
| 138 } // namespace cc | 144 } // namespace cc |
| 139 | 145 |
| 140 #endif // CC_BASE_REGION_H_ | 146 #endif // CC_BASE_REGION_H_ |
| OLD | NEW |