| 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 26 matching lines...) Expand all Loading... |
| 37 #include "wtf/HashMap.h" | 37 #include "wtf/HashMap.h" |
| 38 #include "wtf/ListHashSet.h" | 38 #include "wtf/ListHashSet.h" |
| 39 | 39 |
| 40 namespace blink { | 40 namespace blink { |
| 41 | 41 |
| 42 class RenderInline; | 42 class RenderInline; |
| 43 class RenderLayerModelObject; | 43 class RenderLayerModelObject; |
| 44 class RenderObject; | 44 class RenderObject; |
| 45 class RenderPart; | 45 class RenderPart; |
| 46 | 46 |
| 47 typedef HashMap<RenderPart*, IntRect> OverlapTestRequestMap; | |
| 48 | |
| 49 struct PaintInfo { | 47 struct PaintInfo { |
| 50 PaintInfo(GraphicsContext* newContext, const IntRect& newRect, PaintPhase ne
wPhase, PaintBehavior newPaintBehavior, | 48 PaintInfo(GraphicsContext* newContext, const IntRect& newRect, PaintPhase ne
wPhase, PaintBehavior newPaintBehavior, |
| 51 RenderObject* newPaintingRoot = 0, ListHashSet<RenderInline*>* newOutlin
eObjects = 0, | 49 RenderObject* newPaintingRoot = 0, ListHashSet<RenderInline*>* newOutlin
eObjects = 0, |
| 52 const RenderLayerModelObject* newPaintContainer = 0) | 50 const RenderLayerModelObject* newPaintContainer = 0) |
| 53 : context(newContext) | 51 : context(newContext) |
| 54 , rect(newRect) | 52 , rect(newRect) |
| 55 , phase(newPhase) | 53 , phase(newPhase) |
| 56 , paintBehavior(newPaintBehavior) | 54 , paintBehavior(newPaintBehavior) |
| 57 , paintingRoot(newPaintingRoot) | 55 , paintingRoot(newPaintingRoot) |
| 58 , m_paintContainer(newPaintContainer) | 56 , m_paintContainer(newPaintContainer) |
| (...skipping 27 matching lines...) Expand all Loading... |
| 86 void applyTransform(const AffineTransform& localToAncestorTransform, | 84 void applyTransform(const AffineTransform& localToAncestorTransform, |
| 87 GraphicsContextStateSaver* stateSaver = 0) | 85 GraphicsContextStateSaver* stateSaver = 0) |
| 88 { | 86 { |
| 89 if (localToAncestorTransform.isIdentity()) | 87 if (localToAncestorTransform.isIdentity()) |
| 90 return; | 88 return; |
| 91 | 89 |
| 92 if (stateSaver) | 90 if (stateSaver) |
| 93 stateSaver->saveIfNeeded(); | 91 stateSaver->saveIfNeeded(); |
| 94 | 92 |
| 95 context->concatCTM(localToAncestorTransform); | 93 context->concatCTM(localToAncestorTransform); |
| 96 | |
| 97 if (rect == LayoutRect::infiniteIntRect()) | |
| 98 return; | |
| 99 | |
| 100 if (localToAncestorTransform.isInvertible()) | |
| 101 rect = localToAncestorTransform.inverse().mapRect(rect); | |
| 102 else | |
| 103 rect.setSize(IntSize(0, 0)); | |
| 104 } | 94 } |
| 105 | 95 |
| 106 DisplayItem::Type displayItemTypeForClipping() const; | 96 DisplayItem::Type displayItemTypeForClipping() const; |
| 107 | 97 |
| 108 const RenderLayerModelObject* paintContainer() const { return m_paintContain
er; } | 98 const RenderLayerModelObject* paintContainer() const { return m_paintContain
er; } |
| 109 | 99 |
| 110 ListHashSet<RenderInline*>* outlineObjects() const { return m_outlineObjects
; } | 100 ListHashSet<RenderInline*>* outlineObjects() const { return m_outlineObjects
; } |
| 111 void setOutlineObjects(ListHashSet<RenderInline*>* objects) { m_outlineObjec
ts = objects; } | 101 void setOutlineObjects(ListHashSet<RenderInline*>* objects) { m_outlineObjec
ts = objects; } |
| 112 | 102 |
| 113 // FIXME: Introduce setters/getters at some point. Requires a lot of changes
throughout rendering/. | 103 // FIXME: Introduce setters/getters at some point. Requires a lot of changes
throughout rendering/. |
| 114 GraphicsContext* context; | 104 GraphicsContext* context; |
| 115 IntRect rect; // dirty rect used for culling non-intersecting renderers | 105 IntRect rect; // dirty rect used for culling non-intersecting renderers |
| 116 PaintPhase phase; | 106 PaintPhase phase; |
| 117 PaintBehavior paintBehavior; | 107 PaintBehavior paintBehavior; |
| 118 RenderObject* paintingRoot; // used to draw just one element and its visual
kids | 108 RenderObject* paintingRoot; // used to draw just one element and its visual
kids |
| 119 | 109 |
| 120 private: | 110 private: |
| 121 const RenderLayerModelObject* m_paintContainer; // the layer object that ori
ginates the current painting | 111 const RenderLayerModelObject* m_paintContainer; // the layer object that ori
ginates the current painting |
| 122 ListHashSet<RenderInline*>* m_outlineObjects; // used to list outlines that
should be painted by a block with inline children | 112 ListHashSet<RenderInline*>* m_outlineObjects; // used to list outlines that
should be painted by a block with inline children |
| 123 }; | 113 }; |
| 124 | 114 |
| 125 } // namespace blink | 115 } // namespace blink |
| 126 | 116 |
| 127 #endif // PaintInfo_h | 117 #endif // PaintInfo_h |
| OLD | NEW |