| 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); | |
| 112 | 111 |
| 113 void beginSkippingCache() { ++m_skippingCacheCount; } | 112 void beginSkippingCache() { ++m_skippingCacheCount; } |
| 114 void endSkippingCache() { DCHECK(m_skippingCacheCount > 0); --m_skippingCach
eCount; } | 113 void endSkippingCache() { DCHECK(m_skippingCacheCount > 0); --m_skippingCach
eCount; } |
| 115 bool isSkippingCache() const { return m_skippingCacheCount; } | 114 bool isSkippingCache() const { return m_skippingCacheCount; } |
| 116 | 115 |
| 117 // Must be called when a painting is finished. | 116 // Must be called when a painting is finished. |
| 118 // offsetFromLayoutObject is the offset between the space of the GraphicsLay
er which owns this | 117 // offsetFromLayoutObject is the offset between the space of the GraphicsLay
er which owns this |
| 119 // PaintController and the coordinate space of the owning LayoutObject. | 118 // PaintController and the coordinate space of the owning LayoutObject. |
| 120 void commitNewDisplayItems(const LayoutSize& offsetFromLayoutObject = Layout
Size()); | 119 void commitNewDisplayItems(const LayoutSize& offsetFromLayoutObject = Layout
Size()); |
| 121 | 120 |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 | 280 |
| 282 #if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS | 281 #if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS |
| 283 // A stack recording subsequence clients that are currently painting. | 282 // A stack recording subsequence clients that are currently painting. |
| 284 Vector<const DisplayItemClient*> m_currentSubsequenceClients; | 283 Vector<const DisplayItemClient*> m_currentSubsequenceClients; |
| 285 #endif | 284 #endif |
| 286 }; | 285 }; |
| 287 | 286 |
| 288 } // namespace blink | 287 } // namespace blink |
| 289 | 288 |
| 290 #endif // PaintController_h | 289 #endif // PaintController_h |
| OLD | NEW |