Flutter Engine
The Flutter Engine
SkSGScene.h
Go to the documentation of this file.
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 SkSGScene_DEFINED
9#define SkSGScene_DEFINED
10
13
14#include <memory>
15
16class SkCanvas;
17struct SkPoint;
18
19namespace sksg {
20
21class InvalidationController;
22class RenderNode;
23
24/**
25 * Holds a scene root. Provides high-level methods for rendering.
26 *
27 */
28class Scene final {
29public:
30 static std::unique_ptr<Scene> Make(sk_sp<RenderNode> root);
32 Scene(const Scene&) = delete;
33 Scene& operator=(const Scene&) = delete;
34
35 void render(SkCanvas*) const;
36 void revalidate(InvalidationController* = nullptr);
37 const RenderNode* nodeAt(const SkPoint&) const;
38
39private:
41
42 const sk_sp<RenderNode> fRoot;
43};
44
45} // namespace sksg
46
47#endif // SkSGScene_DEFINED
const RenderNode * nodeAt(const SkPoint &) const
Definition: SkSGScene.cpp:32
Scene(const Scene &)=delete
void revalidate(InvalidationController *=nullptr)
Definition: SkSGScene.cpp:28
Scene & operator=(const Scene &)=delete
static std::unique_ptr< Scene > Make(sk_sp< RenderNode > root)
Definition: SkSGScene.cpp:16
void render(SkCanvas *) const
Definition: SkSGScene.cpp:24
string root
Definition: scale_cpu.py:20
Definition: Skottie.h:32