| OLD | NEW |
| 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 "cc/math/float_rect.h" |
| 16 | 17 |
| 17 namespace cc { | 18 namespace cc { |
| 18 | 19 |
| 19 class FloatRect : public WebCore::FloatRect { | 20 class FloatRect : public WebCore::FloatRect { |
| 20 public: | 21 public: |
| 21 FloatRect() { } | 22 FloatRect() { } |
| 22 | 23 |
| 23 FloatRect(const FloatPoint& location, const FloatSize& size) | 24 FloatRect(const FloatPoint& location, const FloatSize& size) |
| 24 : WebCore::FloatRect(location, size) | 25 : WebCore::FloatRect(location, size) |
| 25 { | 26 { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 42 | 43 |
| 43 FloatRect(const WebCore::IntRect& rect) | 44 FloatRect(const WebCore::IntRect& rect) |
| 44 : WebCore::FloatRect(rect) | 45 : WebCore::FloatRect(rect) |
| 45 { | 46 { |
| 46 } | 47 } |
| 47 | 48 |
| 48 FloatRect(const WebCore::FloatRect& rect) | 49 FloatRect(const WebCore::FloatRect& rect) |
| 49 :WebCore::FloatRect(rect) | 50 :WebCore::FloatRect(rect) |
| 50 { | 51 { |
| 51 } | 52 } |
| 53 |
| 54 explicit FloatRect(ccmath::FloatRect rect) |
| 55 : WebCore::FloatRect(rect.x(), rect.y(), rect.width(), rect.height()) |
| 56 { |
| 57 } |
| 58 |
| 59 operator ccmath::FloatRect() const { return ccmath::FloatRect(x(), y(), widt
h(), height()); } |
| 52 }; | 60 }; |
| 53 | 61 |
| 54 } | 62 } |
| 55 | 63 |
| 56 #endif | 64 #endif |
| OLD | NEW |