Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
skia
modules
sksg
src
SkSGScene.cpp
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
#include "
include/core/SkMatrix.h
"
9
#include "
modules/sksg/include/SkSGRenderNode.h
"
10
#include "
modules/sksg/include/SkSGScene.h
"
11
12
#include <utility>
13
14
namespace
sksg
{
15
16
std::unique_ptr<Scene>
Scene::Make
(
sk_sp<RenderNode>
root) {
17
return
root ? std::unique_ptr<Scene>(
new
Scene
(std::move(root))) :
nullptr
;
18
}
19
20
Scene::Scene
(
sk_sp<RenderNode>
root) : fRoot(
std
::move(root)) {}
21
22
Scene::~Scene
() =
default
;
23
24
void
Scene::render
(
SkCanvas
* canvas)
const
{
25
fRoot->render(canvas);
26
}
27
28
void
Scene::revalidate
(
InvalidationController
* ic) {
29
fRoot->revalidate(ic,
SkMatrix::I
());
30
}
31
32
const
RenderNode
*
Scene::nodeAt
(
const
SkPoint
& p)
const
{
33
return
fRoot->nodeAt(p);
34
}
35
36
}
// namespace sksg
SkMatrix.h
SkSGRenderNode.h
SkSGScene.h
SkCanvas
Definition
SkCanvas.h:106
SkMatrix::I
static const SkMatrix & I()
Definition
SkMatrix.cpp:1544
sk_sp
Definition
SkRefCnt.h:220
sksg::InvalidationController
Definition
SkSGInvalidationController.h:24
sksg::RenderNode
Definition
SkSGRenderNode.h:34
sksg::Scene
Definition
SkSGScene.h:28
sksg::Scene::nodeAt
const RenderNode * nodeAt(const SkPoint &) const
Definition
SkSGScene.cpp:32
sksg::Scene::~Scene
~Scene()
sksg::Scene::Scene
Scene(const Scene &)=delete
sksg::Scene::revalidate
void revalidate(InvalidationController *=nullptr)
Definition
SkSGScene.cpp:28
sksg::Scene::Make
static std::unique_ptr< Scene > Make(sk_sp< RenderNode > root)
Definition
SkSGScene.cpp:16
sksg::Scene::render
void render(SkCanvas *) const
Definition
SkSGScene.cpp:24
sksg
Definition
Skottie.h:32
std
Definition
ref_ptr.h:256
SkPoint
Definition
SkPoint_impl.h:163
Generated on Fri Apr 26 2024 06:16:25 for Flutter Engine by
1.9.8