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

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

Issue 11367080: cc: Remove all remaining use of WebCore Rect/Point/Size types from the compositor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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/IntSize.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
(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_FLOATPOINT_H_
6 #define CC_STUBS_FLOATPOINT_H_
7
8 #include "FloatSize.h"
9 #include "IntPoint.h"
10 #if INSIDE_WEBKIT_BUILD
11 #include "Source/WebCore/platform/graphics/FloatPoint.h"
12 #else
13 #include "third_party/WebKit/Source/WebCore/platform/graphics/FloatPoint.h"
14 #endif
15 #include "ui/gfx/point_f.h"
16
17 namespace cc {
18
19 class FloatPoint : public WebCore::FloatPoint {
20 public:
21 FloatPoint() { }
22
23 FloatPoint(float width, float height)
24 : WebCore::FloatPoint(width, height)
25 {
26 }
27
28 FloatPoint(FloatSize size)
29 : WebCore::FloatPoint(size)
30 {
31 }
32
33 FloatPoint(IntPoint point)
34 : WebCore::FloatPoint(point)
35 {
36 }
37
38 FloatPoint(WebCore::IntPoint point)
39 : WebCore::FloatPoint(point)
40 {
41 }
42
43 FloatPoint(WebCore::FloatPoint point)
44 : WebCore::FloatPoint(point.x(), point.y())
45 {
46 }
47
48 explicit FloatPoint(gfx::PointF point)
49 : WebCore::FloatPoint(point.x(), point.y())
50 {
51 }
52
53 operator gfx::PointF() const { return gfx::PointF(x(), y()); }
54 };
55
56 }
57
58 #endif
OLDNEW
« no previous file with comments | « cc/stubs/IntSize.h ('k') | cc/stubs/float_size.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698