OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef SubsequenceRecorder_h |
| 6 #define SubsequenceRecorder_h |
| 7 |
| 8 #include "platform/graphics/paint/DisplayItemClient.h" |
| 9 |
| 10 namespace blink { |
| 11 |
| 12 class DisplayItemList; |
| 13 class GraphicsContext; |
| 14 |
| 15 // SubsequenceRecorder records BeginSubsequenceDisplayItem and EndSubsequenceDis
playItem |
| 16 // sentinels at either end of a continguous sequence of DisplayItems, and suppor
ts |
| 17 // caching via a CachedDisplayItem with the CachedSubsequence DisplayItem type. |
| 18 // |
| 19 // Also note that useCachedSubsequenceIfPossible is not sufficient to determine
whether a |
| 20 // CachedSubsequence can be used. In particular, the client is responsible for c
hecking that |
| 21 // none of the DisplayItemClients that contribute to the subsequence have been i
nvalidated. |
| 22 // |
| 23 class PLATFORM_EXPORT SubsequenceRecorder { |
| 24 public: |
| 25 static bool useCachedSubsequenceIfPossible(GraphicsContext&, const DisplayIt
emClientWrapper&); |
| 26 |
| 27 SubsequenceRecorder(GraphicsContext&, const DisplayItemClientWrapper&); |
| 28 ~SubsequenceRecorder(); |
| 29 |
| 30 private: |
| 31 DisplayItemList* m_displayItemList; |
| 32 DisplayItemClientWrapper m_client; |
| 33 }; |
| 34 |
| 35 } // namespace blink |
| 36 |
| 37 #endif // SubsequenceRecorder_h |
OLD | NEW |