Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / Source / core / paint / ClipScope.h
blob71df08677b2f26b5a63092bbd4ae35f2e1917021
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
3 // found in the LICENSE file.
5 #ifndef ClipScope_h
6 #define ClipScope_h
8 #include "platform/graphics/GraphicsContext.h"
9 #include "wtf/Allocator.h"
11 namespace blink {
13 class ClipScope {
14 ALLOW_ONLY_INLINE_ALLOCATION();
15 WTF_MAKE_NONCOPYABLE(ClipScope);
16 public:
17 ClipScope(GraphicsContext* context)
18 : m_context(context)
19 , m_clipCount(0) { }
20 ~ClipScope();
22 void clip(const LayoutRect& clipRect, SkRegion::Op operation);
24 private:
25 GraphicsContext* m_context;
26 int m_clipCount;
29 } // namespace blink
31 #endif // ClipScope_h