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

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

Issue 1220583004: Refactor DrawingRecorders to check for cached drawings earlier (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix some !'s and &&'s. De Morgan would be proud. Created 5 years, 6 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/DrawingRecorder.h
diff --git a/Source/platform/graphics/paint/DrawingRecorder.h b/Source/platform/graphics/paint/DrawingRecorder.h
index bbc14bf4fb65480d2648404dcf36ba027b035970..872c1f75bcacf82f308f59c2099a8ae98f5b0f32 100644
--- a/Source/platform/graphics/paint/DrawingRecorder.h
+++ b/Source/platform/graphics/paint/DrawingRecorder.h
@@ -20,17 +20,11 @@ class GraphicsContext;
class PLATFORM_EXPORT DrawingRecorder {
public:
+ static bool useCachedDrawingIfPossible(GraphicsContext&, const DisplayItemClientWrapper&, DisplayItem::Type);
+
DrawingRecorder(GraphicsContext&, const DisplayItemClientWrapper&, DisplayItem::Type, const FloatRect& cullRect);
~DrawingRecorder();
- bool canUseCachedDrawing() const
- {
-#if ENABLE(ASSERT)
- m_checkedCachedDrawing = true;
-#endif
- return m_canUseCachedDrawing;
- }
-
#if ENABLE(ASSERT)
void setUnderInvalidationCheckingMode(DrawingDisplayItem::UnderInvalidationCheckingMode mode) { m_underInvalidationCheckingMode = mode; }
#endif
@@ -39,9 +33,7 @@ private:
GraphicsContext& m_context;
DisplayItemClientWrapper m_displayItemClient;
const DisplayItem::Type m_displayItemType;
- bool m_canUseCachedDrawing;
#if ENABLE(ASSERT)
- mutable bool m_checkedCachedDrawing;
size_t m_displayItemPosition;
DrawingDisplayItem::UnderInvalidationCheckingMode m_underInvalidationCheckingMode;
#endif

Powered by Google App Engine
This is Rietveld 408576698