Chromium Code Reviews| 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 #ifndef CullRect_h | |
|
wkorman
2015/10/28 22:43:29
+1 blank above
chrishtr
2015/10/28 23:10:25
Done.
| |
| 5 #define CullRect_h | |
| 6 | |
| 7 // TODO(jchaffraix): Once we unify PaintBehavior and PaintLayerFlags, we should move | |
|
wkorman
2015/10/28 22:43:29
is this still relevant here?
chrishtr
2015/10/28 23:10:25
Removed.
| |
| 8 // PaintLayerFlags to PaintPhase and rename it. Thus removing the need for this #include. | |
| 9 | |
| 10 #include "platform/geometry/IntRect.h" | |
| 11 #include "platform/transforms/AffineTransform.h" | |
| 12 #include "wtf/Allocator.h" | |
| 13 #include "wtf/HashMap.h" | |
| 14 #include "wtf/ListHashSet.h" | |
| 15 | |
| 16 #include <limits> | |
| 17 | |
| 18 namespace blink { | |
| 19 | |
| 20 class FloatRect; | |
| 21 class LayoutBoxModelObject; | |
| 22 class LayoutInline; | |
| 23 class LayoutObject; | |
| 24 class LayoutRect; | |
| 25 class LayoutUnit; | |
| 26 class PaintInvalidationState; | |
| 27 | |
| 28 class PLATFORM_EXPORT CullRect { | |
| 29 public: | |
| 30 explicit CullRect(const IntRect& rect) : m_rect(rect) { } | |
| 31 CullRect(const CullRect&, const IntPoint& offset); | |
| 32 CullRect(const CullRect&, const IntSize& offset); | |
| 33 | |
| 34 bool intersectsCullRect(const AffineTransform&, const FloatRect& boundingBox ) const; | |
| 35 void updateCullRect(const AffineTransform& localToParentTransform); | |
| 36 bool intersectsCullRect(const IntRect&) const; | |
| 37 bool intersectsCullRect(const LayoutRect&) const; | |
| 38 bool intersectsHorizontalRange(LayoutUnit lo, LayoutUnit hi) const; | |
| 39 bool intersectsVerticalRange(LayoutUnit lo, LayoutUnit hi) const; | |
| 40 | |
| 41 private: | |
| 42 IntRect m_rect; | |
| 43 | |
| 44 // TODO(chrishtr): temporary while we implement CullRect everywhere. | |
| 45 friend class FramePainter; | |
| 46 friend class GridPainter; | |
| 47 friend class SVGInlineTextBoxPainter; | |
| 48 friend class ScrollbarThemeMacNonOverlayAPI; | |
| 49 friend class ReplicaPainter; | |
| 50 friend class SVGPaintContext; | |
| 51 friend class SVGRootInlineBoxPainter; | |
| 52 friend class SVGShapePainter; | |
| 53 friend class TableSectionPainter; | |
| 54 friend class ThemePainterMac; | |
| 55 friend class WebPluginContainerImpl; | |
| 56 }; | |
| 57 | |
| 58 } // namespace blink | |
| 59 | |
| 60 #endif // CullRect_h | |
| OLD | NEW |