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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 PaintList::iterator end = m_paintList.end(); | 44 PaintList::iterator end = m_paintList.end(); |
45 if (displayItem.renderer() && !m_paintListRenderers.contains(displayItem.ren
derer())) | 45 if (displayItem.renderer() && !m_paintListRenderers.contains(displayItem.ren
derer())) |
46 return end; | 46 return end; |
47 | 47 |
48 for (PaintList::iterator it = begin; it != end; ++it) { | 48 for (PaintList::iterator it = begin; it != end; ++it) { |
49 DisplayItem& existing = **it; | 49 DisplayItem& existing = **it; |
50 if (existing.idsEqual(displayItem)) | 50 if (existing.idsEqual(displayItem)) |
51 return it; | 51 return it; |
52 } | 52 } |
53 | 53 |
54 // FIXME: Properly handle clips. | 54 ASSERT_NOT_REACHED(); |
55 ASSERT(!displayItem.renderer()); | |
56 return end; | 55 return end; |
57 } | 56 } |
58 | 57 |
59 bool ViewDisplayList::wasInvalidated(const DisplayItem& displayItem) const | 58 bool ViewDisplayList::wasInvalidated(const DisplayItem& displayItem) const |
60 { | 59 { |
61 // FIXME: Use a bit on RenderObject instead of tracking m_invalidated. | 60 // FIXME: Use a bit on RenderObject instead of tracking m_invalidated. |
62 return displayItem.renderer() && m_invalidated.contains(displayItem.renderer
()); | 61 return displayItem.renderer() && m_invalidated.contains(displayItem.renderer
()); |
63 } | 62 } |
64 | 63 |
65 static void appendDisplayItem(PaintList& list, HashSet<const RenderObject*>& ren
derers, WTF::PassOwnPtr<DisplayItem> displayItem) | 64 static void appendDisplayItem(PaintList& list, HashSet<const RenderObject*>& ren
derers, WTF::PassOwnPtr<DisplayItem> displayItem) |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 } | 177 } |
179 | 178 |
180 void ViewDisplayList::showDebugData() const | 179 void ViewDisplayList::showDebugData() const |
181 { | 180 { |
182 fprintf(stderr, "paint list: [%s]\n", paintListAsDebugString(m_paintList).ut
f8().data()); | 181 fprintf(stderr, "paint list: [%s]\n", paintListAsDebugString(m_paintList).ut
f8().data()); |
183 fprintf(stderr, "new paints: [%s]\n", paintListAsDebugString(m_newPaints).ut
f8().data()); | 182 fprintf(stderr, "new paints: [%s]\n", paintListAsDebugString(m_newPaints).ut
f8().data()); |
184 } | 183 } |
185 #endif | 184 #endif |
186 | 185 |
187 } // namespace blink | 186 } // namespace blink |
OLD | NEW |