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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/paint/DisplayItemCacheSkipper.h

Issue 1497683002: Make platform/graphics to use USING_FAST_MALLOC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 unified diff | Download patch
OLDNEW
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"
11 #include "wtf/Noncopyable.h"
10 12
11 namespace blink { 13 namespace blink {
12 14
13 class DisplayItemCacheSkipper { 15 class DisplayItemCacheSkipper final {
16 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
17 WTF_MAKE_NONCOPYABLE(DisplayItemCacheSkipper);
14 public: 18 public:
15 DisplayItemCacheSkipper(GraphicsContext& context) 19 DisplayItemCacheSkipper(GraphicsContext& context)
16 : m_context(context) 20 : m_context(context)
17 { 21 {
18 context.paintController().beginSkippingCache(); 22 context.paintController().beginSkippingCache();
19 } 23 }
20 ~DisplayItemCacheSkipper() 24 ~DisplayItemCacheSkipper()
21 { 25 {
22 m_context.paintController().endSkippingCache(); 26 m_context.paintController().endSkippingCache();
23 } 27 }
24 28
25 private: 29 private:
26 GraphicsContext& m_context; 30 GraphicsContext& m_context;
27 }; 31 };
28 32
29 } // namespace blink 33 } // namespace blink
30 34
31 #endif // DisplayItemCacheSkipper_h 35 #endif // DisplayItemCacheSkipper_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698