• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2018 Google Inc.
3  *
4  * Use of this source code is governed by a BSD-style license that can be
5  * found in the LICENSE file.
6  */
7 
8 #ifndef SkSGPlane_DEFINED
9 #define SkSGPlane_DEFINED
10 
11 #include "SkSGGeometryNode.h"
12 
13 class SkCanvas;
14 class SkPaint;
15 
16 namespace sksg {
17 
18 /**
19  * Concrete Geometry node, representing the whole canvas.
20  */
21 class Plane final : public GeometryNode {
22 public:
Make()23     static sk_sp<Plane> Make() { return sk_sp<Plane>(new Plane()); }
24 
25 protected:
26     void onClip(SkCanvas*, bool antiAlias) const override;
27     void onDraw(SkCanvas*, const SkPaint&) const override;
28 
29     SkRect onRevalidate(InvalidationController*, const SkMatrix&) override;
30     SkPath onAsPath() const override;
31 
32 private:
33     Plane();
34 
35     using INHERITED = GeometryNode;
36 };
37 
38 } // namespace sksg
39 
40 #endif // SkSGPlane_DEFINED
41