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

Unified Diff: third_party/WebKit/Source/platform/graphics/paint/DrawingRecorder.h

Issue 2675773003: Optimize CompositingRecorder::endCompositing to not need an SkPictureBuilder (Closed)
Patch Set: rebase Created 3 years, 11 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: third_party/WebKit/Source/platform/graphics/paint/DrawingRecorder.h
diff --git a/third_party/WebKit/Source/platform/graphics/paint/DrawingRecorder.h b/third_party/WebKit/Source/platform/graphics/paint/DrawingRecorder.h
index e185231a90a47f3079fd85df6b625d9cad63a272..6bda9eb0cbecdac9f8c0f4aa5df64b6ae453a90c 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/DrawingRecorder.h
+++ b/third_party/WebKit/Source/platform/graphics/paint/DrawingRecorder.h
@@ -12,6 +12,7 @@
#include "platform/graphics/paint/DrawingDisplayItem.h"
#include "platform/graphics/paint/PaintController.h"
#include "wtf/Allocator.h"
+#include "wtf/AutoReset.h"
#include "wtf/Noncopyable.h"
#ifndef NDEBUG
@@ -54,10 +55,24 @@ class PLATFORM_EXPORT DrawingRecorder final {
bool m_knownToBeOpaque;
#if DCHECK_IS_ON()
- size_t m_displayItemPosition;
+ // Ensures the list size does not change during the recorder's scope.
+ size_t m_initialDisplayItemListSize;
#endif
};
+#if DCHECK_IS_ON()
+class DisableListModificationCheck {
+ STACK_ALLOCATED();
+ WTF_MAKE_NONCOPYABLE(DisableListModificationCheck);
+
+ public:
+ DisableListModificationCheck();
+
+ private:
+ AutoReset<bool> m_disabler;
+};
+#endif // DCHECK_IS_ON()
+
} // namespace blink
#endif // DrawingRecorder_h

Powered by Google App Engine
This is Rietveld 408576698