| OLD | NEW |
| (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 | |
| OLD | NEW |