| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 DoubleSize_h | 5 #ifndef DoubleSize_h |
| 6 #define DoubleSize_h | 6 #define DoubleSize_h |
| 7 | 7 |
| 8 #include "platform/geometry/FloatSize.h" | 8 #include "platform/geometry/FloatSize.h" |
| 9 #include "platform/geometry/IntSize.h" | 9 #include "platform/geometry/IntSize.h" |
| 10 #include "wtf/Allocator.h" | 10 #include "wtf/Allocator.h" |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 inline IntSize expandedIntSize(const DoubleSize& p) | 104 inline IntSize expandedIntSize(const DoubleSize& p) |
| 105 { | 105 { |
| 106 return IntSize(clampTo<int>(ceilf(p.width())), clampTo<int>(ceilf(p.height()
))); | 106 return IntSize(clampTo<int>(ceilf(p.width())), clampTo<int>(ceilf(p.height()
))); |
| 107 } | 107 } |
| 108 | 108 |
| 109 inline FloatSize toFloatSize(const DoubleSize& p) | 109 inline FloatSize toFloatSize(const DoubleSize& p) |
| 110 { | 110 { |
| 111 return FloatSize(p.width(), p.height()); | 111 return FloatSize(p.width(), p.height()); |
| 112 } | 112 } |
| 113 | 113 |
| 114 // Redeclared here to avoid ODR issues. | 114 PLATFORM_EXPORT std::ostream& operator<<(std::ostream&, const DoubleSize&); |
| 115 // See platform/testing/GeometryPrinters.h. | |
| 116 void PrintTo(const DoubleSize&, std::ostream*); | |
| 117 | 115 |
| 118 } // namespace blink | 116 } // namespace blink |
| 119 | 117 |
| 120 #endif // DoubleSize_h | 118 #endif // DoubleSize_h |
| OLD | NEW |