blob: 1836821fc0574aa7ddbdf9fe54b85fb54ae44054 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
/*
* Copyright 2017 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkClipStackDevice_DEFINED
#define SkClipStackDevice_DEFINED
#include "SkClipStack.h"
#include "SkDevice.h"
class SK_API SkClipStackDevice : public SkBaseDevice {
public:
SkClipStackDevice(const SkImageInfo& info, const SkSurfaceProps& props)
: SkBaseDevice(info, props)
{}
const SkClipStack& cs() const { return fClipStack; }
SkIRect devClipBounds(const SkDraw&) const;
protected:
void onSave() override;
void onRestore() override;
void onClipRect(const SkRect& rect, SkClipOp, bool aa) override;
void onClipRRect(const SkRRect& rrect, SkClipOp, bool aa) override;
void onClipPath(const SkPath& path, SkClipOp, bool aa) override;
void onClipRegion(const SkRegion& deviceRgn, SkClipOp) override;
void onSetDeviceClipRestriction(SkIRect* mutableClipRestriction) override;
private:
SkClipStack fClipStack;
typedef SkBaseDevice INHERITED;
};
#endif
|