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