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

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

Issue 12912010: cc: Convert non-const reference arguments to pointers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix ui/compositor Created 7 years, 9 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 "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/rect.h" 13 #include "ui/gfx/rect.h"
14 #include "ui/gfx/skia_util.h" 14 #include "ui/gfx/skia_util.h"
15 15
16 namespace cc { 16 namespace cc {
17 17
18 class CC_EXPORT Region { 18 class CC_EXPORT Region {
19 public: 19 public:
20 Region(); 20 Region();
21 Region(const Region& region); 21 Region(const Region& region);
22 Region(gfx::Rect rect); 22 Region(gfx::Rect rect);
23 ~Region(); 23 ~Region();
24 24
25 const Region& operator=(gfx::Rect rect); 25 const Region& operator=(gfx::Rect rect);
26 const Region& operator=(const Region& region); 26 const Region& operator=(const Region& region);
27 27
28 void Swap(Region& region); 28 void Swap(Region* region);
29 void Clear(); 29 void Clear();
30 bool IsEmpty() const; 30 bool IsEmpty() const;
31 31
32 bool Contains(gfx::Point point) const; 32 bool Contains(gfx::Point point) const;
33 bool Contains(gfx::Rect rect) const; 33 bool Contains(gfx::Rect rect) const;
34 bool Contains(const Region& region) const; 34 bool Contains(const Region& region) const;
35 35
36 bool Intersects(gfx::Rect rect) const; 36 bool Intersects(gfx::Rect rect) const;
37 bool Intersects(const Region& region) const; 37 bool Intersects(const Region& region) const;
38 38
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 119
120 inline Region UnionRegions(const Region& a, gfx::Rect b) { 120 inline Region UnionRegions(const Region& a, gfx::Rect b) {
121 Region result = a; 121 Region result = a;
122 result.Union(b); 122 result.Union(b);
123 return result; 123 return result;
124 } 124 }
125 125
126 } // namespace cc 126 } // namespace cc
127 127
128 #endif // CC_BASE_REGION_H_ 128 #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