Flutter Impeller
scene_encoder.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 #pragma once
6 
7 #include <memory>
8 #include <string>
9 #include <vector>
10 
11 #include "flutter/fml/macros.h"
13 #include "impeller/scene/camera.h"
16 
17 namespace impeller {
18 namespace scene {
19 
20 class Scene;
21 
22 struct SceneCommand {
23  std::string label;
27 };
28 
29 class SceneEncoder {
30  public:
31  void Add(const SceneCommand& command);
32 
33  private:
34  SceneEncoder();
35 
36  std::shared_ptr<CommandBuffer> BuildSceneCommandBuffer(
37  const SceneContext& scene_context,
38  const Matrix& camera_transform,
39  RenderTarget render_target) const;
40 
41  std::vector<SceneCommand> commands_;
42 
43  friend Scene;
44 
45  FML_DISALLOW_COPY_AND_ASSIGN(SceneEncoder);
46 };
47 
48 } // namespace scene
49 } // namespace impeller
impeller::scene::SceneCommand::material
Material * material
Definition: scene_encoder.h:26
impeller::scene::SceneCommand::geometry
Geometry * geometry
Definition: scene_encoder.h:25
impeller::scene::SceneContext
Definition: scene_context.h:39
impeller::scene::SceneEncoder::Add
void Add(const SceneCommand &command)
Definition: scene_encoder.cc:18
material.h
impeller::RenderTarget
Definition: render_target.h:48
camera.h
impeller::scene::Geometry
Definition: geometry.h:27
impeller::scene::SceneCommand::transform
Matrix transform
Definition: scene_encoder.h:24
command_buffer.h
impeller::scene::SceneCommand
Definition: scene_encoder.h:22
geometry.h
impeller::scene::Scene
Definition: scene.h:20
impeller::scene::SceneEncoder
Definition: scene_encoder.h:29
impeller::scene::SceneCommand::label
std::string label
Definition: scene_encoder.h:23
impeller
Definition: aiks_context.cc:10
impeller::scene::Material
Definition: material.h:26
impeller::Matrix
A 4x4 matrix using column-major storage.
Definition: matrix.h:36