Flutter Engine
The Flutter Engine
scene_contents.h
Go to the documentation of this file.
1// Copyright 2013 The Flutter 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.
4
5#ifndef FLUTTER_IMPELLER_ENTITY_CONTENTS_SCENE_CONTENTS_H_
6#define FLUTTER_IMPELLER_ENTITY_CONTENTS_SCENE_CONTENTS_H_
7
8#if !IMPELLER_ENABLE_3D
9static_assert(false);
10#endif
11
12#include <memory>
13
15
18#include "impeller/scene/node.h"
19
20namespace impeller {
21
22class SceneContents final : public ColorSourceContents {
23 public:
25
26 ~SceneContents() override;
27
29
30 void SetNode(std::shared_ptr<scene::Node> node);
31
32 // |Contents|
33 bool Render(const ContentContext& renderer,
34 const Entity& entity,
35 RenderPass& pass) const override;
36
37 private:
38 Matrix camera_transform_;
39 std::shared_ptr<scene::Node> node_;
40};
41
42} // namespace impeller
43
44#endif // FLUTTER_IMPELLER_ENTITY_CONTENTS_SCENE_CONTENTS_H_
Render passes encode render commands directed as one specific render target into an underlying comman...
Definition: render_pass.h:33
void SetCameraTransform(Matrix matrix)
void SetNode(std::shared_ptr< scene::Node > node)
bool Render(const ContentContext &renderer, const Entity &entity, RenderPass &pass) const override
unsigned useCenter Optional< SkMatrix > matrix
Definition: SkRecords.h:258
A 4x4 matrix using column-major storage.
Definition: matrix.h:37