| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
| 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) | 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
| 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) | 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) |
| 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
reserved. | 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
reserved. |
| 7 * Copyright (C) 2009 Google Inc. All rights reserved. | 7 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 #define PaintInfo_h | 27 #define PaintInfo_h |
| 28 | 28 |
| 29 // TODO(jchaffraix): Once we unify PaintBehavior and PaintLayerFlags, we should
move | 29 // TODO(jchaffraix): Once we unify PaintBehavior and PaintLayerFlags, we should
move |
| 30 // PaintLayerFlags to PaintPhase and rename it. Thus removing the need for this
#include. | 30 // PaintLayerFlags to PaintPhase and rename it. Thus removing the need for this
#include. |
| 31 #include "core/CoreExport.h" | 31 #include "core/CoreExport.h" |
| 32 #include "core/paint/PaintLayerPaintingInfo.h" | 32 #include "core/paint/PaintLayerPaintingInfo.h" |
| 33 #include "core/paint/PaintPhase.h" | 33 #include "core/paint/PaintPhase.h" |
| 34 #include "platform/geometry/IntRect.h" | 34 #include "platform/geometry/IntRect.h" |
| 35 #include "platform/geometry/LayoutRect.h" | 35 #include "platform/geometry/LayoutRect.h" |
| 36 #include "platform/graphics/GraphicsContext.h" | 36 #include "platform/graphics/GraphicsContext.h" |
| 37 #include "platform/graphics/paint/CullRect.h" |
| 37 #include "platform/graphics/paint/DisplayItem.h" | 38 #include "platform/graphics/paint/DisplayItem.h" |
| 38 #include "platform/transforms/AffineTransform.h" | 39 #include "platform/transforms/AffineTransform.h" |
| 39 #include "wtf/Allocator.h" | 40 #include "wtf/Allocator.h" |
| 40 #include "wtf/HashMap.h" | 41 #include "wtf/HashMap.h" |
| 41 #include "wtf/ListHashSet.h" | 42 #include "wtf/ListHashSet.h" |
| 42 | 43 |
| 43 #include <limits> | 44 #include <limits> |
| 44 | 45 |
| 45 namespace blink { | 46 namespace blink { |
| 46 | 47 |
| 47 class LayoutInline; | 48 class LayoutInline; |
| 48 class LayoutBoxModelObject; | 49 class LayoutBoxModelObject; |
| 49 class LayoutObject; | 50 class LayoutObject; |
| 50 class PaintInvalidationState; | 51 class PaintInvalidationState; |
| 51 | 52 |
| 52 class CORE_EXPORT CullRect { | |
| 53 public: | |
| 54 explicit CullRect(const IntRect& rect) : m_rect(rect) { } | |
| 55 CullRect(const CullRect&, const IntPoint& offset); | |
| 56 | |
| 57 bool intersectsCullRect(const AffineTransform&, const FloatRect& boundingBox
) const; | |
| 58 void updateCullRect(const AffineTransform& localToParentTransform); | |
| 59 bool intersectsCullRect(const IntRect&) const; | |
| 60 bool intersectsCullRect(const LayoutRect&) const; | |
| 61 bool intersectsHorizontalRange(LayoutUnit lo, LayoutUnit hi) const; | |
| 62 bool intersectsVerticalRange(LayoutUnit lo, LayoutUnit hi) const; | |
| 63 | |
| 64 private: | |
| 65 IntRect m_rect; | |
| 66 | |
| 67 // TODO(chrishtr): temporary while we implement CullRect everywhere. | |
| 68 friend class ReplicaPainter; | |
| 69 friend class GridPainter; | |
| 70 friend class PartPainter; | |
| 71 friend class ScrollableAreaPainter; | |
| 72 friend class SVGPaintContext; | |
| 73 friend class SVGShapePainter; | |
| 74 friend class TableSectionPainter; | |
| 75 friend class ThemePainterMac; | |
| 76 friend class SVGInlineTextBoxPainter; | |
| 77 friend class SVGRootInlineBoxPainter; | |
| 78 }; | |
| 79 | |
| 80 struct CORE_EXPORT PaintInfo { | 53 struct CORE_EXPORT PaintInfo { |
| 81 ALLOW_ONLY_INLINE_ALLOCATION(); | 54 ALLOW_ONLY_INLINE_ALLOCATION(); |
| 82 PaintInfo(GraphicsContext* newContext, const IntRect& cullRect, PaintPhase n
ewPhase, GlobalPaintFlags globalPaintFlags, PaintLayerFlags paintFlags, | 55 PaintInfo(GraphicsContext* newContext, const IntRect& cullRect, PaintPhase n
ewPhase, GlobalPaintFlags globalPaintFlags, PaintLayerFlags paintFlags, |
| 83 LayoutObject* newPaintingRoot = nullptr, const LayoutBoxModelObject* new
PaintContainer = nullptr) | 56 LayoutObject* newPaintingRoot = nullptr, const LayoutBoxModelObject* new
PaintContainer = nullptr) |
| 84 : context(newContext) | 57 : context(newContext) |
| 85 , phase(newPhase) | 58 , phase(newPhase) |
| 86 , paintingRoot(newPaintingRoot) | 59 , paintingRoot(newPaintingRoot) |
| 87 , paintInvalidationState(nullptr) | 60 , paintInvalidationState(nullptr) |
| 88 , m_cullRect(cullRect) | 61 , m_cullRect(cullRect) |
| 89 , m_paintContainer(newPaintContainer) | 62 , m_paintContainer(newPaintContainer) |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 const GlobalPaintFlags m_globalPaintFlags; | 103 const GlobalPaintFlags m_globalPaintFlags; |
| 131 | 104 |
| 132 // TODO(chrishtr): temporary while we implement CullRect everywhere. | 105 // TODO(chrishtr): temporary while we implement CullRect everywhere. |
| 133 friend class SVGPaintContext; | 106 friend class SVGPaintContext; |
| 134 friend class SVGShapePainter; | 107 friend class SVGShapePainter; |
| 135 }; | 108 }; |
| 136 | 109 |
| 137 } // namespace blink | 110 } // namespace blink |
| 138 | 111 |
| 139 #endif // PaintInfo_h | 112 #endif // PaintInfo_h |
| OLD | NEW |