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

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

Issue 185653013: [#8] Pass gfx::Point by const ref. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed build errors on other platforms Created 6 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
« no previous file with comments | « no previous file | 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"
(...skipping 17 matching lines...) Expand all
28 ~Region(); 28 ~Region();
29 29
30 const Region& operator=(const gfx::Rect& rect); 30 const Region& operator=(const gfx::Rect& rect);
31 const Region& operator=(const Region& region); 31 const Region& operator=(const Region& region);
32 32
33 void Swap(Region* region); 33 void Swap(Region* region);
34 void Clear(); 34 void Clear();
35 bool IsEmpty() const; 35 bool IsEmpty() const;
36 int GetRegionComplexity() const; 36 int GetRegionComplexity() const;
37 37
38 bool Contains(gfx::Point point) const; 38 bool Contains(const gfx::Point& point) const;
39 bool Contains(const gfx::Rect& rect) const; 39 bool Contains(const gfx::Rect& rect) const;
40 bool Contains(const Region& region) const; 40 bool Contains(const Region& region) const;
41 41
42 bool Intersects(const gfx::Rect& rect) const; 42 bool Intersects(const gfx::Rect& rect) const;
43 bool Intersects(const Region& region) const; 43 bool Intersects(const Region& region) const;
44 44
45 void Subtract(const gfx::Rect& rect); 45 void Subtract(const gfx::Rect& rect);
46 void Subtract(const Region& region); 46 void Subtract(const Region& region);
47 void Union(const gfx::Rect& rect); 47 void Union(const gfx::Rect& rect);
48 void Union(const Region& region); 48 void Union(const Region& region);
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 126
127 inline Region UnionRegions(const Region& a, const gfx::Rect& b) { 127 inline Region UnionRegions(const Region& a, const gfx::Rect& b) {
128 Region result = a; 128 Region result = a;
129 result.Union(b); 129 result.Union(b);
130 return result; 130 return result;
131 } 131 }
132 132
133 } // namespace cc 133 } // namespace cc
134 134
135 #endif // CC_BASE_REGION_H_ 135 #endif // CC_BASE_REGION_H_
OLDNEW
« no previous file with comments | « no previous file | cc/base/region.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698