14#include "flutter/fml/logging.h"
15#include "flutter/fml/trace_event.h"
39#define UNIMPLEMENTED \
40 FML_DLOG(ERROR) << "Unimplemented detail in " << __FUNCTION__;
126 desc.label =
"Nearest Sampler";
131 desc.label =
"Linear Sampler";
137 desc.label =
"Mipmap Linear Sampler";
149 desc.label =
"Nearest Sampler";
153 desc.label =
"Linear Sampler";
246 auto result = std::vector<Color>();
273#ifdef IMPELLER_ENABLE_3D
274 case flutter::DlColorSourceType::kScene:
289 if (!
type.has_value()) {
290 FML_LOG(
ERROR) <<
"Requested ColorSourceType::kUnknown";
295 switch (
type.value()) {
306 source->asLinearGradient();
310 std::vector<Color>
colors;
311 std::vector<float> stops;
318 start_point, end_point, std::move(
colors), std::move(stops),
324 source->asConicalGradient();
331 std::vector<Color>
colors;
332 std::vector<float> stops;
339 center, radius, std::move(
colors), std::move(stops), focus_center,
340 focus_radius, tile_mode,
matrix);
345 source->asRadialGradient();
348 auto radius = radialGradient->
radius();
349 std::vector<Color>
colors;
350 std::vector<float> stops;
357 std::move(stops), tile_mode,
matrix);
362 source->asSweepGradient();
367 auto end_angle =
Degrees(sweepGradient->
end());
368 std::vector<Color>
colors;
369 std::vector<float> stops;
375 center, start_angle, end_angle, std::move(
colors), std::move(stops),
382 image_color_source->
image()->impeller_texture());
383 auto texture = image_color_source->
image()->impeller_texture();
394 source->asRuntimeEffect();
397 auto uniform_data = runtime_effect_color_source->
uniform_data();
398 auto samplers = runtime_effect_color_source->
samplers();
400 std::vector<RuntimeEffectContents::TextureInput> texture_inputs;
402 for (
auto& sampler : samplers) {
403 if (sampler ==
nullptr) {
406 auto*
image = sampler->asImage();
407 if (!sampler->asImage()) {
412 texture_inputs.push_back({
414 .texture =
image->image()->impeller_texture(),
419 runtime_stage, uniform_data, texture_inputs);
423#ifdef IMPELLER_ENABLE_3D
424 const flutter::DlSceneColorSource* scene_color_source =
source->asScene();
425 std::shared_ptr<scene::Node> scene_node =
426 scene_color_source->scene_node();
427 Matrix camera_transform = scene_color_source->camera_matrix();
430 ColorSource::MakeScene(scene_node, camera_transform);
432 FML_LOG(
ERROR) <<
"ColorSourceType::kScene can only be used if Impeller "
442 if (filter ==
nullptr) {
445 switch (filter->
type()) {
447 auto dl_blend = filter->
asBlend();
482 switch (blur_style) {
497 if (filter ==
nullptr) {
501 switch (filter->
type()) {
503 auto blur = filter->
asBlur();
507 .sigma =
Sigma(blur->sigma()),
508 .respect_ctm = blur->respectCTM(),
517 if (filter ==
nullptr) {
521 switch (filter->
type()) {
523 auto blur = filter->
asBlur();
524 auto sigma_x =
Sigma(blur->sigma_x());
525 auto sigma_y =
Sigma(blur->sigma_y());
526 auto tile_mode =
ToTileMode(blur->tile_mode());
533 if (dilate->radius_x() < 0 || dilate->radius_y() < 0) {
536 auto radius_x =
Radius(dilate->radius_x());
537 auto radius_y =
Radius(dilate->radius_y());
541 auto erode = filter->
asErode();
543 if (erode->radius_x() < 0 || erode->radius_y() < 0) {
546 auto radius_x =
Radius(erode->radius_x());
547 auto radius_y =
Radius(erode->radius_y());
551 auto matrix_filter = filter->
asMatrix();
560 auto outer_dl_filter = compose->outer();
561 auto inner_dl_filter = compose->inner();
578 ToColorFilter(color_filter_image_filter->color_filter().get());
591 auto internal_filter = local_matrix_filter->image_filter();
618 uint32_t total_content_depth,
622 auto promise =
options.content_is_clipped()
627 options.can_distribute_opacity());
749const Path& DlDispatcherBase::GetOrCachePath(
const CacheablePath&
cache) {
750 if (
cache.cached_impeller_path.IsEmpty() && !
cache.sk_path.isEmpty()) {
753 return cache.cached_impeller_path;
765 }
else if (
cache.sk_path.isOval(&
rect)) {
809 if (
length > 0.0f && on_length >= 0.0f && off_length > 0.0f) {
814 while (consumed <
length) {
817 Scalar dash_end = consumed + on_length;
827 consumed = dash_end + off_length;
830 Paint stroke_paint = paint_;
882void DlDispatcherBase::SimplifyOrDrawPath(
Canvas& canvas,
883 const CacheablePath&
cache,
889 if (
cache.sk_path.isRect(&
rect, &closed) && closed) {
917 Degrees(sweep_degrees), use_center);
932 auto radius =
paint.stroke_width;
940 for (uint32_t
i = 1;
i <
count;
i += 2) {
949 for (uint32_t
i = 1;
i <
count;
i++) {
970 bool render_with_attributes) {
989 render_with_attributes,
1000 bool render_with_attributes,
1003 std::make_shared<Image>(
image->impeller_texture()),
1006 render_with_attributes ? paint_ :
Paint(),
1016 bool render_with_attributes) {
1019 std::make_shared<Image>(
image->impeller_texture()),
1020 Rect::MakeLTRB(center.fLeft, center.fTop, center.fRight, center.fBottom),
1034 bool render_with_attributes) {
1048 Paint saved_paint = paint_;
1049 Matrix saved_initial_matrix = initial_matrix_;
1086 if (cull_bounds.has_value()) {
1087 Rect cull_rect = cull_bounds.value();
1101 initial_matrix_ = saved_initial_matrix;
1102 paint_ = saved_paint;
1115 const std::shared_ptr<TextFrame>& text_frame,
1128 bool transparent_occluder,
1137 bool transparent_occluder,
1140 spot_color.
alpha *= 0.25;
1151 (2.6f + (-2.66667f + 1.06667f * spot_color.
alpha) * spot_color.
alpha) *
1154 (3.544762f + (-4.891428f + 2.3466f * luminance) * luminance) *
1156 color_alpha =
std::clamp(alpha_adjust * color_alpha, 0.0f, 1.0f);
1161 Scalar color_scale = color_alpha * (1 - greyscale_alpha);
1162 Scalar tonal_alpha = color_scale + greyscale_alpha;
1163 Scalar unpremul_scale = tonal_alpha != 0 ? color_scale / tonal_alpha : 0;
1164 spot_color =
Color(unpremul_scale * spot_color.
red,
1165 unpremul_scale * spot_color.
green,
1166 unpremul_scale * spot_color.
blue, tonal_alpha);
1169 Vector3 light_position(0, -1, 1);
1170 Scalar occluder_z = dpr * elevation;
1172 constexpr Scalar kLightRadius = 800 / 600;
1176 paint.color = spot_color;
1179 .sigma =
Radius{kLightRadius * occluder_z /
1193 TRACE_EVENT0(
"impeller",
"DisplayListDispatcher::EndRecordingAsPicture");
1205Canvas& DlDispatcher::GetCanvas() {
1212 return !
renderer.GetDeviceCapabilities().SupportsFramebufferFetch() &&
1219 bool has_root_backdrop_filter,
1224 has_root_backdrop_filter ||
1228Canvas& ExperimentalDlDispatcher::GetCanvas() {
1235 const Matrix& initial_matrix)
1236 : renderer_(
renderer), matrix_(initial_matrix) {}
1239 stack_.emplace_back(matrix_);
1249 matrix_ = stack_.back();
1258 matrix_ = matrix_.
Scale({sx, sy, 1.0f});
1274 mxx, myx, 0.0f, 0.0f,
1275 mxy, myy, 0.0f, 0.0f,
1276 0.0f, 0.0f, 1.0f, 0.0f,
1277 mxt, myt, 0.0f, 1.0f
1301 const std::shared_ptr<impeller::TextFrame>& text_frame,
1306 properties.
stroke =
true;
1312 if (text_frame->HasColor()) {
1325 [[maybe_unused]]
size_t stack_depth = stack_.size();
static const int points[]
static unsigned clamp(SkFixed fx, int max)
static sk_sp< SkImage > color_filter(const SkImage *image, SkColorFilter *colorFilter)
sk_sp< SkImage > asImage() const
SkVector getSimpleRadii() const
const SkRect & rect() const
const SkRect & bounds() const
bool can_apply_group_opacity() const
uint32_t total_depth() const
void Dispatch(DlOpReceiver &ctx) const
virtual T type() const =0
@ kLines
draw each separate pair of points as a line segment
@ kPolygon
draw each pair of overlapping points as a line segment
@ kPoints
draw each point separately
virtual const DlBlendColorFilter * asBlend() const
virtual const DlMatrixColorFilter * asMatrix() const
SkScalar end_radius() const
SkPoint end_center() const
SkPoint start_center() const
SkScalar start_radius() const
DlTileMode tile_mode() const
DlImageSampling sampling() const
DlTileMode vertical_tile_mode() const
DlTileMode horizontal_tile_mode() const
sk_sp< const DlImage > image() const
virtual const DlLocalMatrixImageFilter * asLocalMatrix() const
virtual const DlColorFilterImageFilter * asColorFilter() const
virtual const DlMatrixImageFilter * asMatrix() const
virtual const DlComposeImageFilter * asCompose() const
virtual const DlBlurImageFilter * asBlur() const
virtual const DlDilateImageFilter * asDilate() const
virtual const DlErodeImageFilter * asErode() const
virtual const DlBlurMaskFilter * asBlur() const
void get_matrix(float matrix[20]) const
const SkMatrix & matrix() const
const std::shared_ptr< std::vector< uint8_t > > uniform_data() const
const sk_sp< DlRuntimeEffect > runtime_effect() const
const std::vector< std::shared_ptr< DlColorSource > > samplers() const
Holds all of the data (both required and optional) for a DisplayList drawVertices call.
void DrawLine(const Point &p0, const Point &p1, const Paint &paint)
const Matrix & GetCurrentTransform() const
void DrawImageRect(const std::shared_ptr< Image > &image, Rect source, Rect dest, const Paint &paint, SamplerDescriptor sampler={}, SourceRectConstraint src_rect_constraint=SourceRectConstraint::kFast)
void DrawVertices(const std::shared_ptr< VerticesGeometry > &vertices, BlendMode blend_mode, const Paint &paint)
void DrawOval(const Rect &rect, const Paint &paint)
void RestoreToCount(size_t count)
void ClipPath(const Path &path, Entity::ClipOperation clip_op=Entity::ClipOperation::kIntersect)
void ClipRRect(const Rect &rect, const Size &corner_radii, Entity::ClipOperation clip_op=Entity::ClipOperation::kIntersect)
size_t GetSaveCount() const
void Transform(const Matrix &transform)
void PreConcat(const Matrix &transform)
virtual void SaveLayer(const Paint &paint, std::optional< Rect > bounds=std::nullopt, const std::shared_ptr< ImageFilter > &backdrop_filter=nullptr, ContentBoundsPromise bounds_promise=ContentBoundsPromise::kUnknown, uint32_t total_content_depth=kMaxDepth, bool can_distribute_opacity=false)
void Rotate(Radians radians)
virtual void DrawTextFrame(const std::shared_ptr< TextFrame > &text_frame, Point position, const Paint &paint)
void DrawPaint(const Paint &paint)
void ClipRect(const Rect &rect, Entity::ClipOperation clip_op=Entity::ClipOperation::kIntersect)
void Skew(Scalar sx, Scalar sy)
void Scale(const Vector2 &scale)
const std::optional< Rect > GetCurrentLocalCullingBounds() const
Picture EndRecordingAsPicture()
void DrawPath(const Path &path, const Paint &paint)
virtual void Save(uint32_t total_content_depth=kMaxDepth)
void DrawPoints(std::vector< Point > points, Scalar radius, const Paint &paint, PointStyle point_style)
void ClipOval(const Rect &bounds, Entity::ClipOperation clip_op=Entity::ClipOperation::kIntersect)
void DrawRect(const Rect &rect, const Paint &paint)
void DrawRRect(const Rect &rect, const Size &corner_radii, const Paint &paint)
void DrawAtlas(const std::shared_ptr< Image > &atlas, std::vector< Matrix > transforms, std::vector< Rect > texture_coordinates, std::vector< Color > colors, BlendMode blend_mode, SamplerDescriptor sampler, std::optional< Rect > cull_rect, const Paint &paint)
void Translate(const Vector3 &offset)
void DrawCircle(const Point ¢er, Scalar radius, const Paint &paint)
static std::shared_ptr< ColorFilter > MakeMatrix(ColorMatrix color_matrix)
static std::shared_ptr< ColorFilter > MakeBlend(BlendMode blend_mode, Color color)
static std::shared_ptr< ColorFilter > MakeLinearToSrgb()
static std::shared_ptr< ColorFilter > MakeSrgbToLinear()
static ColorSource MakeLinearGradient(Point start_point, Point end_point, std::vector< Color > colors, std::vector< Scalar > stops, Entity::TileMode tile_mode, Matrix effect_transform)
static ColorSource MakeColor()
static ColorSource MakeRadialGradient(Point center, Scalar radius, std::vector< Color > colors, std::vector< Scalar > stops, Entity::TileMode tile_mode, Matrix effect_transform)
static ColorSource MakeImage(std::shared_ptr< Texture > texture, Entity::TileMode x_tile_mode, Entity::TileMode y_tile_mode, SamplerDescriptor sampler_descriptor, Matrix effect_transform)
static ColorSource MakeSweepGradient(Point center, Degrees start_angle, Degrees end_angle, std::vector< Color > colors, std::vector< Scalar > stops, Entity::TileMode tile_mode, Matrix effect_transform)
static ColorSource MakeConicalGradient(Point center, Scalar radius, std::vector< Color > colors, std::vector< Scalar > stops, Point focus_center, Scalar focus_radius, Entity::TileMode tile_mode, Matrix effect_transform)
static ColorSource MakeRuntimeEffect(std::shared_ptr< RuntimeStage > runtime_stage, std::shared_ptr< std::vector< uint8_t > > uniform_data, std::vector< RuntimeEffectContents::TextureInput > texture_inputs)
const std::shared_ptr< LazyGlyphAtlas > & GetLazyGlyphAtlas() const
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) override
void drawDashedLine(const DlPoint &p0, const DlPoint &p1, DlScalar on_length, DlScalar off_length) override
void setImageFilter(const flutter::DlImageFilter *filter) override
void drawVertices(const flutter::DlVertices *vertices, flutter::DlBlendMode dl_mode) override
void drawTextFrame(const std::shared_ptr< impeller::TextFrame > &text_frame, SkScalar x, SkScalar y) override
void setStrokeCap(flutter::DlStrokeCap cap) override
void drawPath(const SkPath &path) override
void setAntiAlias(bool aa) override
void drawPoints(PointMode mode, uint32_t count, const SkPoint points[]) override
void drawLine(const SkPoint &p0, const SkPoint &p1) override
void clipRect(const SkRect &rect, ClipOp clip_op, bool is_aa) override
void drawOval(const SkRect &bounds) override
void drawCircle(const SkPoint ¢er, SkScalar radius) override
void drawPaint() override
Picture EndRecordingAsPicture()
void setStrokeJoin(flutter::DlStrokeJoin join) override
void setStrokeWidth(SkScalar width) override
void setColorFilter(const flutter::DlColorFilter *filter) override
void translate(SkScalar tx, SkScalar ty) override
void setDrawStyle(flutter::DlDrawStyle style) override
void clipRRect(const SkRRect &rrect, ClipOp clip_op, bool is_aa) override
void drawShadow(const SkPath &path, const flutter::DlColor color, const SkScalar elevation, bool transparent_occluder, SkScalar dpr) override
void setStrokeMiter(SkScalar limit) override
void scale(SkScalar sx, SkScalar sy) override
void skew(SkScalar sx, SkScalar sy) override
void clipPath(const SkPath &path, ClipOp clip_op, bool is_aa) override
void setInvertColors(bool invert) override
void drawImage(const sk_sp< flutter::DlImage > image, const SkPoint point, flutter::DlImageSampling sampling, bool render_with_attributes) override
void drawImageNine(const sk_sp< flutter::DlImage > image, const SkIRect ¢er, const SkRect &dst, flutter::DlFilterMode filter, bool render_with_attributes) override
void drawAtlas(const sk_sp< flutter::DlImage > atlas, const SkRSXform xform[], const SkRect tex[], const flutter::DlColor colors[], int count, flutter::DlBlendMode mode, flutter::DlImageSampling sampling, const SkRect *cull_rect, bool render_with_attributes) override
void drawDRRect(const SkRRect &outer, const SkRRect &inner) override
void drawRect(const SkRect &rect) override
void drawDisplayList(const sk_sp< flutter::DisplayList > display_list, SkScalar opacity) override
void setColor(flutter::DlColor color) override
void drawImageRect(const sk_sp< flutter::DlImage > image, const SkRect &src, const SkRect &dst, flutter::DlImageSampling sampling, bool render_with_attributes, SrcRectConstraint constraint) override
void setMaskFilter(const flutter::DlMaskFilter *filter) override
virtual Canvas & GetCanvas()=0
void setColorSource(const flutter::DlColorSource *source) override
void transformReset() override
void setBlendMode(flutter::DlBlendMode mode) override
void drawArc(const SkRect &oval_bounds, SkScalar start_degrees, SkScalar sweep_degrees, bool use_center) override
void drawColor(flutter::DlColor color, flutter::DlBlendMode mode) override
void drawTextBlob(const sk_sp< SkTextBlob > blob, SkScalar x, SkScalar y) override
void transform2DAffine(SkScalar mxx, SkScalar mxy, SkScalar mxt, SkScalar myx, SkScalar myy, SkScalar myt) override
void saveLayer(const SkRect &bounds, const flutter::SaveLayerOptions &options, uint32_t total_content_depth, flutter::DlBlendMode max_content_mode, const flutter::DlImageFilter *backdrop) override
void rotate(SkScalar degrees) override
void drawRRect(const SkRRect &rrect) override
DlDispatcher()
Subclasses.
static constexpr BlendMode kLastPipelineBlendMode
ExperimentalDlDispatcher(ContentContext &renderer, RenderTarget &render_target, bool has_root_backdrop_filter, flutter::DlBlendMode max_root_blend_mode, IRect cull_rect)
@ kNormal
Blurred inside and outside.
@ kOuter
Nothing inside, blurred outside.
@ kInner
Blurred inside, nothing outside.
@ kSolid
Solid inside, blurred outside.
static std::shared_ptr< ImageFilter > MakeMatrix(const Matrix &matrix, SamplerDescriptor sampler_descriptor)
static std::shared_ptr< ImageFilter > MakeLocalMatrix(const Matrix &matrix, const ImageFilter &internal_filter)
static std::shared_ptr< ImageFilter > MakeErode(Radius radius_x, Radius radius_y)
static std::shared_ptr< ImageFilter > MakeBlur(Sigma sigma_x, Sigma sigma_y, FilterContents::BlurStyle blur_style, Entity::TileMode tile_mode)
static std::shared_ptr< ImageFilter > MakeDilate(Radius radius_x, Radius radius_y)
static std::shared_ptr< ImageFilter > MakeFromColorFilter(const ColorFilter &color_filter)
static std::shared_ptr< ImageFilter > MakeCompose(const ImageFilter &inner, const ImageFilter &outer)
Paths are lightweight objects that describe a collection of linear, quadratic, or cubic segments....
void drawDisplayList(const sk_sp< flutter::DisplayList > display_list, SkScalar opacity) override
void transformReset() override
void rotate(SkScalar degrees) override
TextFrameDispatcher(const ContentContext &renderer, const Matrix &initial_matrix)
void setStrokeJoin(flutter::DlStrokeJoin join) override
void setStrokeWidth(SkScalar width) override
void skew(SkScalar sx, SkScalar sy) override
void setStrokeMiter(SkScalar limit) override
void saveLayer(const SkRect &bounds, const flutter::SaveLayerOptions options, const flutter::DlImageFilter *backdrop) override
void transform2DAffine(SkScalar mxx, SkScalar mxy, SkScalar mxt, SkScalar myx, SkScalar myy, SkScalar myt) override
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) override
void scale(SkScalar sx, SkScalar sy) override
void translate(SkScalar tx, SkScalar ty) override
void setColor(flutter::DlColor color) override
void setStrokeCap(flutter::DlStrokeCap cap) override
void setDrawStyle(flutter::DlDrawStyle style) override
void drawTextFrame(const std::shared_ptr< impeller::TextFrame > &text_frame, SkScalar x, SkScalar y) override
#define FML_LOG(severity)
#define FML_UNREACHABLE()
#define FML_DCHECK(condition)
static float max(float r, float g, float b)
static float min(float r, float g, float b)
sk_sp< const SkImage > atlas
unsigned useCenter Optional< SkMatrix > matrix
Optional< SkRect > bounds
sk_sp< const SkImage > image
sk_sp< const SkImageFilter > backdrop
sk_sp< SkBlender > blender SkRect rect
PODArray< SkColor > colors
SkSamplingOptions sampling
SK_API sk_sp< SkShader > Color(SkColor)
@ kMiter
extends to miter limit
@ kBevel
connects outside edges
const SkPoint & ToSkPoint(const DlPoint &point)
@ kButt
no stroke extension
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
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
@ kStrokeAndFill
both strokes and fills shapes
@ kStroke
strokes boundary of shapes
@ kFill
fills interior of shapes
@ kNormal
fuzzy inside and outside
@ kOuter
nothing inside, fuzzy outside
@ kInner
fuzzy inside, nothing outside
@ kSolid
solid inside, fuzzy outside
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
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 keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
@ kExclusion
rc = s + d - two(s*d), ra = kSrcOver
@ kSaturation
saturation of source with hue and luminosity of destination
@ kColorBurn
darken destination to reflect source
@ kLighten
rc = s + d - min(s*da, d*sa), ra = kSrcOver
@ kHue
hue of source with saturation and luminosity of destination
@ kMultiply
r = s*(1-da) + d*(1-sa) + s*d
@ kColorDodge
brighten destination to reflect source
@ kSrcOver
r = s + (1-sa)*d
@ kXor
r = s*(1-da) + d*(1-sa)
@ kLuminosity
luminosity of source with hue and saturation of destination
@ kSoftLight
lighten or darken, depending on source
@ kDifference
rc = s + d - 2*(min(s*da, d*sa)), ra = kSrcOver
@ kOverlay
multiply or screen, depending on destination
@ kSrcATop
r = s*da + d*(1-sa)
@ kDstATop
r = d*sa + s*(1-da)
@ kDstOver
r = d + (1-da)*s
@ kColor
hue and saturation of source with luminosity of destination
@ kHardLight
multiply or screen, depending on source
@ kDarken
rc = s + d - max(s*da, d*sa), ra = kSrcOver
std::vector< Point > ToPoints(const SkPoint points[], int count)
Path ToPath(const SkPath &path, Point shift)
void ConvertStops(const flutter::DlGradientColorSourceBase *gradient, std::vector< Color > &colors, std::vector< float > &stops)
Convert display list colors + stops into impeller colors and stops, taking care to ensure that the st...
Point ToPoint(const SkPoint &point)
Size ToSize(const SkPoint &point)
std::vector< Rect > ToRects(const SkRect tex[], int count)
std::vector< Matrix > ToRSXForms(const SkRSXform xform[], int count)
bool IsNearlySimpleRRect(const SkRRect &rr)
Like SkRRect.isSimple, but allows the corners to differ by kEhCloseEnough.
Rect ToRect(const SkRect &rect)
Color ToColor(const flutter::DlColor &color)
static BlendMode ToBlendMode(flutter::DlBlendMode mode)
static Paint::Style ToStyle(flutter::DlDrawStyle style)
@ kLinear
Sample from the two nearest mip levels and linearly interpolate.
@ kBase
The texture is sampled as if it only had a single mipmap level.
static std::shared_ptr< ImageFilter > ToImageFilter(const flutter::DlImageFilter *filter)
@ kRound
Points are drawn as squares.
@ kSquare
Points are drawn as circles.
static std::optional< ColorSource::Type > ToColorSourceType(flutter::DlColorSourceType type)
static bool RequiresReadbackForBlends(const ContentContext &renderer, flutter::DlBlendMode max_root_blend_mode)
static Entity::ClipOperation ToClipOperation(flutter::DlCanvas::ClipOp clip_op)
static Matrix ToMatrix(const SkMatrix &m)
@ kMayClipContents
The caller claims the bounds are a subset of an estimate of the reasonably tight bounds but likely cl...
@ kContainsContents
The caller claims the bounds are a reasonably tight estimate of the coverage of the contents and shou...
static std::shared_ptr< ColorFilter > ToColorFilter(const flutter::DlColorFilter *filter)
static impeller::SamplerDescriptor ToSamplerDescriptor(const flutter::DlImageSampling options)
static Entity::TileMode ToTileMode(flutter::DlTileMode tile_mode)
flutter::DlScalar DlScalar
@ kNearest
Select nearest to the sample point. Most widely supported.
static std::vector< Color > ToColors(const flutter::DlColor colors[], int count)
static FilterContents::BlurStyle ToBlurStyle(flutter::DlBlurStyle blur_style)
std::shared_ptr< impeller::VerticesGeometry > MakeVertices(const flutter::DlVertices *vertices)
SK_API sk_sp< PrecompileColorFilter > Matrix()
static SkColor4f transform(SkColor4f c, SkColorSpace *src, SkColorSpace *dst)
static SkString join(const CommandLineFlags::StringArray &)
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)
static constexpr SkRect MakeWH(float w, float h)
static constexpr SkRect MakeLTRB(float l, float t, float r, float b)
A 4x4 matrix using column-major storage.
static constexpr Matrix MakeTranslation(const Vector3 &t)
constexpr Scalar GetMaxBasisLengthXY() const
constexpr Matrix Translate(const Vector3 &t) const
constexpr Vector3 GetScale() const
static constexpr Matrix MakeColumn(Scalar m0, Scalar m1, Scalar m2, Scalar m3, Scalar m4, Scalar m5, Scalar m6, Scalar m7, Scalar m8, Scalar m9, Scalar m10, Scalar m11, Scalar m12, Scalar m13, Scalar m14, Scalar m15)
static constexpr Matrix MakeSkew(Scalar sx, Scalar sy)
constexpr Matrix Scale(const Vector3 &s) const
static Matrix MakeRotationZ(Radians r)
constexpr bool HasPerspective() const
FilterContents::BlurStyle style
std::shared_ptr< ImageFilter > image_filter
std::optional< MaskBlurDescriptor > mask_blur_descriptor
std::shared_ptr< ColorFilter > color_filter
For convolution filters, the "radius" is the size of the convolution kernel to use on the local space...
In filters that use Gaussian distributions, "sigma" is a size of one standard deviation in terms of t...
constexpr Type GetDistance(const TPoint &p) const
constexpr auto GetBottom() const
constexpr auto GetTop() const
constexpr auto GetLeft() const
constexpr auto GetRight() const
static constexpr TRect MakeLTRB(Type left, Type top, Type right, Type bottom)
#define TRACE_EVENT0(category_group, name)
static sk_sp< SkShader > linear(sk_sp< SkShader > shader)