| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef ViewDisplayList_h | 5 #ifndef ViewDisplayList_h |
| 6 #define ViewDisplayList_h | 6 #define ViewDisplayList_h |
| 7 | 7 |
| 8 #include "core/rendering/PaintPhase.h" | 8 #include "core/rendering/PaintPhase.h" |
| 9 #include "wtf/HashSet.h" | 9 #include "wtf/HashSet.h" |
| 10 #include "wtf/PassOwnPtr.h" | 10 #include "wtf/PassOwnPtr.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 ClipLayerFragmentFloat = 18, | 41 ClipLayerFragmentFloat = 18, |
| 42 ClipLayerFragmentForeground = 19, | 42 ClipLayerFragmentForeground = 19, |
| 43 ClipLayerFragmentChildOutline = 20, | 43 ClipLayerFragmentChildOutline = 20, |
| 44 ClipLayerFragmentOutline = 21, | 44 ClipLayerFragmentOutline = 21, |
| 45 ClipLayerFragmentMask = 22, | 45 ClipLayerFragmentMask = 22, |
| 46 ClipLayerFragmentClippingMask = 23, | 46 ClipLayerFragmentClippingMask = 23, |
| 47 ClipLayerFragmentParent = 24, | 47 ClipLayerFragmentParent = 24, |
| 48 ClipLayerFragmentSelection = 25, | 48 ClipLayerFragmentSelection = 25, |
| 49 ClipLayerFragmentChildBlockBackgrounds = 26, | 49 ClipLayerFragmentChildBlockBackgrounds = 26, |
| 50 EndClip = 27, | 50 EndClip = 27, |
| 51 Translation = 28, |
| 51 }; | 52 }; |
| 52 | 53 |
| 53 virtual ~DisplayItem() { } | 54 virtual ~DisplayItem() { } |
| 54 | 55 |
| 55 virtual void replay(GraphicsContext*) = 0; | 56 virtual void replay(GraphicsContext*) = 0; |
| 56 | 57 |
| 57 RenderObject* renderer() const { return m_id.renderer; } | 58 RenderObject* renderer() const { return m_id.renderer; } |
| 58 Type type() const { return m_id.type; } | 59 Type type() const { return m_id.type; } |
| 59 bool idsEqual(const DisplayItem& other) const { return m_id.renderer == othe
r.m_id.renderer && m_id.type == other.m_id.type; } | 60 bool idsEqual(const DisplayItem& other) const { return m_id.renderer == othe
r.m_id.renderer && m_id.type == other.m_id.type; } |
| 60 | 61 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 85 ViewDisplayList() { }; | 86 ViewDisplayList() { }; |
| 86 | 87 |
| 87 const PaintList& paintList(); | 88 const PaintList& paintList(); |
| 88 void add(WTF::PassOwnPtr<DisplayItem>); | 89 void add(WTF::PassOwnPtr<DisplayItem>); |
| 89 void invalidate(const RenderObject*); | 90 void invalidate(const RenderObject*); |
| 90 | 91 |
| 91 #ifndef NDEBUG | 92 #ifndef NDEBUG |
| 92 void showDebugData() const; | 93 void showDebugData() const; |
| 93 #endif | 94 #endif |
| 94 | 95 |
| 96 static ViewDisplayList& fromRenderObject(const RenderObject*); |
| 97 static ViewDisplayList& fromRenderLayer(const RenderLayer*); |
| 98 |
| 95 private: | 99 private: |
| 96 bool isRepaint(PaintList::iterator, const DisplayItem&); | 100 bool isRepaint(PaintList::iterator, const DisplayItem&); |
| 97 // Update m_paintList with any invalidations or new paints. | 101 // Update m_paintList with any invalidations or new paints. |
| 98 void updatePaintList(); | 102 void updatePaintList(); |
| 99 | 103 |
| 100 PaintList m_paintList; | 104 PaintList m_paintList; |
| 101 HashSet<const RenderObject*> m_invalidated; | 105 HashSet<const RenderObject*> m_invalidated; |
| 102 PaintList m_newPaints; | 106 PaintList m_newPaints; |
| 103 }; | 107 }; |
| 104 | 108 |
| 105 } // namespace blink | 109 } // namespace blink |
| 106 | 110 |
| 107 #endif // ViewDisplayList_h | 111 #endif // ViewDisplayList_h |
| OLD | NEW |