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

Side by Side Diff: cc/stubs/float_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/float_quad.h ('k') | cc/stubs/float_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_FLOATRECT_H_ 5 #ifndef CC_STUBS_FLOATRECT_H_
6 #define CC_STUBS_FLOATRECT_H_ 6 #define CC_STUBS_FLOATRECT_H_
7 7
8 #include "FloatPoint.h" 8 #include "FloatPoint.h"
9 #include "FloatSize.h" 9 #include "FloatSize.h"
10 #include "IntRect.h" 10 #include "IntRect.h"
11 #if INSIDE_WEBKIT_BUILD 11 #if INSIDE_WEBKIT_BUILD
12 #include "Source/WebCore/platform/graphics/FloatRect.h" 12 #include "Source/WebCore/platform/graphics/FloatRect.h"
13 #else 13 #else
14 #include "third_party/WebKit/Source/WebCore/platform/graphics/FloatRect.h" 14 #include "third_party/WebKit/Source/WebCore/platform/graphics/FloatRect.h"
15 #endif 15 #endif
16 #include "ui/gfx/rect_f.h"
17
18 #if defined(OS_MACOSX)
19 #include <ApplicationServices/ApplicationServices.h>
20 #endif
16 21
17 namespace cc { 22 namespace cc {
18 23
19 class FloatRect : public WebCore::FloatRect { 24 class FloatRect : public WebCore::FloatRect {
20 public: 25 public:
21 FloatRect() { } 26 FloatRect() { }
22 27
23 FloatRect(const FloatPoint& location, const FloatSize& size) 28 FloatRect(const FloatPoint& location, const FloatSize& size)
24 : WebCore::FloatRect(location, size) 29 : WebCore::FloatRect(location, size)
25 { 30 {
(...skipping 16 matching lines...) Expand all
42 47
43 FloatRect(const WebCore::IntRect& rect) 48 FloatRect(const WebCore::IntRect& rect)
44 : WebCore::FloatRect(rect) 49 : WebCore::FloatRect(rect)
45 { 50 {
46 } 51 }
47 52
48 FloatRect(const WebCore::FloatRect& rect) 53 FloatRect(const WebCore::FloatRect& rect)
49 :WebCore::FloatRect(rect) 54 :WebCore::FloatRect(rect)
50 { 55 {
51 } 56 }
57
58 explicit FloatRect(gfx::RectF rect)
59 : WebCore::FloatRect(rect.x(), rect.y(), rect.width(), rect.height())
60 {
61 }
62
63 operator gfx::RectF() const { return gfx::RectF(x(), y(), width(), height()) ; }
64
65 private:
66 #if defined(OS_MACOSX)
67 operator CGRect() const;
68 #endif
52 }; 69 };
53 70
54 } 71 }
55 72
56 #endif 73 #endif
OLDNEW
« no previous file with comments | « cc/stubs/float_quad.h ('k') | cc/stubs/float_size.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698