Chromium Code Reviews| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 42 ClipLayerFragmentChildOutline = 20, | 42 ClipLayerFragmentChildOutline = 20, |
| 43 ClipLayerFragmentOutline = 21, | 43 ClipLayerFragmentOutline = 21, |
| 44 ClipLayerFragmentMask = 22, | 44 ClipLayerFragmentMask = 22, |
| 45 ClipLayerFragmentClippingMask = 23, | 45 ClipLayerFragmentClippingMask = 23, |
| 46 ClipLayerFragmentParent = 24, | 46 ClipLayerFragmentParent = 24, |
| 47 ClipLayerFragmentSelection = 25, | 47 ClipLayerFragmentSelection = 25, |
| 48 ClipLayerFragmentChildBlockBackgrounds = 26, | 48 ClipLayerFragmentChildBlockBackgrounds = 26, |
| 49 EndClip = 27, | 49 EndClip = 27, |
| 50 BeginFilter = 28, | 50 BeginFilter = 28, |
| 51 EndFilter = 29, | 51 EndFilter = 29, |
| 52 BeginTransparency = 30, | 52 TransparencyClip = 30, |
|
chrishtr
2014/11/25 00:29:58
Let's get rid of the numbers that are not necessar
| |
| 53 EndTransparency = 31, | 53 BeginTransparency = 31, |
| 54 ClipBoxChildBlockBackgrounds = 32, | 54 EndTransparency = 32, |
| 55 ClipBoxFloat = 33, | 55 ClipBoxChildBlockBackgrounds = 33, |
| 56 ClipBoxForeground = 34, | 56 ClipBoxFloat = 34, |
| 57 ClipBoxChildOutlines = 35, | 57 ClipBoxForeground = 35, |
| 58 ClipBoxSelection = 36, | 58 ClipBoxChildOutlines = 36, |
| 59 ClipBoxCollapsedTableBorders = 37, | 59 ClipBoxSelection = 37, |
| 60 ClipBoxTextClip = 38, | 60 ClipBoxCollapsedTableBorders = 38, |
| 61 ClipBoxClippingMask = 39, | 61 ClipBoxTextClip = 39, |
| 62 BeginTransform = 40, | 62 ClipBoxClippingMask = 40, |
| 63 EndTransform = 41 | 63 BeginTransform = 41, |
| 64 EndTransform = 42 | |
| 64 }; | 65 }; |
| 65 | 66 |
| 66 virtual ~DisplayItem() { } | 67 virtual ~DisplayItem() { } |
| 67 | 68 |
| 68 virtual void replay(GraphicsContext*) = 0; | 69 virtual void replay(GraphicsContext*) = 0; |
| 69 | 70 |
| 70 const RenderObject* renderer() const { return m_id.renderer; } | 71 const RenderObject* renderer() const { return m_id.renderer; } |
| 71 Type type() const { return m_id.type; } | 72 Type type() const { return m_id.type; } |
| 72 bool idsEqual(const DisplayItem& other) const { return m_id.renderer == othe r.m_id.renderer && m_id.type == other.m_id.type; } | 73 bool idsEqual(const DisplayItem& other) const { return m_id.renderer == othe r.m_id.renderer && m_id.type == other.m_id.type; } |
| 73 | 74 |
| 75 static Type paintPhaseToClipType(PaintPhase); | |
| 76 | |
| 74 #ifndef NDEBUG | 77 #ifndef NDEBUG |
| 75 static WTF::String typeAsDebugString(DisplayItem::Type); | 78 static WTF::String typeAsDebugString(DisplayItem::Type); |
| 76 static WTF::String rendererDebugString(const RenderObject*); | 79 static WTF::String rendererDebugString(const RenderObject*); |
| 77 virtual WTF::String asDebugString() const; | 80 virtual WTF::String asDebugString() const; |
| 78 #endif | 81 #endif |
| 79 | 82 |
| 80 protected: | 83 protected: |
| 81 DisplayItem(const RenderObject* renderer, Type type) | 84 DisplayItem(const RenderObject* renderer, Type type) |
| 82 : m_id(renderer, type) | 85 : m_id(renderer, type) |
| 83 { } | 86 { } |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 115 | 118 |
| 116 PaintList m_paintList; | 119 PaintList m_paintList; |
| 117 HashSet<const RenderObject*> m_paintListRenderers; | 120 HashSet<const RenderObject*> m_paintListRenderers; |
| 118 HashSet<const RenderObject*> m_invalidated; | 121 HashSet<const RenderObject*> m_invalidated; |
| 119 PaintList m_newPaints; | 122 PaintList m_newPaints; |
| 120 }; | 123 }; |
| 121 | 124 |
| 122 } // namespace blink | 125 } // namespace blink |
| 123 | 126 |
| 124 #endif // ViewDisplayList_h | 127 #endif // ViewDisplayList_h |
| OLD | NEW |