Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
scene_shader.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_LIB_UI_PAINTING_SCENE_SCENE_SHADER_H_
6#define FLUTTER_LIB_UI_PAINTING_SCENE_SCENE_SHADER_H_
7
8#include <string>
9#include <vector>
10
11#include "flutter/lib/ui/dart_wrapper.h"
12#include "flutter/lib/ui/painting/scene/scene_node.h"
13#include "flutter/lib/ui/painting/shader.h"
15
17
18namespace flutter {
19
20class SceneShader : public Shader {
21 DEFINE_WRAPPERTYPEINFO();
23
24 public:
25 ~SceneShader() override;
26
27 static void Create(Dart_Handle wrapper, Dart_Handle scene_node_handle);
28
29 void SetCameraTransform(const tonic::Float64List& matrix4);
30
31 void Dispose();
32
33 // |Shader|
34 std::shared_ptr<DlColorSource> shader(DlImageSampling) override;
35
36 private:
37 explicit SceneShader(fml::RefPtr<SceneNode> scene_node);
38
39 impeller::Matrix camera_transform_;
40 fml::RefPtr<SceneNode> scene_node_;
41};
42
43} // namespace flutter
44
45#endif // FLUTTER_LIB_UI_PAINTING_SCENE_SCENE_SHADER_H_
static sk_sp< Effect > Create()
~SceneShader() override
void SetCameraTransform(const tonic::Float64List &matrix4)
std::shared_ptr< DlColorSource > shader(DlImageSampling) override
struct _Dart_Handle * Dart_Handle
Definition dart_api.h:258
#define FML_FRIEND_MAKE_REF_COUNTED(T)
A 4x4 matrix using column-major storage.
Definition matrix.h:37