Flutter Engine
The Flutter Engine
dl_runtime_effect.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_DISPLAY_LIST_EFFECTS_DL_RUNTIME_EFFECT_H_
6#define FLUTTER_DISPLAY_LIST_EFFECTS_DL_RUNTIME_EFFECT_H_
7
8#include <memory>
9
10#include "flutter/fml/macros.h"
11#include "flutter/impeller/runtime_stage/runtime_stage.h"
12
15
16namespace flutter {
17
18class DlRuntimeEffect : public SkRefCnt {
19 public:
21 const sk_sp<SkRuntimeEffect>& runtime_effect);
22
24 std::shared_ptr<impeller::RuntimeStage> runtime_stage);
25
27
28 virtual std::shared_ptr<impeller::RuntimeStage> runtime_stage() const = 0;
29
30 protected:
33
34 private:
35 FML_DISALLOW_COPY_AND_ASSIGN(DlRuntimeEffect);
36};
37
39 public:
40 explicit DlRuntimeEffectSkia(const sk_sp<SkRuntimeEffect>& runtime_effect);
41
42 // |DlRuntimeEffect|
44
45 // |DlRuntimeEffect|
46 std::shared_ptr<impeller::RuntimeStage> runtime_stage() const override;
47
48 private:
49 DlRuntimeEffectSkia() = delete;
50 // |DlRuntimeEffect|
51 ~DlRuntimeEffectSkia() override;
52
53 sk_sp<SkRuntimeEffect> skia_runtime_effect_;
54
55 FML_DISALLOW_COPY_AND_ASSIGN(DlRuntimeEffectSkia);
56
57 friend DlRuntimeEffect;
58};
59
61 public:
63 std::shared_ptr<impeller::RuntimeStage> runtime_stage);
64
65 // |DlRuntimeEffect|
67
68 // |DlRuntimeEffect|
69 std::shared_ptr<impeller::RuntimeStage> runtime_stage() const override;
70
71 private:
72 DlRuntimeEffectImpeller() = delete;
73 // |DlRuntimeEffect|
74 ~DlRuntimeEffectImpeller() override;
75
76 std::shared_ptr<impeller::RuntimeStage> runtime_stage_;
77
78 FML_DISALLOW_COPY_AND_ASSIGN(DlRuntimeEffectImpeller);
79
80 friend DlRuntimeEffect;
81};
82
83} // namespace flutter
84
85#endif // FLUTTER_DISPLAY_LIST_EFFECTS_DL_RUNTIME_EFFECT_H_
sk_sp< SkRuntimeEffect > skia_runtime_effect() const override
std::shared_ptr< impeller::RuntimeStage > runtime_stage() const override
sk_sp< SkRuntimeEffect > skia_runtime_effect() const override
std::shared_ptr< impeller::RuntimeStage > runtime_stage() const override
static sk_sp< DlRuntimeEffect > MakeSkia(const sk_sp< SkRuntimeEffect > &runtime_effect)
virtual sk_sp< SkRuntimeEffect > skia_runtime_effect() const =0
virtual std::shared_ptr< impeller::RuntimeStage > runtime_stage() const =0
static sk_sp< DlRuntimeEffect > MakeImpeller(std::shared_ptr< impeller::RuntimeStage > runtime_stage)