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

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

Issue 11360066: cc: Remove WebCore rect use from the compositor, except within Region. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Signs Created 8 years, 1 month 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/Region.h ('k') | cc/stubs/int_rect.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CC_STUBS_FLOATRECT_H_
6 #define CC_STUBS_FLOATRECT_H_
7
8 #include "FloatPoint.h"
9 #include "FloatSize.h"
10 #include "IntRect.h"
11 #if INSIDE_WEBKIT_BUILD
12 #include "Source/WebCore/platform/graphics/FloatRect.h"
13 #else
14 #include "third_party/WebKit/Source/WebCore/platform/graphics/FloatRect.h"
15 #endif
16 #include "ui/gfx/rect_f.h"
17
18 #if defined(OS_MACOSX)
19 #include <ApplicationServices/ApplicationServices.h>
20 #endif
21
22 namespace cc {
23
24 class FloatRect : public WebCore::FloatRect {
25 public:
26 FloatRect() { }
27
28 FloatRect(const FloatPoint& location, const FloatSize& size)
29 : WebCore::FloatRect(location, size)
30 {
31 }
32
33 FloatRect(const IntPoint& location, const IntSize& size)
34 : WebCore::FloatRect(location, size)
35 {
36 }
37
38 FloatRect(float x, float y, float width, float height)
39 : WebCore::FloatRect(x, y, width, height)
40 {
41 }
42
43 FloatRect(const IntRect& rect)
44 : WebCore::FloatRect(rect)
45 {
46 }
47
48 FloatRect(const WebCore::IntRect& rect)
49 : WebCore::FloatRect(rect)
50 {
51 }
52
53 FloatRect(const WebCore::FloatRect& rect)
54 :WebCore::FloatRect(rect)
55 {
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
69 };
70
71 }
72
73 #endif
OLDNEW
« no previous file with comments | « cc/stubs/Region.h ('k') | cc/stubs/int_rect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698