 |
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"
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 {
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);
55 Path
ToPath(
const SkRRect& rrect);
60 const flutter::DlImageSampling options);
80 void ConvertStops(
const flutter::DlGradientColorSourceBase* gradient,
81 std::vector<Color>& colors,
82 std::vector<float>& stops);
87 #endif // FLUTTER_IMPELLER_DISPLAY_LIST_SKIA_CONVERSIONS_H_
std::vector< Point > ToPoints(const SkPoint points[], int count)
bool IsNearlySimpleRRect(const SkRRect &rr)
Like SkRRect.isSimple, but allows the corners to differ by kEhCloseEnough.
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)
impeller::SamplerDescriptor ToSamplerDescriptor(const flutter::DlImageSampling options)
Matrix ToMatrix(const SkMatrix &m)
std::vector< Rect > ToRects(const SkRect tex[], int count)
Color ToColor(const flutter::DlColor &color)
BlendMode ToBlendMode(flutter::DlBlendMode mode)
Matrix ToRSXForm(const SkRSXform &form)
Rect ToRect(const SkRect &rect)
PathBuilder::RoundingRadii ToRoundingRadii(const SkRRect &rrect)
Point ToPoint(const SkPoint &point)
Path ToPath(const SkRRect &rrect)