| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2017 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 FloatClipRect_h |
| 6 #define FloatClipRect_h |
| 7 |
| 8 #include "platform/geometry/FloatRect.h" |
| 9 #include "wtf/Allocator.h" |
| 10 |
| 11 namespace blink { |
| 12 |
| 13 class PLATFORM_EXPORT FloatClipRect { |
| 14 USING_FAST_MALLOC(FloatClipRect); |
| 15 |
| 16 public: |
| 17 FloatClipRect() : m_hasRadius(false) {} |
| 18 |
| 19 FloatClipRect(const FloatRect& rect) : m_rect(rect), m_hasRadius(false) {} |
| 20 |
| 21 const FloatRect& rect() const { return m_rect; } |
| 22 |
| 23 void intersect(const FloatRect& other) { m_rect.intersect(other); } |
| 24 |
| 25 bool hasRadius() const { return m_hasRadius; } |
| 26 void setHasRadius(bool hasRadius) { m_hasRadius = hasRadius; } |
| 27 |
| 28 void setRect(const FloatRect& rect) { m_rect = rect; } |
| 29 |
| 30 private: |
| 31 FloatRect m_rect; |
| 32 bool m_hasRadius; |
| 33 }; |
| 34 |
| 35 } // namespace blink |
| 36 |
| 37 #endif // FloatClipRect_h |
| OLD | NEW |