| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef DisplayItemCacheSkipper_h | 5 #ifndef DisplayItemCacheSkipper_h |
| 6 #define DisplayItemCacheSkipper_h | 6 #define DisplayItemCacheSkipper_h |
| 7 | 7 |
| 8 #include "platform/graphics/GraphicsContext.h" | 8 #include "platform/graphics/GraphicsContext.h" |
| 9 #include "platform/graphics/paint/PaintController.h" | 9 #include "platform/graphics/paint/PaintController.h" |
| 10 #include "wtf/Allocator.h" | 10 #include "wtf/Allocator.h" |
| 11 #include "wtf/Noncopyable.h" | 11 #include "wtf/Noncopyable.h" |
| 12 | 12 |
| 13 namespace blink { | 13 namespace blink { |
| 14 | 14 |
| 15 class DisplayItemCacheSkipper final { | 15 class DisplayItemCacheSkipper final { |
| 16 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); | 16 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); |
| 17 WTF_MAKE_NONCOPYABLE(DisplayItemCacheSkipper); | 17 WTF_MAKE_NONCOPYABLE(DisplayItemCacheSkipper); |
| 18 public: | 18 public: |
| 19 DisplayItemCacheSkipper(GraphicsContext& context) | 19 DisplayItemCacheSkipper(GraphicsContext& context) |
| 20 : m_context(context) | 20 : m_context(context) |
| 21 { | 21 { |
| 22 context.paintController().beginSkippingCache(); | 22 context.getPaintController().beginSkippingCache(); |
| 23 } | 23 } |
| 24 ~DisplayItemCacheSkipper() | 24 ~DisplayItemCacheSkipper() |
| 25 { | 25 { |
| 26 m_context.paintController().endSkippingCache(); | 26 m_context.getPaintController().endSkippingCache(); |
| 27 } | 27 } |
| 28 | 28 |
| 29 private: | 29 private: |
| 30 GraphicsContext& m_context; | 30 GraphicsContext& m_context; |
| 31 }; | 31 }; |
| 32 | 32 |
| 33 } // namespace blink | 33 } // namespace blink |
| 34 | 34 |
| 35 #endif // DisplayItemCacheSkipper_h | 35 #endif // DisplayItemCacheSkipper_h |
| OLD | NEW |