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

Unified Diff: Source/platform/graphics/paint/SubsequenceRecorder.h

Issue 1313223002: Simplify subtree (now subsequence) caching (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: Source/platform/graphics/paint/SubsequenceRecorder.h
diff --git a/Source/platform/graphics/paint/SubsequenceRecorder.h b/Source/platform/graphics/paint/SubsequenceRecorder.h
new file mode 100644
index 0000000000000000000000000000000000000000..ab699b373523cd2118d2e8f4c6814d55f1f06216
--- /dev/null
+++ b/Source/platform/graphics/paint/SubsequenceRecorder.h
@@ -0,0 +1,37 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef SubsequenceRecorder_h
+#define SubsequenceRecorder_h
+
+#include "platform/graphics/paint/DisplayItemClient.h"
+
+namespace blink {
+
+class DisplayItemList;
+class GraphicsContext;
+
+// SubsequenceRecorder records BeginSubsequenceDisplayItem and EndSubsequenceDisplayItem
+// sentinels at either end of a continguous sequence of DisplayItems, and supports
+// caching via a CachedDisplayItem with the CachedSubsequence DisplayItem type.
+//
+// Also note that useCachedSubsequenceIfPossible is not sufficient to determine whether a
+// CachedSubsequence can be used. In particular, the client is responsible for checking that
+// none of the DisplayItemClients that contribute to the subsequence have been invalidated.
+//
+class PLATFORM_EXPORT SubsequenceRecorder {
+public:
+ static bool useCachedSubsequenceIfPossible(GraphicsContext&, const DisplayItemClientWrapper&);
+
+ SubsequenceRecorder(GraphicsContext&, const DisplayItemClientWrapper&);
+ ~SubsequenceRecorder();
+
+private:
+ DisplayItemList* m_displayItemList;
+ DisplayItemClientWrapper m_client;
+};
+
+} // namespace blink
+
+#endif // SubsequenceRecorder_h
« no previous file with comments | « Source/platform/graphics/paint/SubsequenceDisplayItem.h ('k') | Source/platform/graphics/paint/SubsequenceRecorder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698