| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef DisplayItemCacheSkipper_h |
| 6 #define DisplayItemCacheSkipper_h |
| 7 |
| 8 #include "platform/RuntimeEnabledFeatures.h" |
| 9 #include "platform/graphics/GraphicsContext.h" |
| 10 #include "platform/graphics/paint/DisplayItemList.h" |
| 11 |
| 12 namespace blink { |
| 13 |
| 14 class DisplayItemCacheSkipper { |
| 15 public: |
| 16 DisplayItemCacheSkipper(GraphicsContext& context) |
| 17 : m_context(context) |
| 18 { |
| 19 if (RuntimeEnabledFeatures::slimmingPaintEnabled()) |
| 20 context.displayItemList()->beginSkippingCache(); |
| 21 } |
| 22 ~DisplayItemCacheSkipper() |
| 23 { |
| 24 if (RuntimeEnabledFeatures::slimmingPaintEnabled()) |
| 25 m_context.displayItemList()->endSkippingCache(); |
| 26 } |
| 27 |
| 28 private: |
| 29 GraphicsContext& m_context; |
| 30 }; |
| 31 |
| 32 } // namespace blink |
| 33 |
| 34 #endif // DisplayItemCacheSkipper_h |
| OLD | NEW |