5 #ifndef FLUTTER_IMPELLER_DISPLAY_LIST_SKIA_CONVERSIONS_H_
6 #define FLUTTER_IMPELLER_DISPLAY_LIST_SKIA_CONVERSIONS_H_
8 #include "flutter/display_list/dl_blend_mode.h"
9 #include "flutter/display_list/dl_color.h"
10 #include "flutter/display_list/effects/dl_color_sources.h"
18 #include "third_party/skia/include/core/SkColorType.h"
19 #include "third_party/skia/include/core/SkPath.h"
20 #include "third_party/skia/include/core/SkPoint.h"
21 #include "third_party/skia/include/core/SkRRect.h"
22 #include "third_party/skia/include/core/SkTextBlob.h"
25 namespace skia_conversions {
36 std::optional<Rect>
ToRect(
const SkRect* rect);
39 std::vector<Rect>
ToRects(
const SkRect tex[],
int count);
42 std::vector<Point>
ToPoints(
const SkPoint points[],
int count);
49 Color
ToColor(
const flutter::DlColor& color);
54 const flutter::DlImageSampling options);
74 void ConvertStops(
const flutter::DlGradientColorSourceBase* gradient,
75 std::vector<Color>& colors,
76 std::vector<float>& stops);
Matrix ToMatrix(const SkMatrix &m)
BlendMode ToBlendMode(flutter::DlBlendMode mode)
std::optional< impeller::PixelFormat > ToPixelFormat(SkColorType type)
std::vector< Point > ToPoints(const SkPoint points[], int count)
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)
impeller::SamplerDescriptor ToSamplerDescriptor(const flutter::DlImageSampling options)
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)