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

Side by Side Diff: cc/stubs/int_rect.h

Issue 10984053: cc: Use ui/gfx geometry types for the CCRenderPass and CCDrawQuad classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 2 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/stubs/int_point.h ('k') | cc/stubs/int_size.h » ('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_STUBS_INTRECT_H_ 5 #ifndef CC_STUBS_INTRECT_H_
6 #define CC_STUBS_INTRECT_H_ 6 #define CC_STUBS_INTRECT_H_
7 7
8 #include "IntPoint.h" 8 #include "IntPoint.h"
9 #include "IntSize.h" 9 #include "IntSize.h"
10 #if INSIDE_WEBKIT_BUILD 10 #if INSIDE_WEBKIT_BUILD
11 #include "Source/WebCore/platform/graphics/IntRect.h" 11 #include "Source/WebCore/platform/graphics/IntRect.h"
12 #else 12 #else
13 #include "third_party/WebKit/Source/WebCore/platform/graphics/IntRect.h" 13 #include "third_party/WebKit/Source/WebCore/platform/graphics/IntRect.h"
14 #endif 14 #endif
15 #include "ui/gfx/rect.h"
16
17 #if defined(OS_MACOSX)
18 #include <ApplicationServices/ApplicationServices.h>
19 #endif
15 20
16 namespace cc { 21 namespace cc {
17 22
18 class IntRect : public WebCore::IntRect { 23 class IntRect : public WebCore::IntRect {
19 public: 24 public:
20 IntRect() { } 25 IntRect() { }
21 26
22 IntRect(const IntPoint& location, const IntSize& size) 27 IntRect(const IntPoint& location, const IntSize& size)
23 : WebCore::IntRect(location, size) 28 : WebCore::IntRect(location, size)
24 { 29 {
25 } 30 }
26 31
27 IntRect(int x, int y, int width, int height) 32 IntRect(int x, int y, int width, int height)
28 : WebCore::IntRect(x, y, width, height) 33 : WebCore::IntRect(x, y, width, height)
29 { 34 {
30 } 35 }
31 36
32 IntRect(WebCore::IntRect rect) 37 IntRect(WebCore::IntRect rect)
33 : WebCore::IntRect(rect.x(), rect.y(), rect.width(), rect.height()) 38 : WebCore::IntRect(rect.x(), rect.y(), rect.width(), rect.height())
34 { 39 {
35 40
36 } 41 }
42
43 explicit IntRect(gfx::Rect rect)
44 : WebCore::IntRect(rect.x(), rect.y(), rect.width(), rect.height())
45 {
46 }
47
48 operator gfx::Rect() const { return gfx::Rect(x(), y(), width(), height()); }
49
50 private:
51 #if defined(OS_MACOSX)
52 operator CGRect() const;
53 #endif
37 }; 54 };
38 55
39 } 56 }
40 57
41 #endif 58 #endif
OLDNEW
« no previous file with comments | « cc/stubs/int_point.h ('k') | cc/stubs/int_size.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698