| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 SubtreeRecorder_h | 5 #ifndef SubtreeRecorder_h |
| 6 #define SubtreeRecorder_h | 6 #define SubtreeRecorder_h |
| 7 | 7 |
| 8 #include "platform/graphics/paint/DisplayItemClient.h" | 8 #include "platform/graphics/paint/DisplayItemClient.h" |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| 11 | 11 |
| 12 class DisplayItemList; | 12 class DisplayItemList; |
| 13 class GraphicsContext; | 13 class GraphicsContext; |
| 14 | 14 |
| 15 // Records subtree information during painting. The recorder's life span covers | 15 // Records subtree information during painting. The recorder's life span covers |
| 16 // all painting operations executed during the root of the subtree's paint metho
d | 16 // all painting operations executed during the root of the subtree's paint metho
d |
| 17 // for the paint phase. | 17 // for the paint phase. |
| 18 class PLATFORM_EXPORT SubtreeRecorder { | 18 class PLATFORM_EXPORT SubtreeRecorder { |
| 19 public: | 19 public: |
| 20 SubtreeRecorder(GraphicsContext&, const DisplayItemClientWrapper&, int paint
Phase); | 20 static bool useCachedSubtreeIfPossible(GraphicsContext&, const DisplayItemCl
ientWrapper&); |
| 21 |
| 22 SubtreeRecorder(GraphicsContext&, const DisplayItemClientWrapper&); |
| 21 ~SubtreeRecorder(); | 23 ~SubtreeRecorder(); |
| 22 | 24 |
| 23 bool canUseCache() const; | |
| 24 | |
| 25 private: | 25 private: |
| 26 DisplayItemList* m_displayItemList; | 26 DisplayItemList* m_displayItemList; |
| 27 DisplayItemClientWrapper m_client; | 27 DisplayItemClientWrapper m_client; |
| 28 const int m_paintPhase; | |
| 29 bool m_canUseCache; | |
| 30 #if ENABLE(ASSERT) | |
| 31 mutable bool m_checkedCanUseCache; | |
| 32 #endif | |
| 33 }; | 28 }; |
| 34 | 29 |
| 35 } // namespace blink | 30 } // namespace blink |
| 36 | 31 |
| 37 #endif // SubtreeRecorder_h | 32 #endif // SubtreeRecorder_h |
| OLD | NEW |