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

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

Issue 421183003: Revert of Add builders for tracing event's structural arguments (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « cc/base/math_util.cc ('k') | cc/base/region.cc » ('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 #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/logging.h" 10 #include "base/logging.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "cc/base/cc_export.h" 12 #include "cc/base/cc_export.h"
13 #include "third_party/skia/include/core/SkRegion.h" 13 #include "third_party/skia/include/core/SkRegion.h"
14 #include "ui/gfx/rect.h" 14 #include "ui/gfx/rect.h"
15 #include "ui/gfx/skia_util.h" 15 #include "ui/gfx/skia_util.h"
16 16
17 namespace base { 17 namespace base {
18 class Value; 18 class Value;
19 namespace debug {
20 class TracedValue;
21 }
22 } 19 }
23 20
24 namespace cc { 21 namespace cc {
25 22
26 class CC_EXPORT Region { 23 class CC_EXPORT Region {
27 public: 24 public:
28 Region(); 25 Region();
29 Region(const Region& region); 26 Region(const Region& region);
30 Region(const gfx::Rect& rect); // NOLINT(runtime/explicit) 27 Region(const gfx::Rect& rect); // NOLINT(runtime/explicit)
31 ~Region(); 28 ~Region();
(...skipping 23 matching lines...) Expand all
55 bool Equals(const Region& other) const { 52 bool Equals(const Region& other) const {
56 return skregion_ == other.skregion_; 53 return skregion_ == other.skregion_;
57 } 54 }
58 55
59 gfx::Rect bounds() const { 56 gfx::Rect bounds() const {
60 return gfx::SkIRectToRect(skregion_.getBounds()); 57 return gfx::SkIRectToRect(skregion_.getBounds());
61 } 58 }
62 59
63 std::string ToString() const; 60 std::string ToString() const;
64 scoped_ptr<base::Value> AsValue() const; 61 scoped_ptr<base::Value> AsValue() const;
65 void AsValueInto(base::debug::TracedValue* array) const;
66 62
67 class CC_EXPORT Iterator { 63 class CC_EXPORT Iterator {
68 public: 64 public:
69 Iterator(); 65 Iterator();
70 explicit Iterator(const Region& region); 66 explicit Iterator(const Region& region);
71 ~Iterator(); 67 ~Iterator();
72 68
73 gfx::Rect rect() const { 69 gfx::Rect rect() const {
74 return gfx::SkIRectToRect(it_.rect()); 70 return gfx::SkIRectToRect(it_.rect());
75 } 71 }
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 126
131 inline Region UnionRegions(const Region& a, const gfx::Rect& b) { 127 inline Region UnionRegions(const Region& a, const gfx::Rect& b) {
132 Region result = a; 128 Region result = a;
133 result.Union(b); 129 result.Union(b);
134 return result; 130 return result;
135 } 131 }
136 132
137 } // namespace cc 133 } // namespace cc
138 134
139 #endif // CC_BASE_REGION_H_ 135 #endif // CC_BASE_REGION_H_
OLDNEW
« no previous file with comments | « cc/base/math_util.cc ('k') | cc/base/region.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698