 |
Flutter Impeller
|
|
Go to the documentation of this file.
5 #ifndef FLUTTER_IMPELLER_DISPLAY_LIST_SKIA_CONVERSIONS_H_
6 #define FLUTTER_IMPELLER_DISPLAY_LIST_SKIA_CONVERSIONS_H_
8 #include "display_list/dl_color.h"
9 #include "display_list/effects/dl_color_source.h"
16 #include "third_party/skia/include/core/SkColor.h"
17 #include "third_party/skia/include/core/SkColorType.h"
18 #include "third_party/skia/include/core/SkPath.h"
19 #include "third_party/skia/include/core/SkPoint.h"
20 #include "third_party/skia/include/core/SkRRect.h"
21 #include "third_party/skia/include/core/SkRSXform.h"
22 #include "third_party/skia/include/core/SkTextBlob.h"
25 namespace skia_conversions {
29 std::optional<Rect>
ToRect(
const SkRect* rect);
31 std::vector<Rect>
ToRects(
const SkRect tex[],
int count);
33 std::vector<Point>
ToPoints(
const SkPoint points[],
int count);
39 Color
ToColor(
const flutter::DlColor& color);
41 std::vector<Matrix>
ToRSXForms(
const SkRSXform xform[],
int count);
47 Path
ToPath(
const SkRRect& rrect);
52 std::optional<impeller::PixelFormat>
ToPixelFormat(SkColorType type);
68 void ConvertStops(
const flutter::DlGradientColorSourceBase* gradient,
69 std::vector<Color>& colors,
70 std::vector<float>& stops);
75 #endif // FLUTTER_IMPELLER_DISPLAY_LIST_SKIA_CONVERSIONS_H_
Path PathDataFromTextBlob(const sk_sp< SkTextBlob > &blob, Point shift)
std::vector< Point > ToPoints(const SkPoint points[], int count)
std::optional< impeller::PixelFormat > ToPixelFormat(SkColorType type)
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...
Size ToSize(const SkPoint &point)
std::vector< Rect > ToRects(const SkRect tex[], int count)
Color ToColor(const flutter::DlColor &color)
Rect ToRect(const SkRect &rect)
PathBuilder::RoundingRadii ToRoundingRadii(const SkRRect &rrect)
Point ToPoint(const SkPoint &point)
std::vector< Matrix > ToRSXForms(const SkRSXform xform[], int count)
Path ToPath(const SkPath &path, Point shift)