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 PaintController_h | 5 #ifndef PaintController_h |
6 #define PaintController_h | 6 #define PaintController_h |
7 | 7 |
8 #include "platform/PlatformExport.h" | 8 #include "platform/PlatformExport.h" |
9 #include "platform/RuntimeEnabledFeatures.h" | 9 #include "platform/RuntimeEnabledFeatures.h" |
10 #include "platform/geometry/IntRect.h" | 10 #include "platform/geometry/IntRect.h" |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 // appends the cached display item to the new display list and returns true.
Otherwise returns false. | 101 // appends the cached display item to the new display list and returns true.
Otherwise returns false. |
102 bool useCachedDrawingIfPossible(const DisplayItemClient&, DisplayItem::Type)
; | 102 bool useCachedDrawingIfPossible(const DisplayItemClient&, DisplayItem::Type)
; |
103 | 103 |
104 // Tries to find the cached subsequence corresponding to the given parameter
s. If found, copies the | 104 // Tries to find the cached subsequence corresponding to the given parameter
s. If found, copies the |
105 // cache subsequence to the new display list and returns true. Otherwise ret
urns false. | 105 // cache subsequence to the new display list and returns true. Otherwise ret
urns false. |
106 bool useCachedSubsequenceIfPossible(const DisplayItemClient&); | 106 bool useCachedSubsequenceIfPossible(const DisplayItemClient&); |
107 | 107 |
108 // True if the last display item is a begin that doesn't draw content. | 108 // True if the last display item is a begin that doesn't draw content. |
109 bool lastDisplayItemIsNoopBegin() const; | 109 bool lastDisplayItemIsNoopBegin() const; |
110 void removeLastDisplayItem(); | 110 void removeLastDisplayItem(); |
| 111 const DisplayItem* lastDisplayItem(unsigned offset); |
111 | 112 |
112 void beginSkippingCache() { ++m_skippingCacheCount; } | 113 void beginSkippingCache() { ++m_skippingCacheCount; } |
113 void endSkippingCache() { DCHECK(m_skippingCacheCount > 0); --m_skippingCach
eCount; } | 114 void endSkippingCache() { DCHECK(m_skippingCacheCount > 0); --m_skippingCach
eCount; } |
114 bool isSkippingCache() const { return m_skippingCacheCount; } | 115 bool isSkippingCache() const { return m_skippingCacheCount; } |
115 | 116 |
116 // Must be called when a painting is finished. | 117 // Must be called when a painting is finished. |
117 // offsetFromLayoutObject is the offset between the space of the GraphicsLay
er which owns this | 118 // offsetFromLayoutObject is the offset between the space of the GraphicsLay
er which owns this |
118 // PaintController and the coordinate space of the owning LayoutObject. | 119 // PaintController and the coordinate space of the owning LayoutObject. |
119 void commitNewDisplayItems(const LayoutSize& offsetFromLayoutObject = Layout
Size()); | 120 void commitNewDisplayItems(const LayoutSize& offsetFromLayoutObject = Layout
Size()); |
120 | 121 |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 | 281 |
281 #if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS | 282 #if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS |
282 // A stack recording subsequence clients that are currently painting. | 283 // A stack recording subsequence clients that are currently painting. |
283 Vector<const DisplayItemClient*> m_currentSubsequenceClients; | 284 Vector<const DisplayItemClient*> m_currentSubsequenceClients; |
284 #endif | 285 #endif |
285 }; | 286 }; |
286 | 287 |
287 } // namespace blink | 288 } // namespace blink |
288 | 289 |
289 #endif // PaintController_h | 290 #endif // PaintController_h |
OLD | NEW |