Flutter Engine Uber Docs
Docs for the entire Flutter Engine repo.
 
Loading...
Searching...
No Matches
embedded_views.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_FLOW_EMBEDDED_VIEWS_H_
6#define FLUTTER_FLOW_EMBEDDED_VIEWS_H_
7
8#include <memory>
9#include <utility>
10#include <variant>
11#include <vector>
12
20
21#if IMPELLER_SUPPORTS_RENDERING
23#include "flutter/impeller/renderer/context.h" // nogncheck
24#else // IMPELLER_SUPPORTS_RENDERING
25namespace impeller {
26class Context;
27class AiksContext;
28} // namespace impeller
29#endif // !IMPELLER_SUPPORTS_RENDERING
30
31class GrDirectContext;
32
33namespace flutter {
34
48
49// Represents an image filter mutation.
50//
51// Should be used for image_filter_layer and backdrop_filter_layer.
53 public:
54 ImageFilterMutation(std::shared_ptr<DlImageFilter> filter,
55 const DlRect& filter_rect)
56 : filter_(std::move(filter)), filter_rect_(filter_rect) {}
57
58 const DlImageFilter& GetFilter() const { return *filter_; }
59 const DlRect& GetFilterRect() const { return filter_rect_; }
60
61 bool operator==(const ImageFilterMutation& other) const {
62 return *filter_ == *other.filter_ && filter_rect_ == other.filter_rect_;
63 }
64
65 private:
66 std::shared_ptr<DlImageFilter> filter_;
67 const DlRect filter_rect_;
68};
69
72 explicit BackdropClipRect(const DlRect& r) : rect(r) {}
73
74 bool operator==(const BackdropClipRect& other) const {
75 return rect == other.rect;
76 }
77};
78
81 explicit BackdropClipRRect(const DlRoundRect& r) : rrect(r) {}
82
83 bool operator==(const BackdropClipRRect& other) const {
84 return rrect == other.rrect;
85 }
86};
87
91
92 bool operator==(const BackdropClipRSuperellipse& other) const {
93 return rse == other.rse;
94 }
95};
96
99 explicit BackdropClipPath(const DlPath& r) : path(r) {}
100
101 bool operator==(const BackdropClipPath& other) const {
102 return path == other.path;
103 }
104};
105
106// Stores mutation information like clipping or kTransform.
107//
108// The `type` indicates the type of the mutation: kClipRect, kTransform and etc.
109// Each `type` is paired with an object that supports the mutation. For example,
110// if the `type` is kClipRect, `rect()` is used the represent the rect to be
111// clipped. One mutation object must only contain one type of mutation.
112class Mutator {
113 public:
114 Mutator(const Mutator& other) : data_(other.data_) {}
115
116 explicit Mutator(const DlRect& rect) : data_(rect) {}
117 explicit Mutator(const DlRoundRect& rrect) : data_(rrect) {}
118 explicit Mutator(const DlRoundSuperellipse& rrect) : data_(rrect) {}
119 explicit Mutator(const DlPath& path) : data_(path) {}
120 explicit Mutator(const DlMatrix& matrix) : data_(matrix) {}
121 explicit Mutator(const uint8_t& alpha) : data_(alpha) {}
122 explicit Mutator(const std::shared_ptr<DlImageFilter>& filter,
123 const DlRect& filter_rect)
124 : data_(ImageFilterMutation(filter, filter_rect)) {}
125
126 explicit Mutator(const BackdropClipRect& backdrop_rect)
127 : data_(backdrop_rect) {}
128 explicit Mutator(const BackdropClipRRect& backdrop_rrect)
129 : data_(backdrop_rrect) {}
130 explicit Mutator(const BackdropClipRSuperellipse& backdrop_rse)
131 : data_(backdrop_rse) {}
132 explicit Mutator(const BackdropClipPath& backdrop_path)
133 : data_(backdrop_path) {}
134
136 return static_cast<MutatorType>(data_.index());
137 }
138
139 const DlRect& GetRect() const { return std::get<DlRect>(data_); }
140 const DlRoundRect& GetRRect() const { return std::get<DlRoundRect>(data_); }
142 return std::get<DlRoundSuperellipse>(data_);
143 }
146 }
147 const DlPath& GetPath() const { return std::get<DlPath>(data_); }
148 const DlMatrix& GetMatrix() const { return std::get<DlMatrix>(data_); }
150 return std::get<ImageFilterMutation>(data_);
151 }
153 return std::get<BackdropClipRect>(data_);
154 }
156 return std::get<BackdropClipRRect>(data_);
157 }
159 return std::get<BackdropClipRSuperellipse>(data_);
160 }
162 return std::get<BackdropClipPath>(data_);
163 }
164 const uint8_t& GetAlpha() const { return std::get<uint8_t>(data_); }
165 float GetAlphaFloat() const { return DlColor::toOpacity(GetAlpha()); }
166
167 bool operator==(const Mutator& other) const { return data_ == other.data_; }
168
186
187 private:
188 std::variant<DlRect,
191 DlPath,
192 DlMatrix,
193 uint8_t,
199 data_;
200}; // Mutator
201
202// A stack of mutators that can be applied to an embedded platform view.
203//
204// The stack may include mutators like transforms and clips, each mutator
205// applies to all the mutators that are below it in the stack and to the
206// embedded view.
207//
208// For example consider the following stack: [T1, T2, T3], where T1 is the top
209// of the stack and T3 is the bottom of the stack. Applying this mutators stack
210// to a platform view P1 will result in T1(T2(T3(P1))).
212 public:
213 MutatorsStack() = default;
214
215 void PushClipRect(const DlRect& rect);
216 void PushClipRRect(const DlRoundRect& rrect);
217 void PushClipRSE(const DlRoundSuperellipse& rrect);
218 void PushClipPath(const DlPath& path);
219 void PushTransform(const DlMatrix& matrix);
220 void PushOpacity(const uint8_t& alpha);
221 // `filter_rect` is in global coordinates.
222 void PushBackdropFilter(const std::shared_ptr<DlImageFilter>& filter,
223 const DlRect& filter_rect);
224 void PushPlatformViewClipRect(const DlRect& rect);
225 void PushPlatformViewClipRRect(const DlRoundRect& rrect);
228
229 // Removes the `Mutator` on the top of the stack
230 // and destroys it.
231 void Pop();
232
233 void PopTo(size_t stack_count);
234
235 // Returns a reverse iterator pointing to the top of the stack, which is the
236 // mutator that is furtherest from the leaf node.
237 const std::vector<std::shared_ptr<Mutator>>::const_reverse_iterator Top()
238 const;
239 // Returns a reverse iterator pointing to the bottom of the stack, which is
240 // the mutator that is closeset from the leaf node.
241 const std::vector<std::shared_ptr<Mutator>>::const_reverse_iterator Bottom()
242 const;
243
244 // Returns an iterator pointing to the beginning of the mutator vector, which
245 // is the mutator that is furtherest from the leaf node.
246 const std::vector<std::shared_ptr<Mutator>>::const_iterator Begin() const;
247
248 // Returns an iterator pointing to the end of the mutator vector, which is the
249 // mutator that is closest from the leaf node.
250 const std::vector<std::shared_ptr<Mutator>>::const_iterator End() const;
251
252 bool is_empty() const { return vector_.empty(); }
253 size_t stack_count() const { return vector_.size(); }
254
255 bool operator==(const MutatorsStack& other) const {
256 if (vector_.size() != other.vector_.size()) {
257 return false;
258 }
259 for (size_t i = 0; i < vector_.size(); i++) {
260 if (*vector_[i] != *other.vector_[i]) {
261 return false;
262 }
263 }
264 return true;
265 }
266
267 bool operator==(const std::vector<Mutator>& other) const {
268 if (vector_.size() != other.size()) {
269 return false;
270 }
271 for (size_t i = 0; i < vector_.size(); i++) {
272 if (*vector_[i] != other[i]) {
273 return false;
274 }
275 }
276 return true;
277 }
278
279 bool operator!=(const MutatorsStack& other) const {
280 return !operator==(other);
281 }
282
283 bool operator!=(const std::vector<Mutator>& other) const {
284 return !operator==(other);
285 }
286
287 private:
288 std::vector<std::shared_ptr<Mutator>> vector_;
289}; // MutatorsStack
290
292 public:
294
296 DlSize size_points,
297 MutatorsStack mutators_stack)
298 : matrix_(matrix),
299 size_points_(size_points),
300 mutators_stack_(std::move(mutators_stack)) {
301 final_bounding_rect_ =
302 DlRect::MakeSize(size_points).TransformAndClipBounds(matrix);
303 }
304
305 // The transformation Matrix corresponding to the sum of all the
306 // transformations in the platform view's mutator stack.
307 const DlMatrix& transformMatrix() const { return matrix_; };
308 // The original size of the platform view before any mutation matrix is
309 // applied.
310 const DlSize& sizePoints() const { return size_points_; };
311 // The mutators stack contains the detailed step by step mutations for this
312 // platform view.
313 const MutatorsStack& mutatorsStack() const { return mutators_stack_; };
314 // The bounding rect of the platform view after applying all the mutations.
315 //
316 // Clippings are ignored.
317 const DlRect& finalBoundingRect() const { return final_bounding_rect_; }
318
319 // Pushes the stored DlImageFilter object to the mutators stack.
320 //
321 // `filter_rect` is in global coordinates.
322 void PushImageFilter(const std::shared_ptr<DlImageFilter>& filter,
323 const DlRect& filter_rect) {
324 mutators_stack_.PushBackdropFilter(filter, filter_rect);
325 }
326
327 void PushPlatformViewClipRect(const DlRect& clip_rect) {
328 mutators_stack_.PushPlatformViewClipRect(clip_rect);
329 }
330
331 void PushPlatformViewClipRRect(const DlRoundRect& clip_rrect) {
332 mutators_stack_.PushPlatformViewClipRRect(clip_rrect);
333 }
334
336 mutators_stack_.PushPlatformViewClipRSuperellipse(clip_rse);
337 }
338
339 void PushPlatformViewClipPath(const DlPath& clip_path) {
340 mutators_stack_.PushPlatformViewClipPath(clip_path);
341 }
342
343 bool operator==(const EmbeddedViewParams& other) const {
344 return size_points_ == other.size_points_ &&
345 mutators_stack_ == other.mutators_stack_ &&
346 final_bounding_rect_ == other.final_bounding_rect_ &&
347 matrix_ == other.matrix_;
348 }
349
350 private:
351 DlMatrix matrix_;
352 DlSize size_points_;
353 MutatorsStack mutators_stack_;
354 DlRect final_bounding_rect_;
355};
356
358 // Frame has successfully rasterized.
359 kSuccess,
360 // Frame is submitted twice. This is currently only used when
361 // thread configuration change occurs.
363 // Frame is dropped and a new frame with the same layer tree is
364 // attempted. This is currently only used when thread configuration
365 // change occurs.
367};
368
369// The |EmbedderViewSlice| represents the details of recording all of
370// the layer tree rendering operations that appear before, after
371// and between the embedded views.
373 public:
374 virtual ~EmbedderViewSlice() = default;
375 virtual DlCanvas* canvas() = 0;
376 virtual void end_recording() = 0;
377 virtual const DlRegion& getRegion() const = 0;
378 DlRegion region(const DlRect& query) const {
379 DlRegion rquery = DlRegion(DlIRect::RoundOut(query));
380 return DlRegion::MakeIntersection(getRegion(), rquery);
381 }
382
383 virtual void render_into(DlCanvas* canvas) = 0;
384};
385
387 public:
388 explicit DisplayListEmbedderViewSlice(DlRect view_bounds);
389 ~DisplayListEmbedderViewSlice() override = default;
390
391 DlCanvas* canvas() override;
392 void end_recording() override;
393 const DlRegion& getRegion() const override;
394
395 void render_into(DlCanvas* canvas) override;
396 void dispatch(DlOpReceiver& receiver);
397 bool is_empty();
398 bool recording_ended();
399
400 private:
401 std::unique_ptr<DisplayListBuilder> builder_;
402 sk_sp<DisplayList> display_list_;
403};
404
405// Facilitates embedding of platform views within the flow layer tree.
406//
407// Used on iOS, Android (hybrid composite mode), and on embedded platforms
408// that provide a system compositor as part of the project arguments.
409//
410// There are two kinds of "view IDs" in the context of ExternalViewEmbedder, and
411// specific names are used to avoid ambiguation:
412//
413// * ExternalViewEmbedder composites a stack of layers. Each layer's content
414// might be from Flutter widgets, or a platform view, which displays platform
415// native components. Each platform view is labeled by a view ID, which
416// corresponds to the ID from `PlatformViewsRegistry.getNextPlatformViewId`
417// from the framework. In the context of `ExternalViewEmbedder`, this ID is
418// called platform_view_id.
419// * The layers are compositied into a single rectangular surface, displayed by
420// taking up an entire native window or part of a window. Each such surface
421// is labeled by a view ID, which corresponds to `FlutterView.viewID` from
422// dart:ui. In the context of `ExternalViewEmbedder`, this ID is called
423// flutter_view_id.
424//
425// The lifecycle of drawing a frame using ExternalViewEmbedder is:
426//
427// 1. At the start of a frame, call |BeginFrame|, then |SetUsedThisFrame| to
428// true.
429// 2. For each view to be drawn, call |PrepareFlutterView|, then
430// |SubmitFlutterView|.
431// 3. At the end of a frame, if |GetUsedThisFrame| is true, call |EndFrame|.
433 // TODO(cyanglaz): Make embedder own the `EmbeddedViewParams`.
434
435 public:
437
438 virtual ~ExternalViewEmbedder() = default;
439
440 // Deallocate the resources for displaying a view.
441 //
442 // This method must be called when a view is removed from the engine.
443 //
444 // When the ExternalViewEmbedder is requested to draw an unrecognized view, it
445 // implicitly allocates necessary resources. These resources must be
446 // explicitly deallocated.
447 virtual void CollectView(int64_t view_id);
448
449 // Usually, the root canvas is not owned by the view embedder. However, if
450 // the view embedder wants to provide a canvas to the rasterizer, it may
451 // return one here. This canvas takes priority over the canvas materialized
452 // from the on-screen render target.
453 virtual DlCanvas* GetRootCanvas() = 0;
454
455 // Call this in-lieu of |SubmitFlutterView| to clear pre-roll state and
456 // sets the stage for the next pre-roll.
457 virtual void CancelFrame() = 0;
458
459 // Indicates the beginning of a frame.
460 //
461 // The `raster_thread_merger` will be null if |SupportsDynamicThreadMerging|
462 // returns false.
463 virtual void BeginFrame(
464 GrDirectContext* context,
465 const fml::RefPtr<fml::RasterThreadMerger>& raster_thread_merger) = 0;
466
468 int64_t platform_view_id,
469 std::unique_ptr<EmbeddedViewParams> params) = 0;
470
471 // This needs to get called after |Preroll| finishes on the layer tree.
472 // Returns kResubmitFrame if the frame needs to be processed again, this is
473 // after it does any requisite tasks needed to bring itself to a valid state.
474 // Returns kSuccess if the view embedder is already in a valid state.
479
480 // Must be called on the UI thread.
481 virtual DlCanvas* CompositeEmbeddedView(int64_t platform_view_id) = 0;
482
483 // Prepare for a view to be drawn.
484 virtual void PrepareFlutterView(DlISize frame_size,
485 double device_pixel_ratio) = 0;
486
487 // Submits the content stored since |PrepareFlutterView| to the specified
488 // Flutter view.
489 //
490 // Implementers must submit the frame by calling frame.Submit().
491 //
492 // This method can mutate the root canvas before submitting the frame.
493 //
494 // It can also allocate frames for overlay surfaces to compose hybrid views.
495 virtual void SubmitFlutterView(
496 int64_t flutter_view_id,
497 GrDirectContext* context,
498 const std::shared_ptr<impeller::AiksContext>& aiks_context,
499 std::unique_ptr<SurfaceFrame> frame);
500
501 // This method provides the embedder a way to do additional tasks after
502 // |SubmitFrame|. For example, merge task runners if `should_resubmit_frame`
503 // is true.
504 //
505 // For example on the iOS embedder, threads are merged in this call.
506 // A new frame on the platform thread starts immediately. If the GPU thread
507 // still has some task running, there could be two frames being rendered
508 // concurrently, which causes undefined behaviors.
509 //
510 // The `raster_thread_merger` will be null if |SupportsDynamicThreadMerging|
511 // returns false.
512 virtual void EndFrame(
513 bool should_resubmit_frame,
514 const fml::RefPtr<fml::RasterThreadMerger>& raster_thread_merger) {}
515
516 // Whether the embedder should support dynamic thread merging.
517 //
518 // Returning `true` results a |RasterThreadMerger| instance to be created.
519 // * See also |BegineFrame| and |EndFrame| for getting the
520 // |RasterThreadMerger| instance.
521 virtual bool SupportsDynamicThreadMerging();
522
523 // Called when the rasterizer is being torn down.
524 // This method provides a way to release resources associated with the current
525 // embedder.
526 virtual void Teardown();
527
528 // Change the flag about whether it is used in this frame, it will be set to
529 // true when 'BeginFrame' and false when 'EndFrame'.
530 void SetUsedThisFrame(bool used_this_frame) {
531 used_this_frame_ = used_this_frame;
532 }
533
534 // Whether it is used in this frame, returns true between 'BeginFrame' and
535 // 'EndFrame', otherwise returns false.
536 bool GetUsedThisFrame() const { return used_this_frame_; }
537
538 // Pushes the platform view id of a visited platform view to a list of
539 // visited platform views.
540 virtual void PushVisitedPlatformView(int64_t platform_view_id) {}
541
542 // Pushes a DlImageFilter object to each platform view within a list of
543 // visited platform views.
544 //
545 // `filter_rect` is in global coordinates.
546 //
547 // See also: |PushVisitedPlatformView| for pushing platform view ids to the
548 // visited platform views list.
550 const std::shared_ptr<DlImageFilter>& filter,
551 const DlRect& filter_rect) {}
552
553 virtual void PushClipRectToVisitedPlatformViews(const DlRect& clip_rect) {}
555 const DlRoundRect& clip_rrect) {}
558 virtual void PushClipPathToVisitedPlatformViews(const DlPath& clip_path) {}
559
560 private:
561 bool used_this_frame_ = false;
562
564
565}; // ExternalViewEmbedder
566
567} // namespace flutter
568
569#endif // FLUTTER_FLOW_EMBEDDED_VIEWS_H_
void dispatch(DlOpReceiver &receiver)
~DisplayListEmbedderViewSlice() override=default
const DlRegion & getRegion() const override
void render_into(DlCanvas *canvas) override
Developer-facing API for rendering anything within the engine.
Definition dl_canvas.h:32
Internal API for rendering recorded display lists to backends.
static DlRegion MakeIntersection(const DlRegion &a, const DlRegion &b)
Definition dl_region.cc:496
void PushImageFilter(const std::shared_ptr< DlImageFilter > &filter, const DlRect &filter_rect)
void PushPlatformViewClipRRect(const DlRoundRect &clip_rrect)
void PushPlatformViewClipPath(const DlPath &clip_path)
void PushPlatformViewClipRSuperellipse(const DlRoundSuperellipse &clip_rse)
const DlSize & sizePoints() const
void PushPlatformViewClipRect(const DlRect &clip_rect)
const DlRect & finalBoundingRect() const
EmbeddedViewParams(DlMatrix matrix, DlSize size_points, MutatorsStack mutators_stack)
bool operator==(const EmbeddedViewParams &other) const
const MutatorsStack & mutatorsStack() const
const DlMatrix & transformMatrix() const
DlRegion region(const DlRect &query) const
virtual void render_into(DlCanvas *canvas)=0
virtual DlCanvas * canvas()=0
virtual ~EmbedderViewSlice()=default
virtual void end_recording()=0
virtual const DlRegion & getRegion() const =0
virtual bool SupportsDynamicThreadMerging()
virtual void PrepareFlutterView(DlISize frame_size, double device_pixel_ratio)=0
virtual void EndFrame(bool should_resubmit_frame, const fml::RefPtr< fml::RasterThreadMerger > &raster_thread_merger)
virtual void BeginFrame(GrDirectContext *context, const fml::RefPtr< fml::RasterThreadMerger > &raster_thread_merger)=0
virtual void PrerollCompositeEmbeddedView(int64_t platform_view_id, std::unique_ptr< EmbeddedViewParams > params)=0
virtual void PushVisitedPlatformView(int64_t platform_view_id)
virtual void CollectView(int64_t view_id)
virtual DlCanvas * CompositeEmbeddedView(int64_t platform_view_id)=0
void SetUsedThisFrame(bool used_this_frame)
virtual void PushClipRRectToVisitedPlatformViews(const DlRoundRect &clip_rrect)
virtual void PushClipRectToVisitedPlatformViews(const DlRect &clip_rect)
virtual DlCanvas * GetRootCanvas()=0
virtual void PushClipRSuperellipseToVisitedPlatformViews(const DlRoundSuperellipse &clip_rse)
virtual ~ExternalViewEmbedder()=default
virtual PostPrerollResult PostPrerollAction(const fml::RefPtr< fml::RasterThreadMerger > &raster_thread_merger)
virtual void SubmitFlutterView(int64_t flutter_view_id, GrDirectContext *context, const std::shared_ptr< impeller::AiksContext > &aiks_context, std::unique_ptr< SurfaceFrame > frame)
virtual void CancelFrame()=0
virtual void PushClipPathToVisitedPlatformViews(const DlPath &clip_path)
virtual void PushFilterToVisitedPlatformViews(const std::shared_ptr< DlImageFilter > &filter, const DlRect &filter_rect)
ImageFilterMutation(std::shared_ptr< DlImageFilter > filter, const DlRect &filter_rect)
bool operator==(const ImageFilterMutation &other) const
const DlRect & GetFilterRect() const
const DlImageFilter & GetFilter() const
Mutator(const DlPath &path)
const BackdropClipRRect & GetBackdropClipRRect() const
const DlMatrix & GetMatrix() const
float GetAlphaFloat() const
const BackdropClipRect & GetBackdropClipRect() const
const ImageFilterMutation & GetFilterMutation() const
const uint8_t & GetAlpha() const
Mutator(const DlRoundSuperellipse &rrect)
MutatorType GetType() const
const BackdropClipRSuperellipse & GetBackdropClipRSuperellipse() const
const DlRoundRect GetRSEApproximation() const
const BackdropClipPath & GetBackdropClipPath() const
Mutator(const BackdropClipPath &backdrop_path)
const DlPath & GetPath() const
Mutator(const BackdropClipRRect &backdrop_rrect)
Mutator(const DlRect &rect)
Mutator(const BackdropClipRect &backdrop_rect)
bool operator==(const Mutator &other) const
Mutator(const DlMatrix &matrix)
Mutator(const std::shared_ptr< DlImageFilter > &filter, const DlRect &filter_rect)
Mutator(const DlRoundRect &rrect)
Mutator(const Mutator &other)
Mutator(const BackdropClipRSuperellipse &backdrop_rse)
const DlRoundSuperellipse & GetRSE() const
Mutator(const uint8_t &alpha)
const DlRect & GetRect() const
const DlRoundRect & GetRRect() const
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)
bool operator==(const MutatorsStack &other) const
void PushPlatformViewClipRect(const DlRect &rect)
bool operator==(const std::vector< Mutator > &other) const
const std::vector< std::shared_ptr< Mutator > >::const_reverse_iterator Top() const
bool operator!=(const std::vector< Mutator > &other) const
const std::vector< std::shared_ptr< Mutator > >::const_reverse_iterator Bottom() const
void PushPlatformViewClipRRect(const DlRoundRect &rrect)
void PushPlatformViewClipPath(const DlPath &path)
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)
void PushPlatformViewClipRSuperellipse(const DlRoundSuperellipse &rse)
const std::vector< std::shared_ptr< Mutator > >::const_iterator Begin() const
bool operator!=(const MutatorsStack &other) const
const EmbeddedViewParams * params
G_BEGIN_DECLS FlutterViewId view_id
#define FML_DISALLOW_COPY_AND_ASSIGN(TypeName)
Definition macros.h:27
impeller::RoundRect DlRoundRect
impeller::Matrix DlMatrix
impeller::Rect DlRect
impeller::RoundSuperellipse DlRoundSuperellipse
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
Definition ref_ptr.h:261
BackdropClipPath(const DlPath &r)
bool operator==(const BackdropClipPath &other) const
bool operator==(const BackdropClipRRect &other) const
BackdropClipRRect(const DlRoundRect &r)
bool operator==(const BackdropClipRSuperellipse &other) const
BackdropClipRSuperellipse(const DlRoundSuperellipse &r)
bool operator==(const BackdropClipRect &other) const
BackdropClipRect(const DlRect &r)
static constexpr DlScalar toOpacity(uint8_t alpha)
Definition dl_color.h:65
A 4x4 matrix using column-major storage.
Definition matrix.h:37
RoundRect ToApproximateRoundRect() const
RoundOut(const TRect< U > &r)
Definition rect.h:679
constexpr TRect TransformAndClipBounds(const Matrix &transform) const
Creates a new bounding box that contains this transformed rectangle, clipped against the near clippin...
Definition rect.h:438
static constexpr TRect MakeSize(const TSize< U > &size)
Definition rect.h:150