Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
dl_op_receiver.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_DL_OP_RECEIVER_H_
6#define FLUTTER_DISPLAY_LIST_DL_OP_RECEIVER_H_
7
8#include "flutter/display_list/display_list.h"
9#include "flutter/display_list/dl_blend_mode.h"
10#include "flutter/display_list/dl_canvas.h"
11#include "flutter/display_list/dl_paint.h"
12#include "flutter/display_list/dl_sampling_options.h"
13#include "flutter/display_list/dl_vertices.h"
14#include "flutter/display_list/effects/dl_color_filter.h"
15#include "flutter/display_list/effects/dl_color_source.h"
16#include "flutter/display_list/effects/dl_image_filter.h"
17#include "flutter/display_list/effects/dl_mask_filter.h"
18#include "flutter/display_list/effects/dl_path_effect.h"
19#include "flutter/display_list/image/dl_image.h"
20
21#include "flutter/impeller/geometry/path.h"
22
23namespace flutter {
24
25class DisplayList;
26
27//------------------------------------------------------------------------------
28/// @brief Internal API for rendering recorded display lists to backends.
29///
30/// The |DisplayList| object will play back recorded operations in this format.
31/// Most developers should not need to deal with this interface unless they are
32/// writing a utility that needs to examine the contents of a display list.
33///
34/// Similar to |DlCanvas|, this interface carries clip and transform state
35/// which are saved and restored by the |save|, |saveLayer|, and |restore|
36/// calls.
37///
38/// Unlike DlCanvas, this interface has attribute state which is global across
39/// an entire DisplayList (not affected by save/restore).
40///
41/// DISPLAYLIST DEPTH TRACKING
42///
43/// Each rendering call in the DisplayList stream is assumed to have a "depth"
44/// value relative to the beginning of its DisplayList. The depth value is
45/// implicitly allocated during recording and only reported in 2 places so
46/// it is important for a dispatcher to perform the same internal allocations
47/// if it is to make sense of the information reported by the save/saveLayer
48/// calls. This depth value is maintained as follows:
49///
50/// - The absolute depth value is never reported, only the total depth
51/// size of the entire DisplayList or one of its save/restore pairs
52/// is reported. Since the DisplayList might be dispatched recursively
53/// due to embedded drawDisplayList calls, these depth size values
54/// will often be relative to things like:
55/// - the start of a given save/saveLayer group
56/// - the start of a DisplayList dispatch or recursion
57/// as such, only totals for groups of DisplayList dispatched calls
58/// will be reported. These totals will be reported in:
59/// - the `DisplayList::total_depth()` method reporting the total
60/// depth accumulated for every operation in the DisplayList
61/// - the save/saveLayer dispatch calls will report the total
62/// depth accumulated for every call until their corresponding
63/// restore call.
64/// - The depth value is incremented for every drawing operation, including:
65/// - all draw* calls (including drawDisplayList)
66/// - drawDisplayList will also accumulate the total_depth() of the
67/// DisplayList object it is drawing (in other words it will skip enough
68/// depth values for each drawing call in the child).
69/// This bump is in addition to the depth value it records for being
70/// a rendering operation. Some implementations may need to surround
71/// the actual drawDisplayList with a protective saveLayer, but others
72/// may not - so the implicit depth value assigned to the drawDisplayList
73/// call itself may go unused, but must be accounted for.
74/// - a saveLayer call will also increment the depth value just like a
75/// rendering call. This is in addition to the depth of its content.
76/// It is doing so to reserve a depth for the drawing operation that
77/// copies its layer back to the parent.
78/// - Each save() or saveLayer() call will report the total depth of all
79/// rendering calls within its content (recorded before the corresponding
80/// restore) and report this total during dispatch. This information might
81/// be needed to assign depths to the clip operations that occur within
82/// its content. As there is no enclosing saveLayer/restore pair around
83/// the root of a DisplayList, the total depth of the DisplayList can
84/// be used to determine the appropriate clip depths for any clip ops
85/// appearing before the first save/saveLayer or after the last restore.
86///
87/// @see DlSkCanvasDispatcher
88/// @see impeller::DlDispatcher
89/// @see DlOpSpy
91 protected:
95
96 public:
97 // MaxDrawPointsCount * sizeof(SkPoint) must be less than 1 << 32
98 static constexpr int kMaxDrawPointsCount = ((1 << 29) - 1);
99
100 // ---------------------------------------------------------------------
101 // The CacheablePath forms of the drawPath, clipPath, and drawShadow
102 // methods are only called if the DlOpReceiver indicates that it prefers
103 // impeller paths by returning true from |PrefersImpellerPaths|.
104 // Note that we pass in both the SkPath and (a place to cache the)
105 // impeller::Path forms of the path since the SkPath version can contain
106 // information about the type of path that lets the receiver optimize
107 // the operation (and potentially avoid the need to cache it).
108 // It is up to the receiver to convert the path to Impeller form and
109 // cache it to avoid needing to do a lot of Impeller-specific processing
110 // inside the DisplayList code.
111
112 virtual bool PrefersImpellerPaths() const { return false; }
113
115 explicit CacheablePath(const SkPath& path) : sk_path(path) {}
116
119
120 bool operator==(const CacheablePath& other) const {
121 return sk_path == other.sk_path;
122 }
123 };
124
125 virtual void clipPath(const CacheablePath& cache,
126 ClipOp clip_op,
127 bool is_aa) {
129 }
130 virtual void drawPath(const CacheablePath& cache) { FML_UNREACHABLE(); }
131 virtual void drawShadow(const CacheablePath& cache,
132 const DlColor color,
133 const SkScalar elevation,
134 bool transparent_occluder,
135 SkScalar dpr) {
137 }
138 // ---------------------------------------------------------------------
139
140 // The following methods are nearly 1:1 with the methods on DlPaint and
141 // carry the same meanings. Each method sets a persistent value for the
142 // attribute for the rest of the display list or until it is reset by
143 // another method that changes the same attribute. The current set of
144 // attributes is not affected by |save| and |restore|.
145 virtual void setAntiAlias(bool aa) = 0;
146 virtual void setDrawStyle(DlDrawStyle style) = 0;
147 virtual void setColor(DlColor color) = 0;
148 virtual void setStrokeWidth(float width) = 0;
149 virtual void setStrokeMiter(float limit) = 0;
150 virtual void setStrokeCap(DlStrokeCap cap) = 0;
151 virtual void setStrokeJoin(DlStrokeJoin join) = 0;
152 virtual void setColorSource(const DlColorSource* source) = 0;
153 virtual void setColorFilter(const DlColorFilter* filter) = 0;
154 // setInvertColors is a quick way to set a ColorFilter that inverts the
155 // rgb values of all rendered colors.
156 // It is not reset by |setColorFilter|, but instead composed with that
157 // filter so that the color inversion happens after the ColorFilter.
158 virtual void setInvertColors(bool invert) = 0;
159 virtual void setBlendMode(DlBlendMode mode) = 0;
160 virtual void setPathEffect(const DlPathEffect* effect) = 0;
161 virtual void setMaskFilter(const DlMaskFilter* filter) = 0;
162 virtual void setImageFilter(const DlImageFilter* filter) = 0;
163
164 // All of the following methods are nearly 1:1 with their counterparts
165 // in |SkCanvas| and have the same behavior and output.
166 virtual void save() = 0;
167 // Optional variant of save() that passes the total depth count of
168 // all rendering operations that occur until the next restore() call.
169 virtual void save(uint32_t total_content_depth) { save(); }
170 // The |options| parameter can specify whether the existing rendering
171 // attributes will be applied to the save layer surface while rendering
172 // it back to the current surface. If the flag is false then this method
173 // is equivalent to |SkCanvas::saveLayer| with a null paint object.
174 //
175 // The |options| parameter can also specify whether the bounds came from
176 // the caller who recorded the operation, or whether they were calculated
177 // by the DisplayListBuilder.
178 //
179 // The |options| parameter may contain other options that indicate some
180 // specific optimizations may be made by the underlying implementation
181 // to avoid creating a temporary layer, these optimization options will
182 // be determined as the |DisplayList| is constructed and should not be
183 // specified in calling a |DisplayListBuilder| as they will be ignored.
184 // The |backdrop| filter, if not null, is used to initialize the new
185 // layer before further rendering happens.
186 virtual void saveLayer(const SkRect& bounds,
188 const DlImageFilter* backdrop = nullptr) = 0;
189 // Optional variant of saveLayer() that passes the total depth count of
190 // all rendering operations that occur until the next restore() call.
191 virtual void saveLayer(const SkRect& bounds,
193 uint32_t total_content_depth,
194 const DlImageFilter* backdrop = nullptr) {
195 saveLayer(bounds, options, backdrop);
196 }
197 virtual void restore() = 0;
198
199 // ---------------------------------------------------------------------
200 // Legacy helper method for older callers that use the null-ness of
201 // the bounds to indicate if they should be recorded or computed.
202 // This method will not be called on a |DlOpReceiver| that is passed
203 // to the |DisplayList::Dispatch()| method, so client receivers should
204 // ignore it for their implementation purposes.
205 //
206 // DlOpReceiver methods are generally meant to ONLY be output from a
207 // previously recorded DisplayList so this method is really only used
208 // from testing methods that bypass the public builder APIs for legacy
209 // convenience or for internal white-box testing of the DisplayList
210 // internals. Such methods should eventually be converted to using the
211 // public DisplayListBuilder/DlCanvas public interfaces where possible,
212 // as tracked in:
213 // https://github.com/flutter/flutter/issues/144070
214 virtual void saveLayer(const SkRect* bounds,
216 const DlImageFilter* backdrop = nullptr) final {
217 if (bounds) {
218 saveLayer(*bounds, options.with_bounds_from_caller(), backdrop);
219 } else {
220 saveLayer(SkRect(), options.without_bounds_from_caller(), backdrop);
221 }
222 }
223 // ---------------------------------------------------------------------
224
225 virtual void translate(SkScalar tx, SkScalar ty) = 0;
226 virtual void scale(SkScalar sx, SkScalar sy) = 0;
227 virtual void rotate(SkScalar degrees) = 0;
228 virtual void skew(SkScalar sx, SkScalar sy) = 0;
229
230 // The transform methods all assume the following math for transforming
231 // an arbitrary 3D homogenous point (x, y, z, w).
232 // All coordinates in the rendering methods (and SkPoint and SkRect objects)
233 // represent a simplified coordinate (x, y, 0, 1).
234 // x' = x * mxx + y * mxy + z * mxz + w * mxt
235 // y' = x * myx + y * myy + z * myz + w * myt
236 // z' = x * mzx + y * mzy + z * mzz + w * mzt
237 // w' = x * mwx + y * mwy + z * mwz + w * mwt
238 // Note that for non-homogenous 2D coordinates, the last column in those
239 // equations is multiplied by 1 and is simply adding a translation and
240 // so is referred to with the final letter "t" here instead of "w".
241 //
242 // In 2D coordinates, z=0 and so the 3rd column always evaluates to 0.
243 //
244 // In non-perspective transforms, the 4th row has identity values
245 // and so w` = w. (i.e. w'=1 for 2d points transformed by a matrix
246 // with identity values in the last row).
247 //
248 // In affine 2D transforms, the 3rd and 4th row and 3rd column are all
249 // identity values and so z` = z (which is 0 for 2D coordinates) and
250 // the x` and y` equations don't see a contribution from a z coordinate
251 // and the w' ends up being the same as the w from the source coordinate
252 // (which is 1 for a 2D coordinate).
253 //
254 // Here is the math for transforming a 2D source coordinate and
255 // looking for the destination 2D coordinate (for a surface that
256 // does not have a Z buffer or track the Z coordinates in any way)
257 // Source coordinate = (x, y, 0, 1)
258 // x' = x * mxx + y * mxy + 0 * mxz + 1 * mxt
259 // y' = x * myx + y * myy + 0 * myz + 1 * myt
260 // z' = x * mzx + y * mzy + 0 * mzz + 1 * mzt
261 // w' = x * mwx + y * mwy + 0 * mwz + 1 * mwt
262 // Destination coordinate does not need z', so this reduces to:
263 // x' = x * mxx + y * mxy + mxt
264 // y' = x * myx + y * myy + myt
265 // w' = x * mwx + y * mwy + mwt
266 // Destination coordinate is (x' / w', y' / w', 0, 1)
267 // Note that these are the matrix values in SkMatrix which means that
268 // an SkMatrix contains enough data to transform a 2D source coordinate
269 // and place it on a 2D surface, but is otherwise not enough to continue
270 // concatenating with further matrices as its missing elements will not
271 // be able to model the interplay between the rows and columns that
272 // happens during a full 4x4 by 4x4 matrix multiplication.
273 //
274 // If the transform doesn't have any perspective parts (the last
275 // row is identity - 0, 0, 0, 1), then this further simplifies to:
276 // x' = x * mxx + y * mxy + mxt
277 // y' = x * myx + y * myy + myt
278 // w' = x * 0 + y * 0 + 1 = 1
279 //
280 // In short, while the full 4x4 set of matrix entries needs to be
281 // maintained for accumulating transform mutations accurately, the
282 // actual end work of transforming a single 2D coordinate (or, in
283 // the case of bounds transformations, 4 of them) can be accomplished
284 // with the 9 values from transform3x3 or SkMatrix.
285 //
286 // The only need for the w value here is for homogenous coordinates
287 // which only come up if the perspective elements (the 4th row) of
288 // a transform are non-identity. Otherwise the w always ends up
289 // being 1 in all calculations. If the matrix has perspecitve elements
290 // then the final transformed coordinates will have a w that is not 1
291 // and the actual coordinates are determined by dividing out that w
292 // factor resulting in a real-world point expressed as (x, y, z, 1).
293 //
294 // Because of the predominance of 2D affine transforms the
295 // 2x3 subset of the 4x4 transform matrix is special cased with
296 // its own dispatch method that omits the last 2 rows and the 3rd
297 // column. Even though a 3x3 subset is enough for transforming
298 // leaf coordinates as shown above, no method is provided for
299 // representing a 3x3 transform in the DisplayList since if there
300 // is perspective involved then a full 4x4 matrix should be provided
301 // for accurate concatenations. Providing a 3x3 method or record
302 // in the stream would encourage developers to prematurely subset
303 // a full perspective matrix.
304
305 // clang-format off
306
307 // |transform2DAffine| is equivalent to concatenating the internal
308 // 4x4 transform with the following row major transform matrix:
309 // [ mxx mxy 0 mxt ]
310 // [ myx myy 0 myt ]
311 // [ 0 0 1 0 ]
312 // [ 0 0 0 1 ]
313 virtual void transform2DAffine(SkScalar mxx, SkScalar mxy, SkScalar mxt,
314 SkScalar myx, SkScalar myy, SkScalar myt) = 0;
315 // |transformFullPerspective| is equivalent to concatenating the internal
316 // 4x4 transform with the following row major transform matrix:
317 // [ mxx mxy mxz mxt ]
318 // [ myx myy myz myt ]
319 // [ mzx mzy mzz mzt ]
320 // [ mwx mwy mwz mwt ]
322 SkScalar mxx, SkScalar mxy, SkScalar mxz, SkScalar mxt,
323 SkScalar myx, SkScalar myy, SkScalar myz, SkScalar myt,
324 SkScalar mzx, SkScalar mzy, SkScalar mzz, SkScalar mzt,
325 SkScalar mwx, SkScalar mwy, SkScalar mwz, SkScalar mwt) = 0;
326 // clang-format on
327
328 // Clears the transformation stack.
329 virtual void transformReset() = 0;
330
331 virtual void clipRect(const SkRect& rect, ClipOp clip_op, bool is_aa) = 0;
332 virtual void clipRRect(const SkRRect& rrect, ClipOp clip_op, bool is_aa) = 0;
333 virtual void clipPath(const SkPath& path, ClipOp clip_op, bool is_aa) = 0;
334
335 // The following rendering methods all take their rendering attributes
336 // from the last value set by the attribute methods above (regardless
337 // of any |save| or |restore| operations which do not affect attributes).
338 // In cases where a paint object may have been optional in the SkCanvas
339 // method, the methods here will generally offer a boolean parameter
340 // which specifies whether to honor the attributes of the display list
341 // stream, or assume default attributes.
343 virtual void drawPaint() = 0;
344 virtual void drawLine(const SkPoint& p0, const SkPoint& p1) = 0;
345 virtual void drawRect(const SkRect& rect) = 0;
346 virtual void drawOval(const SkRect& bounds) = 0;
347 virtual void drawCircle(const SkPoint& center, SkScalar radius) = 0;
348 virtual void drawRRect(const SkRRect& rrect) = 0;
349 virtual void drawDRRect(const SkRRect& outer, const SkRRect& inner) = 0;
350 virtual void drawPath(const SkPath& path) = 0;
351 virtual void drawArc(const SkRect& oval_bounds,
352 SkScalar start_degrees,
353 SkScalar sweep_degrees,
354 bool use_center) = 0;
356 uint32_t count,
357 const SkPoint points[]) = 0;
358 virtual void drawVertices(const DlVertices* vertices, DlBlendMode mode) = 0;
359 virtual void drawImage(const sk_sp<DlImage> image,
360 const SkPoint point,
361 DlImageSampling sampling,
362 bool render_with_attributes) = 0;
363 virtual void drawImageRect(
364 const sk_sp<DlImage> image,
365 const SkRect& src,
366 const SkRect& dst,
367 DlImageSampling sampling,
368 bool render_with_attributes,
369 SrcRectConstraint constraint = SrcRectConstraint::kFast) = 0;
371 const SkIRect& center,
372 const SkRect& dst,
373 DlFilterMode filter,
374 bool render_with_attributes) = 0;
375 virtual void drawAtlas(const sk_sp<DlImage> atlas,
376 const SkRSXform xform[],
377 const SkRect tex[],
378 const DlColor colors[],
379 int count,
381 DlImageSampling sampling,
382 const SkRect* cull_rect,
383 bool render_with_attributes) = 0;
384 virtual void drawDisplayList(const sk_sp<DisplayList> display_list,
385 SkScalar opacity = SK_Scalar1) = 0;
386 virtual void drawTextBlob(const sk_sp<SkTextBlob> blob,
387 SkScalar x,
388 SkScalar y) = 0;
389 virtual void drawTextFrame(
390 const std::shared_ptr<impeller::TextFrame>& text_frame,
391 SkScalar x,
392 SkScalar y) = 0;
393 virtual void drawShadow(const SkPath& path,
394 const DlColor color,
395 const SkScalar elevation,
396 bool transparent_occluder,
397 SkScalar dpr) = 0;
398};
399
400} // namespace flutter
401
402#endif // FLUTTER_DISPLAY_LIST_DL_OP_RECEIVER_H_
const char * options
int count
static const int points[]
SkColor4f color
#define SK_Scalar1
Definition SkScalar.h:18
static SkScalar center(float pos0, float pos1)
Internal API for rendering recorded display lists to backends.
virtual void drawImageRect(const sk_sp< DlImage > image, const SkRect &src, const SkRect &dst, DlImageSampling sampling, bool render_with_attributes, SrcRectConstraint constraint=SrcRectConstraint::kFast)=0
virtual void save()=0
virtual void drawArc(const SkRect &oval_bounds, SkScalar start_degrees, SkScalar sweep_degrees, bool use_center)=0
virtual void save(uint32_t total_content_depth)
virtual void saveLayer(const SkRect &bounds, const SaveLayerOptions options, const DlImageFilter *backdrop=nullptr)=0
virtual void drawRect(const SkRect &rect)=0
virtual void saveLayer(const SkRect &bounds, const SaveLayerOptions &options, uint32_t total_content_depth, const DlImageFilter *backdrop=nullptr)
virtual void setStrokeMiter(float limit)=0
virtual void clipRect(const SkRect &rect, ClipOp clip_op, bool is_aa)=0
virtual void transformReset()=0
virtual void drawShadow(const SkPath &path, const DlColor color, const SkScalar elevation, bool transparent_occluder, SkScalar dpr)=0
virtual void drawImage(const sk_sp< DlImage > image, const SkPoint point, DlImageSampling sampling, bool render_with_attributes)=0
virtual void drawCircle(const SkPoint &center, SkScalar radius)=0
virtual void drawVertices(const DlVertices *vertices, DlBlendMode mode)=0
virtual void clipPath(const SkPath &path, ClipOp clip_op, bool is_aa)=0
virtual void restore()=0
virtual void drawPath(const CacheablePath &cache)
virtual void drawPoints(PointMode mode, uint32_t count, const SkPoint points[])=0
virtual void skew(SkScalar sx, SkScalar sy)=0
virtual void drawOval(const SkRect &bounds)=0
virtual void drawRRect(const SkRRect &rrect)=0
virtual void drawDisplayList(const sk_sp< DisplayList > display_list, SkScalar opacity=SK_Scalar1)=0
virtual void setStrokeWidth(float width)=0
virtual void setMaskFilter(const DlMaskFilter *filter)=0
virtual void drawDRRect(const SkRRect &outer, const SkRRect &inner)=0
virtual void setColorFilter(const DlColorFilter *filter)=0
virtual void saveLayer(const SkRect *bounds, const SaveLayerOptions options, const DlImageFilter *backdrop=nullptr) final
virtual void drawImageNine(const sk_sp< DlImage > image, const SkIRect &center, const SkRect &dst, DlFilterMode filter, bool render_with_attributes)=0
virtual void setAntiAlias(bool aa)=0
static constexpr int kMaxDrawPointsCount
virtual void clipRRect(const SkRRect &rrect, ClipOp clip_op, bool is_aa)=0
virtual void drawPath(const SkPath &path)=0
virtual void drawTextFrame(const std::shared_ptr< impeller::TextFrame > &text_frame, SkScalar x, SkScalar y)=0
virtual void drawColor(DlColor color, DlBlendMode mode)=0
virtual void drawAtlas(const sk_sp< DlImage > atlas, const SkRSXform xform[], const SkRect tex[], const DlColor colors[], int count, DlBlendMode mode, DlImageSampling sampling, const SkRect *cull_rect, bool render_with_attributes)=0
virtual void transform2DAffine(SkScalar mxx, SkScalar mxy, SkScalar mxt, SkScalar myx, SkScalar myy, SkScalar myt)=0
virtual void translate(SkScalar tx, SkScalar ty)=0
virtual void clipPath(const CacheablePath &cache, ClipOp clip_op, bool is_aa)
virtual void scale(SkScalar sx, SkScalar sy)=0
virtual void setStrokeJoin(DlStrokeJoin join)=0
virtual void drawShadow(const CacheablePath &cache, const DlColor color, const SkScalar elevation, bool transparent_occluder, SkScalar dpr)
virtual void drawLine(const SkPoint &p0, const SkPoint &p1)=0
virtual void setImageFilter(const DlImageFilter *filter)=0
virtual void setColorSource(const DlColorSource *source)=0
virtual void rotate(SkScalar degrees)=0
virtual void drawPaint()=0
virtual bool PrefersImpellerPaths() const
virtual void setDrawStyle(DlDrawStyle style)=0
virtual void drawTextBlob(const sk_sp< SkTextBlob > blob, SkScalar x, SkScalar y)=0
virtual void setPathEffect(const DlPathEffect *effect)=0
virtual void setBlendMode(DlBlendMode mode)=0
virtual void transformFullPerspective(SkScalar mxx, SkScalar mxy, SkScalar mxz, SkScalar mxt, SkScalar myx, SkScalar myy, SkScalar myz, SkScalar myt, SkScalar mzx, SkScalar mzy, SkScalar mzz, SkScalar mzt, SkScalar mwx, SkScalar mwy, SkScalar mwz, SkScalar mwt)=0
virtual void setColor(DlColor color)=0
virtual void setInvertColors(bool invert)=0
virtual void setStrokeCap(DlStrokeCap cap)=0
Holds all of the data (both required and optional) for a DisplayList drawVertices call.
Definition dl_vertices.h:71
Paths are lightweight objects that describe a collection of linear, quadratic, or cubic segments....
Definition path.h:51
sk_sp< SkImage > image
Definition examples.cpp:29
SkBitmap source
Definition examples.cpp:28
float SkScalar
Definition extension.cpp:12
gboolean invert
#define FML_UNREACHABLE()
Definition logging.h:109
double y
double x
DlStrokeJoin
Definition dl_paint.h:38
DlStrokeCap
Definition dl_paint.h:29
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 to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace Enable an endless trace buffer The default is a ring buffer This is useful when very old events need to viewed For during application launch Memory usage will continue to grow indefinitely however Start app with an specific route defined on the framework flutter assets Path to the Flutter assets directory enable service port Allow the VM service to fallback to automatic port selection if binding to a specified port fails trace Trace early application lifecycle Automatically switches to an endless trace buffer trace skia Filters out all Skia trace event categories except those that are specified in this comma separated list dump skp on shader Automatically dump the skp that triggers new shader compilations This is useful for writing custom ShaderWarmUp to reduce jank By this is not enabled to reduce the overhead purge persistent cache
Definition switches.h:191
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 switches.h:57
DlDrawStyle
Definition dl_paint.h:20
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive mode
Definition switches.h:228
int32_t width
bool operator==(const CacheablePath &other) const