5#ifndef FLUTTER_DISPLAY_LIST_SKIA_DL_SK_CONVERSIONS_H_
6#define FLUTTER_DISPLAY_LIST_SKIA_DL_SK_CONVERSIONS_H_
13SkPaint
ToSk(
const DlPaint& paint);
18 return static_cast<SkBlendMode
>(
mode);
37 return static_cast<SkPaint::Style
>(style);
41 return static_cast<SkPaint::Cap
>(cap);
45 return static_cast<SkPaint::Join
>(join);
49 return static_cast<SkTileMode
>(dl_mode);
53 return static_cast<SkBlurStyle
>(blur_style);
57 return static_cast<SkFilterMode
>(filter_mode);
61 return static_cast<SkVertices::VertexMode
>(dl_mode);
67 return SkSamplingOptions(SkCubicResampler{1 / 3.0f, 1 / 3.0f});
69 return SkSamplingOptions(SkFilterMode::kLinear);
71 return SkSamplingOptions(SkFilterMode::kLinear, SkMipmapMode::kLinear);
73 return SkSamplingOptions(SkFilterMode::kNearest);
78 return static_cast<SkCanvas::SrcRectConstraint
>(constraint);
82 return static_cast<SkClipOp
>(op);
86 return static_cast<SkCanvas::PointMode
>(
mode);
89extern sk_sp<SkShader>
ToSk(
const DlColorSource* source);
90inline sk_sp<SkShader>
ToSk(
91 const std::shared_ptr<const DlColorSource>& source) {
92 return ToSk(source.get());
98extern sk_sp<SkImageFilter>
ToSk(
const DlImageFilter* filter);
99inline sk_sp<SkImageFilter>
ToSk(
const std::shared_ptr<DlImageFilter>& filter) {
100 return ToSk(filter.get());
103 return ToSk(&filter);
106extern sk_sp<SkColorFilter>
ToSk(
const DlColorFilter* filter);
107inline sk_sp<SkColorFilter>
ToSk(
108 const std::shared_ptr<const DlColorFilter>& filter) {
109 return ToSk(filter.get());
112 return ToSk(&filter);
115extern sk_sp<SkMaskFilter>
ToSk(
const DlMaskFilter* filter);
116inline sk_sp<SkMaskFilter>
ToSk(
117 const std::shared_ptr<const DlMaskFilter>& filter) {
118 return ToSk(filter.get());
121 return ToSk(&filter);
125 return matrix ? &scratch.setAll(matrix->
m[0], matrix->
m[4], matrix->
m[12],
126 matrix->
m[1], matrix->
m[5], matrix->
m[13],
127 matrix->
m[3], matrix->
m[7], matrix->
m[15])
131extern sk_sp<SkVertices>
ToSk(
const std::shared_ptr<DlVertices>& vertices);
134 return reinterpret_cast<const SkRSXform*
>(transforms);
SkPaint ToSk(const DlPaint &paint)
SkColor ToSkColor(DlColor color)
SkPaint ToStrokedSk(const DlPaint &paint)
SkColor4f ToSkColor4f(DlColor color)
DlVertexMode
Defines the way in which the vertices of a DlVertices object are separated into triangles into which ...
SkPaint ToNonShaderSk(const DlPaint &paint)
it will be possible to load the file into Perfetto s trace viewer use test Running tests that layout and measure text will not yield consistent results across various platforms Enabling this option will make font resolution default to the Ahem test font on all 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
constexpr DlColorSpace getColorSpace() const
constexpr DlScalar getRedF() const
constexpr DlScalar getAlphaF() const
DlColor withColorSpace(DlColorSpace color_space) const
constexpr DlScalar getBlueF() const
constexpr DlScalar getGreenF() const
A 4x4 matrix using column-major storage.