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 #include "config.h" | 5 #include "config.h" |
| 6 #include "core/paint/ViewDisplayList.h" | 6 #include "core/paint/ViewDisplayList.h" |
| 7 | 7 |
| 8 #include "platform/NotImplemented.h" | 8 #include "platform/NotImplemented.h" |
| 9 #include "platform/RuntimeEnabledFeatures.h" | 9 #include "platform/RuntimeEnabledFeatures.h" |
| 10 | 10 |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 107 } | 107 } |
| 108 | 108 |
| 109 m_invalidated.clear(); | 109 m_invalidated.clear(); |
| 110 m_newPaints.clear(); | 110 m_newPaints.clear(); |
| 111 m_paintList.clear(); | 111 m_paintList.clear(); |
| 112 m_paintList.swap(updatedList); | 112 m_paintList.swap(updatedList); |
| 113 m_paintListRenderers.clear(); | 113 m_paintListRenderers.clear(); |
| 114 m_paintListRenderers.swap(updatedRenderers); | 114 m_paintListRenderers.swap(updatedRenderers); |
| 115 } | 115 } |
| 116 | 116 |
| 117 DisplayItem::Type DisplayItem::paintPhaseToClipType(PaintPhase paintPhase) | |
|
chrishtr
2014/11/25 18:30:59
Please move to ClipRecorder.
| |
| 118 { | |
| 119 switch (paintPhase) { | |
| 120 case PaintPhaseChildBlockBackgrounds: | |
| 121 return DisplayItem::ClipBoxChildBlockBackgrounds; | |
| 122 break; | |
| 123 case PaintPhaseFloat: | |
| 124 return DisplayItem::ClipBoxFloat; | |
| 125 break; | |
| 126 case PaintPhaseForeground: | |
| 127 return DisplayItem::ClipBoxChildBlockBackgrounds; | |
| 128 break; | |
| 129 case PaintPhaseChildOutlines: | |
| 130 return DisplayItem::ClipBoxChildOutlines; | |
| 131 break; | |
| 132 case PaintPhaseSelection: | |
| 133 return DisplayItem::ClipBoxSelection; | |
| 134 break; | |
| 135 case PaintPhaseCollapsedTableBorders: | |
| 136 return DisplayItem::ClipBoxCollapsedTableBorders; | |
| 137 break; | |
| 138 case PaintPhaseTextClip: | |
| 139 return DisplayItem::ClipBoxTextClip; | |
| 140 break; | |
| 141 case PaintPhaseClippingMask: | |
| 142 return DisplayItem::ClipBoxClippingMask; | |
| 143 break; | |
| 144 case PaintPhaseChildBlockBackground: | |
| 145 case PaintPhaseOutline: | |
| 146 case PaintPhaseBlockBackground: | |
| 147 case PaintPhaseSelfOutline: | |
| 148 case PaintPhaseMask: | |
| 149 ASSERT_NOT_REACHED(); | |
| 150 } | |
| 151 // This should never happen. | |
| 152 return ClipBoxForeground; | |
| 153 } | |
| 154 | |
| 117 #ifndef NDEBUG | 155 #ifndef NDEBUG |
| 118 WTF::String DisplayItem::typeAsDebugString(DisplayItem::Type type) | 156 WTF::String DisplayItem::typeAsDebugString(DisplayItem::Type type) |
| 119 { | 157 { |
| 120 switch (type) { | 158 switch (type) { |
| 121 case DisplayItem::DrawingPaintPhaseBlockBackground: return "DrawingPaintPhas eBlockBackground"; | 159 case DisplayItem::DrawingPaintPhaseBlockBackground: return "DrawingPaintPhas eBlockBackground"; |
| 122 case DisplayItem::DrawingPaintPhaseChildBlockBackground: return "DrawingPain tPhaseChildBlockBackground"; | 160 case DisplayItem::DrawingPaintPhaseChildBlockBackground: return "DrawingPain tPhaseChildBlockBackground"; |
| 123 case DisplayItem::DrawingPaintPhaseChildBlockBackgrounds: return "DrawingPai ntPhaseChildBlockBackgrounds"; | 161 case DisplayItem::DrawingPaintPhaseChildBlockBackgrounds: return "DrawingPai ntPhaseChildBlockBackgrounds"; |
| 124 case DisplayItem::DrawingPaintPhaseFloat: return "DrawingPaintPhaseFloat"; | 162 case DisplayItem::DrawingPaintPhaseFloat: return "DrawingPaintPhaseFloat"; |
| 125 case DisplayItem::DrawingPaintPhaseForeground: return "DrawingPaintPhaseFore ground"; | 163 case DisplayItem::DrawingPaintPhaseForeground: return "DrawingPaintPhaseFore ground"; |
| 126 case DisplayItem::DrawingPaintPhaseOutline: return "DrawingPaintPhaseOutline "; | 164 case DisplayItem::DrawingPaintPhaseOutline: return "DrawingPaintPhaseOutline "; |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 141 case DisplayItem::ClipLayerFragmentChildOutline: return "ClipLayerFragmentCh ildOutline"; | 179 case DisplayItem::ClipLayerFragmentChildOutline: return "ClipLayerFragmentCh ildOutline"; |
| 142 case DisplayItem::ClipLayerFragmentOutline: return "ClipLayerFragmentOutline "; | 180 case DisplayItem::ClipLayerFragmentOutline: return "ClipLayerFragmentOutline "; |
| 143 case DisplayItem::ClipLayerFragmentMask: return "ClipLayerFragmentMask"; | 181 case DisplayItem::ClipLayerFragmentMask: return "ClipLayerFragmentMask"; |
| 144 case DisplayItem::ClipLayerFragmentClippingMask: return "ClipLayerFragmentCl ippingMask"; | 182 case DisplayItem::ClipLayerFragmentClippingMask: return "ClipLayerFragmentCl ippingMask"; |
| 145 case DisplayItem::ClipLayerFragmentParent: return "ClipLayerFragmentParent"; | 183 case DisplayItem::ClipLayerFragmentParent: return "ClipLayerFragmentParent"; |
| 146 case DisplayItem::ClipLayerFragmentSelection: return "ClipLayerFragmentSelec tion"; | 184 case DisplayItem::ClipLayerFragmentSelection: return "ClipLayerFragmentSelec tion"; |
| 147 case DisplayItem::ClipLayerFragmentChildBlockBackgrounds: return "ClipLayerF ragmentChildBlockBackgrounds"; | 185 case DisplayItem::ClipLayerFragmentChildBlockBackgrounds: return "ClipLayerF ragmentChildBlockBackgrounds"; |
| 148 case DisplayItem::EndClip: return "EndClip"; | 186 case DisplayItem::EndClip: return "EndClip"; |
| 149 case DisplayItem::BeginFilter: return "BeginFilter"; | 187 case DisplayItem::BeginFilter: return "BeginFilter"; |
| 150 case DisplayItem::EndFilter: return "EndFilter"; | 188 case DisplayItem::EndFilter: return "EndFilter"; |
| 189 case DisplayItem::TransparencyClip: return "TransparencyClip"; | |
| 151 case DisplayItem::BeginTransparency: return "BeginTransparency"; | 190 case DisplayItem::BeginTransparency: return "BeginTransparency"; |
| 152 case DisplayItem::EndTransparency: return "EndTransparency"; | 191 case DisplayItem::EndTransparency: return "EndTransparency"; |
| 153 case ClipBoxChildBlockBackgrounds: return "ClipBoxChildBlockBackgrounds"; | 192 case ClipBoxChildBlockBackgrounds: return "ClipBoxChildBlockBackgrounds"; |
| 154 case ClipBoxFloat: return "ClipBoxFloat"; | 193 case ClipBoxFloat: return "ClipBoxFloat"; |
| 155 case ClipBoxForeground: return "ClipBoxForeground"; | 194 case ClipBoxForeground: return "ClipBoxForeground"; |
| 156 case ClipBoxChildOutlines: return "ClipBoxChildOutlines"; | 195 case ClipBoxChildOutlines: return "ClipBoxChildOutlines"; |
| 157 case ClipBoxSelection: return "ClipBoxSelection"; | 196 case ClipBoxSelection: return "ClipBoxSelection"; |
| 158 case ClipBoxCollapsedTableBorders: return "ClipBoxCollapsedTableBorders"; | 197 case ClipBoxCollapsedTableBorders: return "ClipBoxCollapsedTableBorders"; |
| 159 case ClipBoxTextClip: return "ClipBoxTextClip"; | 198 case ClipBoxTextClip: return "ClipBoxTextClip"; |
| 160 case ClipBoxClippingMask: return "ClipBoxClippingMask"; | 199 case ClipBoxClippingMask: return "ClipBoxClippingMask"; |
| (...skipping 30 matching lines...) Expand all Loading... | |
| 191 } | 230 } |
| 192 | 231 |
| 193 void ViewDisplayList::showDebugData() const | 232 void ViewDisplayList::showDebugData() const |
| 194 { | 233 { |
| 195 fprintf(stderr, "paint list: [%s]\n", paintListAsDebugString(m_paintList).ut f8().data()); | 234 fprintf(stderr, "paint list: [%s]\n", paintListAsDebugString(m_paintList).ut f8().data()); |
| 196 fprintf(stderr, "new paints: [%s]\n", paintListAsDebugString(m_newPaints).ut f8().data()); | 235 fprintf(stderr, "new paints: [%s]\n", paintListAsDebugString(m_newPaints).ut f8().data()); |
| 197 } | 236 } |
| 198 #endif | 237 #endif |
| 199 | 238 |
| 200 } // namespace blink | 239 } // namespace blink |
| OLD | NEW |