Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: Source/platform/graphics/paint/SubsequenceRecorder.h

Issue 1327563003: Don't cache subsequence whose layer is not fully contained by repaint rect (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 SubsequenceRecorder_h 5 #ifndef SubsequenceRecorder_h
6 #define SubsequenceRecorder_h 6 #define SubsequenceRecorder_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 // SubsequenceRecorder records BeginSubsequenceDisplayItem and EndSubsequenceDis playItem 15 // SubsequenceRecorder records BeginSubsequenceDisplayItem and EndSubsequenceDis playItem
16 // sentinels at either end of a continguous sequence of DisplayItems, and suppor ts 16 // sentinels at either end of a continguous sequence of DisplayItems, and suppor ts
17 // caching via a CachedDisplayItem with the CachedSubsequence DisplayItem type. 17 // caching via a CachedDisplayItem with the CachedSubsequence DisplayItem type.
18 // 18 //
19 // Also note that useCachedSubsequenceIfPossible is not sufficient to determine whether a 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 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. 21 // none of the DisplayItemClients that contribute to the subsequence have been i nvalidated.
22 // 22 //
23 class PLATFORM_EXPORT SubsequenceRecorder { 23 class PLATFORM_EXPORT SubsequenceRecorder {
24 public: 24 public:
25 static bool useCachedSubsequenceIfPossible(GraphicsContext&, const DisplayIt emClientWrapper&); 25 static bool useCachedSubsequenceIfPossible(GraphicsContext&, const DisplayIt emClientWrapper&);
26 26
27 SubsequenceRecorder(GraphicsContext&, const DisplayItemClientWrapper&); 27 SubsequenceRecorder(GraphicsContext&, const DisplayItemClientWrapper&);
28 ~SubsequenceRecorder(); 28 ~SubsequenceRecorder();
29 29
30 void setUncacheable();
31
30 private: 32 private:
31 DisplayItemList* m_displayItemList; 33 DisplayItemList* m_displayItemList;
32 DisplayItemClientWrapper m_client; 34 DisplayItemClientWrapper m_client;
35 size_t m_beginSubsequenceIndex;
33 }; 36 };
34 37
35 } // namespace blink 38 } // namespace blink
36 39
37 #endif // SubsequenceRecorder_h 40 #endif // SubsequenceRecorder_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698