Flutter Engine
 
Loading...
Searching...
No Matches
embedded_views.cc
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
6
7namespace flutter {
8
10 builder_ = std::make_unique<DisplayListBuilder>(
11 /*bounds=*/view_bounds,
12 /*prepare_rtree=*/true);
13}
14
16 return builder_ ? builder_.get() : nullptr;
17}
18
20 display_list_ = builder_->Build();
21 FML_DCHECK(display_list_->has_rtree());
22 builder_ = nullptr;
23}
24
26 return display_list_->rtree()->region();
27}
28
32
34 display_list_->Dispatch(receiver);
35}
36
38 return display_list_->GetBounds().IsEmpty();
39}
40
42 return builder_ == nullptr;
43}
44
46
48 int64_t flutter_view_id,
49 GrDirectContext* context,
50 const std::shared_ptr<impeller::AiksContext>& aiks_context,
51 std::unique_ptr<SurfaceFrame> frame) {
52 frame->Submit();
53}
54
58
60
62 std::shared_ptr<Mutator> element = std::make_shared<Mutator>(rect);
63 vector_.push_back(element);
64}
65
67 std::shared_ptr<Mutator> element = std::make_shared<Mutator>(rrect);
68 vector_.push_back(element);
69}
70
72 std::shared_ptr<Mutator> element = std::make_shared<Mutator>(rrect);
73 vector_.push_back(element);
74}
75
77 std::shared_ptr<Mutator> element = std::make_shared<Mutator>(path);
78 vector_.push_back(element);
79}
80
82 std::shared_ptr<Mutator> element = std::make_shared<Mutator>(matrix);
83 vector_.push_back(element);
84}
85
86void MutatorsStack::PushOpacity(const uint8_t& alpha) {
87 std::shared_ptr<Mutator> element = std::make_shared<Mutator>(alpha);
88 vector_.push_back(element);
89}
90
92 const std::shared_ptr<DlImageFilter>& filter,
93 const DlRect& filter_rect) {
94 std::shared_ptr<Mutator> element =
95 std::make_shared<Mutator>(filter, filter_rect);
96 vector_.push_back(element);
97}
98
100 vector_.pop_back();
101}
102
103void MutatorsStack::PopTo(size_t stack_count) {
104 while (vector_.size() > stack_count) {
105 Pop();
106 }
107}
108
109const std::vector<std::shared_ptr<Mutator>>::const_reverse_iterator
111 return vector_.rend();
112}
113
114const std::vector<std::shared_ptr<Mutator>>::const_reverse_iterator
116 return vector_.rbegin();
117}
118
119const std::vector<std::shared_ptr<Mutator>>::const_iterator
121 return vector_.begin();
122}
123
124const std::vector<std::shared_ptr<Mutator>>::const_iterator MutatorsStack::End()
125 const {
126 return vector_.end();
127}
128
129} // namespace flutter
void dispatch(DlOpReceiver &receiver)
const DlRegion & getRegion() const override
DisplayListEmbedderViewSlice(DlRect view_bounds)
void render_into(DlCanvas *canvas) override
Developer-facing API for rendering anything within the engine.
Definition dl_canvas.h:32
virtual void DrawDisplayList(const sk_sp< DisplayList > display_list, DlScalar opacity=SK_Scalar1)=0
Internal API for rendering recorded display lists to backends.
virtual bool SupportsDynamicThreadMerging()
virtual void CollectView(int64_t view_id)
virtual void SubmitFlutterView(int64_t flutter_view_id, GrDirectContext *context, const std::shared_ptr< impeller::AiksContext > &aiks_context, std::unique_ptr< SurfaceFrame > frame)
size_t stack_count() const
void PushTransform(const DlMatrix &matrix)
void PushBackdropFilter(const std::shared_ptr< DlImageFilter > &filter, const DlRect &filter_rect)
void PushClipRect(const DlRect &rect)
void PushClipPath(const DlPath &path)
const std::vector< std::shared_ptr< Mutator > >::const_reverse_iterator Top() const
const std::vector< std::shared_ptr< Mutator > >::const_reverse_iterator Bottom() const
const std::vector< std::shared_ptr< Mutator > >::const_iterator End() const
void PopTo(size_t stack_count)
void PushClipRRect(const DlRoundRect &rrect)
void PushOpacity(const uint8_t &alpha)
void PushClipRSE(const DlRoundSuperellipse &rrect)
const std::vector< std::shared_ptr< Mutator > >::const_iterator Begin() const
G_BEGIN_DECLS FlutterViewId view_id
#define FML_DCHECK(condition)
Definition logging.h:122
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
Definition switch_defs.h:52
A 4x4 matrix using column-major storage.
Definition matrix.h:37