OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 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 CullRect_h |
| 6 #define CullRect_h |
| 7 |
| 8 #include "platform/geometry/IntRect.h" |
| 9 #include "platform/transforms/AffineTransform.h" |
| 10 #include "wtf/Allocator.h" |
| 11 #include "wtf/HashMap.h" |
| 12 #include "wtf/ListHashSet.h" |
| 13 |
| 14 #include <limits> |
| 15 |
| 16 namespace blink { |
| 17 |
| 18 class FloatRect; |
| 19 class LayoutBoxModelObject; |
| 20 class LayoutInline; |
| 21 class LayoutObject; |
| 22 class LayoutRect; |
| 23 class LayoutUnit; |
| 24 class PaintInvalidationState; |
| 25 |
| 26 class PLATFORM_EXPORT CullRect { |
| 27 public: |
| 28 explicit CullRect(const IntRect& rect) : m_rect(rect) { } |
| 29 CullRect(const CullRect&, const IntPoint& offset); |
| 30 CullRect(const CullRect&, const IntSize& offset); |
| 31 |
| 32 bool intersectsCullRect(const AffineTransform&, const FloatRect& boundingBox
) const; |
| 33 void updateCullRect(const AffineTransform& localToParentTransform); |
| 34 bool intersectsCullRect(const IntRect&) const; |
| 35 bool intersectsCullRect(const LayoutRect&) const; |
| 36 bool intersectsHorizontalRange(LayoutUnit lo, LayoutUnit hi) const; |
| 37 bool intersectsVerticalRange(LayoutUnit lo, LayoutUnit hi) const; |
| 38 |
| 39 private: |
| 40 IntRect m_rect; |
| 41 |
| 42 // TODO(chrishtr): temporary while we implement CullRect everywhere. |
| 43 friend class FramePainter; |
| 44 friend class GridPainter; |
| 45 friend class SVGInlineTextBoxPainter; |
| 46 friend class ScrollbarThemeMacNonOverlayAPI; |
| 47 friend class ReplicaPainter; |
| 48 friend class SVGPaintContext; |
| 49 friend class SVGRootInlineBoxPainter; |
| 50 friend class SVGShapePainter; |
| 51 friend class TableSectionPainter; |
| 52 friend class ThemePainterMac; |
| 53 friend class WebPluginContainerImpl; |
| 54 }; |
| 55 |
| 56 } // namespace blink |
| 57 |
| 58 #endif // CullRect_h |
OLD | NEW |