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

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

Issue 1160763005: Don't cache reflection drawings (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix win (which doesn't pack bool bitfields) Created 5 years, 7 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
« no previous file with comments | « Source/platform/graphics/paint/DisplayItem.cpp ('k') | Source/platform/graphics/paint/DisplayItemList.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/paint/DisplayItemCacheSkipper.h
diff --git a/Source/platform/graphics/paint/DisplayItemCacheSkipper.h b/Source/platform/graphics/paint/DisplayItemCacheSkipper.h
new file mode 100644
index 0000000000000000000000000000000000000000..b8d24fd1a7077eff32e32496f026a86b5fd1c76c
--- /dev/null
+++ b/Source/platform/graphics/paint/DisplayItemCacheSkipper.h
@@ -0,0 +1,34 @@
+// 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 DisplayItemCacheSkipper_h
+#define DisplayItemCacheSkipper_h
+
+#include "platform/RuntimeEnabledFeatures.h"
+#include "platform/graphics/GraphicsContext.h"
+#include "platform/graphics/paint/DisplayItemList.h"
+
+namespace blink {
+
+class DisplayItemCacheSkipper {
+public:
+ DisplayItemCacheSkipper(GraphicsContext& context)
+ : m_context(context)
+ {
+ if (RuntimeEnabledFeatures::slimmingPaintEnabled())
+ context.displayItemList()->beginSkippingCache();
+ }
+ ~DisplayItemCacheSkipper()
+ {
+ if (RuntimeEnabledFeatures::slimmingPaintEnabled())
+ m_context.displayItemList()->endSkippingCache();
+ }
+
+private:
+ GraphicsContext& m_context;
+};
+
+} // namespace blink
+
+#endif // DisplayItemCacheSkipper_h
« no previous file with comments | « Source/platform/graphics/paint/DisplayItem.cpp ('k') | Source/platform/graphics/paint/DisplayItemList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698