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

Side by Side Diff: third_party/WebKit/Source/core/paint/ClipScope.h

Issue 1512803004: Use refs for GraphicsContext (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ScrollbarTheme
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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 ClipScope_h 5 #ifndef ClipScope_h
6 #define ClipScope_h 6 #define ClipScope_h
7 7
8 #include "platform/graphics/GraphicsContext.h" 8 #include "platform/graphics/GraphicsContext.h"
9 #include "wtf/Allocator.h" 9 #include "wtf/Allocator.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 class ClipScope { 13 class ClipScope {
14 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); 14 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
15 WTF_MAKE_NONCOPYABLE(ClipScope); 15 WTF_MAKE_NONCOPYABLE(ClipScope);
16 public: 16 public:
17 ClipScope(GraphicsContext* context) 17 ClipScope(GraphicsContext& context)
18 : m_context(context) 18 : m_context(context)
19 , m_clipCount(0) { } 19 , m_clipCount(0) { }
20 ~ClipScope(); 20 ~ClipScope();
21 21
22 void clip(const LayoutRect& clipRect, SkRegion::Op operation); 22 void clip(const LayoutRect& clipRect, SkRegion::Op operation);
23 23
24 private: 24 private:
25 GraphicsContext* m_context; 25 GraphicsContext& m_context;
26 int m_clipCount; 26 int m_clipCount;
27 }; 27 };
28 28
29 } // namespace blink 29 } // namespace blink
30 30
31 #endif // ClipScope_h 31 #endif // ClipScope_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/BoxPainter.cpp ('k') | third_party/WebKit/Source/core/paint/ClipScope.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698