9 #include "flutter/fml/mapping.h"
36 #define DEFINE_PEER_GETTER(cxx_type, c_type) \
37 cxx_type* GetPeer(c_type object) { \
38 return reinterpret_cast<cxx_type*>(object); \
59 std::stringstream stream;
76 void* gl_proc_address_callback_user_data) {
80 <<
"doesn't match the version the user expects ("
85 [gl_proc_address_callback,
86 gl_proc_address_callback_user_data](
const char* proc_name) ->
void* {
87 return gl_proc_address_callback(proc_name,
88 gl_proc_address_callback_user_data);
90 if (!context || !context->IsValid()) {
94 return context.Leak();
110 return Create<DisplayListBuilder>(cull_rect).Leak();
125 GetPeer(builder)->Save();
132 ImpellerImageFilter backdrop) {
141 GetPeer(builder)->Restore();
148 GetPeer(builder)->Scale(
Size{x_scale, y_scale});
153 float angle_degrees) {
154 GetPeer(builder)->Rotate(
Degrees{angle_degrees});
160 float y_translation) {
161 GetPeer(builder)->Translate(
Point{x_translation, y_translation});
184 ImpellerDisplayListBuilder builder) {
185 GetPeer(builder)->ResetTransform();
190 ImpellerDisplayListBuilder builder) {
191 return GetPeer(builder)->GetSaveCount();
196 ImpellerDisplayListBuilder builder,
198 GetPeer(builder)->RestoreToCount(count);
213 return Create<PathBuilder>().Leak();
242 GetPeer(builder)->QuadraticCurveTo(
ToImpellerType(*control_point),
266 float start_angle_degrees,
267 float end_angle_degrees) {
282 ImpellerPathBuilder builder,
291 GetPeer(builder)->Close();
322 ImpellerDisplayListBuilder builder,
341 return Create<Paint>().Leak();
381 GetPeer(paint)->SetStrokeWidth(width);
386 GetPeer(paint)->SetStrokeMiter(miter);
391 ImpellerPaint paint) {
392 GetPeer(builder)->DrawPaint(*GetPeer(paint));
399 ImpellerPaint paint) {
408 ImpellerDisplayListBuilder builder,
413 ImpellerPaint paint) {
425 ImpellerPaint paint) {
426 GetPeer(builder)->DrawRect(
ToImpellerType(*rect), *GetPeer(paint));
432 ImpellerPaint paint) {
433 GetPeer(builder)->DrawOval(
ToImpellerType(*oval_bounds), *GetPeer(paint));
438 ImpellerDisplayListBuilder builder,
441 ImpellerPaint paint) {
450 ImpellerDisplayListBuilder builder,
455 ImpellerPaint paint) {
456 GetPeer(builder)->DrawRoundedRectDifference(
ToImpellerType(*outer_rect),
467 ImpellerPaint paint) {
468 GetPeer(builder)->DrawPath(*GetPeer(path), *GetPeer(paint));
473 ImpellerContext context,
476 void* contents_on_release_user_data) {
485 auto texture = Create<Texture>(*GetPeer(context), desc);
486 if (!texture->IsValid()) {
494 auto wrapped_contents = std::make_shared<fml::NonOwnedMapping>(
497 [on_release = contents->
on_release, contents_on_release_user_data](
499 on_release(contents_on_release_user_data);
502 if (!texture->SetContents(std::move(wrapped_contents))) {
508 if (!texture->SetContents(contents->
data, contents->
length)) {
513 return texture.Leak();
518 ImpellerContext context,
520 uint64_t external_gl_handle) {
521 auto impeller_context = GetPeer(context)->GetContext();
522 if (impeller_context->GetBackendType() !=
529 const auto& reactor = impeller_context_gl.GetReactor();
545 if (!texture || !texture->IsValid()) {
567 auto interop_texture = GetPeer(texture);
568 if (interop_texture->GetBackendType() !=
570 VALIDATION_LOG <<
"Can only fetch the texture handle of an OpenGL texture.";
590 ImpellerDisplayListBuilder builder) {
591 auto dl = GetPeer(builder)->Build();
592 if (!dl->IsValid()) {
600 ImpellerDisplayListBuilder builder,
601 ImpellerDisplayList display_list,
603 GetPeer(builder)->DrawDisplayList(*GetPeer(display_list), opacity);
630 ImpellerDisplayList display_list) {
631 return GetPeer(surface)->DrawDisplayList(*GetPeer(display_list));
636 ImpellerTexture texture,
639 ImpellerPaint paint) {
640 GetPeer(builder)->DrawTexture(*GetPeer(texture),
649 ImpellerDisplayListBuilder builder,
650 ImpellerTexture texture,
654 ImpellerPaint paint) {
655 GetPeer(builder)->DrawTextureRect(*GetPeer(texture),
673 static std::pair<std::vector<flutter::DlColor>, std::vector<Scalar>>
676 const float* stops) {
677 if (stop_count == 0) {
680 std::pair<std::vector<flutter::DlColor>, std::vector<Scalar>> result;
681 result.first.reserve(stop_count);
682 result.second.reserve(stop_count);
683 for (
size_t i = 0; i < stop_count; i++) {
685 result.second.emplace_back(stops[i]);
703 colors_and_stops.first,
704 colors_and_stops.second,
706 transformation ==
nullptr ?
Matrix{}
725 colors_and_stops.first,
726 colors_and_stops.second,
728 transformation ==
nullptr ?
Matrix{}
751 colors_and_stops.first,
752 colors_and_stops.second,
754 transformation ==
nullptr ?
Matrix{}
775 colors_and_stops.first,
776 colors_and_stops.second,
778 transformation ==
nullptr ?
Matrix{}
786 ImpellerTexture image,
796 transformation ==
nullptr ?
Matrix{}
885 ImpellerImageFilter outer,
886 ImpellerImageFilter inner) {
892 ImpellerColorFilter color_filter) {
893 GetPeer(paint)->SetColorFilter(*GetPeer(color_filter));
898 ImpellerColorSource color_source) {
899 GetPeer(paint)->SetColorSource(*GetPeer(color_source));
904 ImpellerImageFilter image_filter) {
905 GetPeer(paint)->SetImageFilter(*GetPeer(image_filter));
910 ImpellerMaskFilter mask_filter) {
911 GetPeer(paint)->SetMaskFilter(*GetPeer(mask_filter));
916 return Create<ParagraphStyle>().Leak();
931 ImpellerPaint paint) {
932 GetPeer(paragraph_style)->SetForeground(
Ref(GetPeer(paint)));
937 ImpellerPaint paint) {
938 GetPeer(paragraph_style)->SetBackground(
Ref(GetPeer(paint)));
944 GetPeer(paragraph_style)->SetFontWeight(
ToTxtType(weight));
950 GetPeer(paragraph_style)->SetFontStyle(
ToTxtType(style));
954 if (
string ==
nullptr) {
957 return std::string{
string};
962 const char* family_name) {
963 GetPeer(paragraph_style)->SetFontFamily(
ReadString(family_name));
969 GetPeer(paragraph_style)->SetFontSize(size);
975 GetPeer(paragraph_style)->SetHeight(height);
980 ImpellerParagraphStyle paragraph_style,
982 GetPeer(paragraph_style)->SetTextAlignment(
ToTxtType(align));
987 ImpellerParagraphStyle paragraph_style,
989 GetPeer(paragraph_style)->SetTextDirection(
ToTxtType(direction));
994 uint32_t max_lines) {
995 GetPeer(paragraph_style)->SetMaxLines(max_lines);
1000 const char* locale) {
1001 GetPeer(paragraph_style)->SetLocale(
ReadString(locale));
1006 ImpellerParagraph paragraph,
1008 GetPeer(builder)->DrawParagraph(*GetPeer(paragraph),
ToImpellerType(*point));
1013 ImpellerTypographyContext context) {
1015 Create<ParagraphBuilder>(Ref<TypographyContext>(GetPeer(context)));
1016 if (!builder->IsValid()) {
1020 return builder.Leak();
1025 ImpellerParagraphBuilder paragraph_builder) {
1031 ImpellerParagraphBuilder paragraph_builder) {
1037 ImpellerParagraphBuilder paragraph_builder,
1038 ImpellerParagraphStyle style) {
1039 GetPeer(paragraph_builder)->PushStyle(*GetPeer(style));
1044 ImpellerParagraphBuilder paragraph_builder) {
1045 GetPeer(paragraph_builder)->PopStyle();
1050 const uint8_t*
data,
1052 if (
data ==
nullptr) {
1058 GetPeer(paragraph_builder)->AddText(
data, length);
1063 ImpellerParagraphBuilder paragraph_builder,
1065 return GetPeer(paragraph_builder)->Build(width).Leak();
1080 return GetPeer(paragraph)->GetMaxWidth();
1085 return GetPeer(paragraph)->GetHeight();
1090 return GetPeer(paragraph)->GetLongestLineWidth();
1095 return GetPeer(paragraph)->GetMinIntrinsicWidth();
1100 return GetPeer(paragraph)->GetMaxIntrinsicWidth();
1105 return GetPeer(paragraph)->GetIdeographicBaseline();
1110 return GetPeer(paragraph)->GetAlphabeticBaseline();
1115 return GetPeer(paragraph)->GetLineCount();
1120 auto context = Create<TypographyContext>();
1121 if (!context->IsValid()) {
1125 return Create<TypographyContext>().Leak();
1141 void* contents_on_release_user_data,
1142 const char* family_name_alias) {
1143 auto wrapped_contents = std::make_unique<fml::NonOwnedMapping>(
1146 [on_release = contents->
on_release, contents_on_release_user_data](
auto,
1148 on_release(contents_on_release_user_data);
1151 return GetPeer(context)->RegisterFont(std::move(wrapped_contents),
static ContextGLES & Cast(Context &base)
std::optional< GLuint > GetGLHandle() const
static std::shared_ptr< TextureGLES > WrapTexture(std::shared_ptr< ReactorGLES > reactor, TextureDescriptor desc, HandleGLES external_handle)
Create a texture by wrapping an external OpenGL texture handle. Ownership of the texture handle is as...
static ScopedObject< ColorFilter > MakeMatrix(const float matrix[20])
static ScopedObject< ColorFilter > MakeBlend(Color color, BlendMode mode)
static ScopedObject< ColorSource > MakeSweepGradient(const Point ¢er, Scalar start, Scalar end, const std::vector< flutter::DlColor > &colors, const std::vector< Scalar > &stops, flutter::DlTileMode tile_mode, const Matrix &transformation)
static ScopedObject< ColorSource > MakeImage(const Texture &image, flutter::DlTileMode horizontal_tile_mode, flutter::DlTileMode vertical_tile_mode, flutter::DlImageSampling sampling, const Matrix &transformation)
static ScopedObject< ColorSource > MakeRadialGradient(const Point ¢er, Scalar radius, const std::vector< flutter::DlColor > &colors, const std::vector< Scalar > &stops, flutter::DlTileMode tile_mode, const Matrix &transformation)
static ScopedObject< ColorSource > MakeLinearGradient(const Point &start_point, const Point &end_point, const std::vector< flutter::DlColor > &colors, const std::vector< Scalar > &stops, flutter::DlTileMode tile_mode, const Matrix &transformation)
static ScopedObject< ColorSource > MakeConicalGradient(const Point &start_center, Scalar start_radius, const Point &end_center, Scalar end_radius, const std::vector< flutter::DlColor > &colors, const std::vector< Scalar > &stops, flutter::DlTileMode tile_mode, const Matrix &transformation)
static ScopedObject< Context > CreateOpenGLES(std::function< void *(const char *gl_proc_name)> proc_address_callback)
static ScopedObject< ImageFilter > MakeDilate(Scalar x_radius, Scalar y_radius)
static ScopedObject< ImageFilter > MakeErode(Scalar x_radius, Scalar y_radius)
static ScopedObject< ImageFilter > MakeCompose(const ImageFilter &outer, const ImageFilter &inner)
static ScopedObject< ImageFilter > MakeBlur(Scalar x_sigma, Scalar y_sigma, flutter::DlTileMode tile_mode)
static ScopedObject< ImageFilter > MakeMatrix(const Matrix &matrix, flutter::DlImageSampling sampling)
static ScopedObject< MaskFilter > MakeBlur(flutter::DlBlurStyle style, float sigma)
static void SafeRelease(void *ptr)
static void SafeRetain(void *ptr)
static ScopedObject< Surface > WrapFBO(Context &context, uint64_t fbo, PixelFormat color_format, ISize size)
#define IMPELLER_VERSION_GET_PATCH(version)
#define IMPELLER_VERSION_GET_MAJOR(version)
#define IMPELLER_VERSION_GET_VARIANT(version)
#define IMPELLER_VERSION_GET_MINOR(version)
void *IMPELLER_NULLABLE(* ImpellerProcAddressCallback)(const char *IMPELLER_NONNULL proc_name, void *IMPELLER_NULLABLE user_data)
#define IMPELLER_EXTERN_C
IMPELLER_EXTERN_C ImpellerImageFilter ImpellerImageFilterCreateComposeNew(ImpellerImageFilter outer, ImpellerImageFilter inner)
IMPELLER_EXTERN_C void ImpellerParagraphBuilderRetain(ImpellerParagraphBuilder paragraph_builder)
IMPELLER_EXTERN_C ImpellerColorSource ImpellerColorSourceCreateSweepGradientNew(const ImpellerPoint *center, float start, float end, uint32_t stop_count, const ImpellerColor *colors, const float *stops, ImpellerTileMode tile_mode, const ImpellerMatrix *transformation)
IMPELLER_EXTERN_C ImpellerImageFilter ImpellerImageFilterCreateMatrixNew(const ImpellerMatrix *matrix, ImpellerTextureSampling sampling)
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderDrawPaint(ImpellerDisplayListBuilder builder, ImpellerPaint paint)
IMPELLER_EXTERN_C void ImpellerSurfaceRetain(ImpellerSurface surface)
IMPELLER_EXTERN_C void ImpellerParagraphStyleRelease(ImpellerParagraphStyle paragraph_style)
IMPELLER_EXTERN_C uint32_t ImpellerGetVersion()
IMPELLER_EXTERN_C void ImpellerParagraphStyleRetain(ImpellerParagraphStyle paragraph_style)
IMPELLER_EXTERN_C void ImpellerPaintSetColorSource(ImpellerPaint paint, ImpellerColorSource color_source)
IMPELLER_EXTERN_C void ImpellerPathBuilderClose(ImpellerPathBuilder builder)
IMPELLER_EXTERN_C void ImpellerPathBuilderQuadraticCurveTo(ImpellerPathBuilder builder, const ImpellerPoint *control_point, const ImpellerPoint *end_point)
IMPELLER_EXTERN_C uint64_t ImpellerTextureGetOpenGLHandle(ImpellerTexture texture)
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderRetain(ImpellerDisplayListBuilder builder)
IMPELLER_EXTERN_C void ImpellerParagraphBuilderPopStyle(ImpellerParagraphBuilder paragraph_builder)
IMPELLER_EXTERN_C ImpellerMaskFilter ImpellerMaskFilterCreateBlurNew(ImpellerBlurStyle style, float sigma)
IMPELLER_EXTERN_C void ImpellerParagraphStyleSetMaxLines(ImpellerParagraphStyle paragraph_style, uint32_t max_lines)
IMPELLER_EXTERN_C void ImpellerColorFilterRetain(ImpellerColorFilter color_filter)
IMPELLER_EXTERN_C ImpellerSurface ImpellerSurfaceCreateWrappedFBONew(ImpellerContext context, uint64_t fbo, ImpellerPixelFormat format, const ImpellerISize *size)
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderDrawTextureRect(ImpellerDisplayListBuilder builder, ImpellerTexture texture, const ImpellerRect *src_rect, const ImpellerRect *dst_rect, ImpellerTextureSampling sampling, ImpellerPaint paint)
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderSave(ImpellerDisplayListBuilder builder)
IMPELLER_EXTERN_C ImpellerDisplayList ImpellerDisplayListBuilderCreateDisplayListNew(ImpellerDisplayListBuilder builder)
IMPELLER_EXTERN_C void ImpellerPathBuilderRelease(ImpellerPathBuilder builder)
IMPELLER_EXTERN_C ImpellerParagraphBuilder ImpellerParagraphBuilderNew(ImpellerTypographyContext context)
IMPELLER_EXTERN_C ImpellerColorFilter ImpellerColorFilterCreateColorMatrixNew(const ImpellerColorMatrix *color_matrix)
static std::pair< std::vector< flutter::DlColor >, std::vector< Scalar > > ParseColorsAndStops(uint32_t stop_count, const ImpellerColor *colors, const float *stops)
IMPELLER_EXTERN_C void ImpellerPaintRelease(ImpellerPaint paint)
IMPELLER_EXTERN_C ImpellerDisplayListBuilder ImpellerDisplayListBuilderNew(const ImpellerRect *cull_rect)
IMPELLER_EXTERN_C void ImpellerParagraphStyleSetFontStyle(ImpellerParagraphStyle paragraph_style, ImpellerFontStyle style)
IMPELLER_EXTERN_C ImpellerPaint ImpellerPaintNew()
IMPELLER_EXTERN_C void ImpellerTypographyContextRetain(ImpellerTypographyContext context)
IMPELLER_EXTERN_C void ImpellerParagraphStyleSetTextDirection(ImpellerParagraphStyle paragraph_style, ImpellerTextDirection direction)
ScopedObject< Object > Ref(Object *object)
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderDrawOval(ImpellerDisplayListBuilder builder, const ImpellerRect *oval_bounds, ImpellerPaint paint)
IMPELLER_EXTERN_C ImpellerParagraph ImpellerParagraphBuilderBuildParagraphNew(ImpellerParagraphBuilder paragraph_builder, float width)
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderSaveLayer(ImpellerDisplayListBuilder builder, const ImpellerRect *bounds, ImpellerPaint paint, ImpellerImageFilter backdrop)
IMPELLER_EXTERN_C void ImpellerPathBuilderAddRect(ImpellerPathBuilder builder, const ImpellerRect *rect)
IMPELLER_EXTERN_C void ImpellerPaintSetStrokeCap(ImpellerPaint paint, ImpellerStrokeCap cap)
IMPELLER_EXTERN_C void ImpellerParagraphBuilderRelease(ImpellerParagraphBuilder paragraph_builder)
IMPELLER_EXTERN_C void ImpellerPathBuilderLineTo(ImpellerPathBuilder builder, const ImpellerPoint *location)
IMPELLER_EXTERN_C void ImpellerPathRetain(ImpellerPath path)
IMPELLER_EXTERN_C void ImpellerPaintSetStrokeJoin(ImpellerPaint paint, ImpellerStrokeJoin join)
IMPELLER_EXTERN_C float ImpellerParagraphGetHeight(ImpellerParagraph paragraph)
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderClipOval(ImpellerDisplayListBuilder builder, const ImpellerRect *oval_bounds, ImpellerClipOperation op)
IMPELLER_EXTERN_C void ImpellerPathBuilderRetain(ImpellerPathBuilder builder)
IMPELLER_EXTERN_C void ImpellerParagraphBuilderPushStyle(ImpellerParagraphBuilder paragraph_builder, ImpellerParagraphStyle style)
IMPELLER_EXTERN_C void ImpellerPathBuilderAddOval(ImpellerPathBuilder builder, const ImpellerRect *oval_bounds)
IMPELLER_EXTERN_C ImpellerTypographyContext ImpellerTypographyContextNew()
IMPELLER_EXTERN_C float ImpellerParagraphGetAlphabeticBaseline(ImpellerParagraph paragraph)
IMPELLER_EXTERN_C void ImpellerPathRelease(ImpellerPath path)
IMPELLER_EXTERN_C ImpellerImageFilter ImpellerImageFilterCreateBlurNew(float x_sigma, float y_sigma, ImpellerTileMode tile_mode)
IMPELLER_EXTERN_C void ImpellerColorSourceRetain(ImpellerColorSource color_source)
IMPELLER_EXTERN_C float ImpellerParagraphGetMinIntrinsicWidth(ImpellerParagraph paragraph)
IMPELLER_EXTERN_C void ImpellerPaintSetStrokeWidth(ImpellerPaint paint, float width)
IMPELLER_EXTERN_C void ImpellerMaskFilterRetain(ImpellerMaskFilter mask_filter)
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderDrawDashedLine(ImpellerDisplayListBuilder builder, const ImpellerPoint *from, const ImpellerPoint *to, float on_length, float off_length, ImpellerPaint paint)
IMPELLER_EXTERN_C ImpellerPath ImpellerPathBuilderTakePathNew(ImpellerPathBuilder builder, ImpellerFillType fill)
IMPELLER_EXTERN_C ImpellerPath ImpellerPathBuilderCopyPathNew(ImpellerPathBuilder builder, ImpellerFillType fill)
IMPELLER_EXTERN_C void ImpellerColorSourceRelease(ImpellerColorSource color_source)
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderClipRoundedRect(ImpellerDisplayListBuilder builder, const ImpellerRect *rect, const ImpellerRoundingRadii *radii, ImpellerClipOperation op)
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderClipRect(ImpellerDisplayListBuilder builder, const ImpellerRect *rect, ImpellerClipOperation op)
constexpr Matrix ToImpellerType(const ImpellerMatrix &m)
IMPELLER_EXTERN_C ImpellerColorSource ImpellerColorSourceCreateRadialGradientNew(const ImpellerPoint *center, float radius, uint32_t stop_count, const ImpellerColor *colors, const float *stops, ImpellerTileMode tile_mode, const ImpellerMatrix *transformation)
IMPELLER_EXTERN_C void ImpellerParagraphStyleSetTextAlignment(ImpellerParagraphStyle paragraph_style, ImpellerTextAlignment align)
IMPELLER_EXTERN_C void ImpellerTypographyContextRelease(ImpellerTypographyContext context)
IMPELLER_EXTERN_C ImpellerTexture ImpellerTextureCreateWithOpenGLTextureHandleNew(ImpellerContext context, const ImpellerTextureDescriptor *descriptor, uint64_t external_gl_handle)
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderDrawRoundedRect(ImpellerDisplayListBuilder builder, const ImpellerRect *rect, const ImpellerRoundingRadii *radii, ImpellerPaint paint)
IMPELLER_EXTERN_C ImpellerTexture ImpellerTextureCreateWithContentsNew(ImpellerContext context, const ImpellerTextureDescriptor *descriptor, const ImpellerMapping *contents, void *contents_on_release_user_data)
IMPELLER_EXTERN_C void ImpellerPathBuilderMoveTo(ImpellerPathBuilder builder, const ImpellerPoint *location)
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderTransform(ImpellerDisplayListBuilder builder, const ImpellerMatrix *transform)
IMPELLER_EXTERN_C void ImpellerColorFilterRelease(ImpellerColorFilter color_filter)
IMPELLER_EXTERN_C bool ImpellerTypographyContextRegisterFont(ImpellerTypographyContext context, const ImpellerMapping *contents, void *contents_on_release_user_data, const char *family_name_alias)
IMPELLER_EXTERN_C void ImpellerParagraphStyleSetFontWeight(ImpellerParagraphStyle paragraph_style, ImpellerFontWeight weight)
IMPELLER_EXTERN_C float ImpellerParagraphGetMaxIntrinsicWidth(ImpellerParagraph paragraph)
IMPELLER_EXTERN_C ImpellerColorSource ImpellerColorSourceCreateLinearGradientNew(const ImpellerPoint *start_point, const ImpellerPoint *end_point, uint32_t stop_count, const ImpellerColor *colors, const float *stops, ImpellerTileMode tile_mode, const ImpellerMatrix *transformation)
IMPELLER_EXTERN_C ImpellerPathBuilder ImpellerPathBuilderNew()
IMPELLER_EXTERN_C void ImpellerParagraphStyleSetFontSize(ImpellerParagraphStyle paragraph_style, float size)
IMPELLER_EXTERN_C void ImpellerTextureRelease(ImpellerTexture texture)
IMPELLER_EXTERN_C void ImpellerContextRelease(ImpellerContext context)
IMPELLER_EXTERN_C void ImpellerImageFilterRelease(ImpellerImageFilter image_filter)
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderDrawParagraph(ImpellerDisplayListBuilder builder, ImpellerParagraph paragraph, const ImpellerPoint *point)
IMPELLER_EXTERN_C ImpellerContext ImpellerContextCreateOpenGLESNew(uint32_t version, ImpellerProcAddressCallback gl_proc_address_callback, void *gl_proc_address_callback_user_data)
constexpr txt::FontWeight ToTxtType(ImpellerFontWeight weight)
IMPELLER_EXTERN_C ImpellerColorSource ImpellerColorSourceCreateImageNew(ImpellerTexture image, ImpellerTileMode horizontal_tile_mode, ImpellerTileMode vertical_tile_mode, ImpellerTextureSampling sampling, const ImpellerMatrix *transformation)
IMPELLER_EXTERN_C void ImpellerMaskFilterRelease(ImpellerMaskFilter mask_filter)
IMPELLER_EXTERN_C void ImpellerParagraphStyleSetFontFamily(ImpellerParagraphStyle paragraph_style, const char *family_name)
IMPELLER_EXTERN_C void ImpellerParagraphStyleSetHeight(ImpellerParagraphStyle paragraph_style, float height)
IMPELLER_EXTERN_C void ImpellerPaintRetain(ImpellerPaint paint)
IMPELLER_EXTERN_C void ImpellerContextRetain(ImpellerContext context)
IMPELLER_EXTERN_C void ImpellerParagraphRelease(ImpellerParagraph paragraph)
IMPELLER_EXTERN_C void ImpellerPaintSetBlendMode(ImpellerPaint paint, ImpellerBlendMode mode)
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderResetTransform(ImpellerDisplayListBuilder builder)
static std::string GetVersionAsString(uint32_t version)
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderScale(ImpellerDisplayListBuilder builder, float x_scale, float y_scale)
IMPELLER_EXTERN_C void ImpellerParagraphStyleSetLocale(ImpellerParagraphStyle paragraph_style, const char *locale)
IMPELLER_EXTERN_C bool ImpellerSurfaceDrawDisplayList(ImpellerSurface surface, ImpellerDisplayList display_list)
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderDrawLine(ImpellerDisplayListBuilder builder, const ImpellerPoint *from, const ImpellerPoint *to, ImpellerPaint paint)
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderDrawDisplayList(ImpellerDisplayListBuilder builder, ImpellerDisplayList display_list, float opacity)
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderRestore(ImpellerDisplayListBuilder builder)
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderTranslate(ImpellerDisplayListBuilder builder, float x_translation, float y_translation)
IMPELLER_EXTERN_C void ImpellerParagraphStyleSetForeground(ImpellerParagraphStyle paragraph_style, ImpellerPaint paint)
IMPELLER_EXTERN_C uint32_t ImpellerDisplayListBuilderGetSaveCount(ImpellerDisplayListBuilder builder)
IMPELLER_EXTERN_C ImpellerImageFilter ImpellerImageFilterCreateDilateNew(float x_radius, float y_radius)
IMPELLER_EXTERN_C void ImpellerPaintSetStrokeMiter(ImpellerPaint paint, float miter)
IMPELLER_EXTERN_C ImpellerParagraphStyle ImpellerParagraphStyleNew()
IMPELLER_EXTERN_C void ImpellerTextureRetain(ImpellerTexture texture)
IMPELLER_EXTERN_C void ImpellerPathBuilderCubicCurveTo(ImpellerPathBuilder builder, const ImpellerPoint *control_point_1, const ImpellerPoint *control_point_2, const ImpellerPoint *end_point)
IMPELLER_EXTERN_C void ImpellerImageFilterRetain(ImpellerImageFilter image_filter)
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderDrawRoundedRectDifference(ImpellerDisplayListBuilder builder, const ImpellerRect *outer_rect, const ImpellerRoundingRadii *outer_radii, const ImpellerRect *inner_rect, const ImpellerRoundingRadii *inner_radii, ImpellerPaint paint)
IMPELLER_EXTERN_C void ImpellerParagraphRetain(ImpellerParagraph paragraph)
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderRelease(ImpellerDisplayListBuilder builder)
IMPELLER_EXTERN_C ImpellerColorFilter ImpellerColorFilterCreateBlendNew(const ImpellerColor *color, ImpellerBlendMode blend_mode)
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderRestoreToCount(ImpellerDisplayListBuilder builder, uint32_t count)
IMPELLER_EXTERN_C float ImpellerParagraphGetLongestLineWidth(ImpellerParagraph paragraph)
IMPELLER_EXTERN_C void ImpellerPaintSetMaskFilter(ImpellerPaint paint, ImpellerMaskFilter mask_filter)
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderSetTransform(ImpellerDisplayListBuilder builder, const ImpellerMatrix *transform)
IMPELLER_EXTERN_C uint32_t ImpellerParagraphGetLineCount(ImpellerParagraph paragraph)
IMPELLER_EXTERN_C ImpellerImageFilter ImpellerImageFilterCreateErodeNew(float x_radius, float y_radius)
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderGetTransform(ImpellerDisplayListBuilder builder, ImpellerMatrix *out_transform)
IMPELLER_EXTERN_C void ImpellerSurfaceRelease(ImpellerSurface surface)
constexpr void FromImpellerType(const Matrix &from, ImpellerMatrix &to)
static std::string ReadString(const char *string)
IMPELLER_EXTERN_C void ImpellerPaintSetColorFilter(ImpellerPaint paint, ImpellerColorFilter color_filter)
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderRotate(ImpellerDisplayListBuilder builder, float angle_degrees)
IMPELLER_EXTERN_C float ImpellerParagraphGetMaxWidth(ImpellerParagraph paragraph)
DEFINE_PEER_GETTER(ColorFilter, ImpellerColorFilter)
IMPELLER_EXTERN_C void ImpellerPathBuilderAddRoundedRect(ImpellerPathBuilder builder, const ImpellerRect *rect, const ImpellerRoundingRadii *rounding_radii)
IMPELLER_EXTERN_C float ImpellerParagraphGetIdeographicBaseline(ImpellerParagraph paragraph)
constexpr flutter::DlColor ToDisplayListType(Color color)
IMPELLER_EXTERN_C void ImpellerPaintSetDrawStyle(ImpellerPaint paint, ImpellerDrawStyle style)
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderDrawTexture(ImpellerDisplayListBuilder builder, ImpellerTexture texture, const ImpellerPoint *point, ImpellerTextureSampling sampling, ImpellerPaint paint)
IMPELLER_EXTERN_C void ImpellerPaintSetImageFilter(ImpellerPaint paint, ImpellerImageFilter image_filter)
IMPELLER_EXTERN_C void ImpellerDisplayListRelease(ImpellerDisplayList display_list)
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderClipPath(ImpellerDisplayListBuilder builder, ImpellerPath path, ImpellerClipOperation op)
IMPELLER_EXTERN_C ImpellerColorSource ImpellerColorSourceCreateConicalGradientNew(const ImpellerPoint *start_center, float start_radius, const ImpellerPoint *end_center, float end_radius, uint32_t stop_count, const ImpellerColor *colors, const float *stops, ImpellerTileMode tile_mode, const ImpellerMatrix *transformation)
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderDrawPath(ImpellerDisplayListBuilder builder, ImpellerPath path, ImpellerPaint paint)
IMPELLER_EXTERN_C void ImpellerPathBuilderAddArc(ImpellerPathBuilder builder, const ImpellerRect *oval_bounds, float start_angle_degrees, float end_angle_degrees)
IMPELLER_EXTERN_C void ImpellerDisplayListRetain(ImpellerDisplayList display_list)
IMPELLER_EXTERN_C void ImpellerParagraphStyleSetBackground(ImpellerParagraphStyle paragraph_style, ImpellerPaint paint)
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderDrawRect(ImpellerDisplayListBuilder builder, const ImpellerRect *rect, ImpellerPaint paint)
IMPELLER_EXTERN_C void ImpellerPaintSetColor(ImpellerPaint paint, const ImpellerColor *color)
IMPELLER_EXTERN_C void ImpellerParagraphBuilderAddText(ImpellerParagraphBuilder paragraph_builder, const uint8_t *data, uint32_t length)
ImpellerCallback IMPELLER_NULLABLE on_release
const uint8_t *IMPELLER_NONNULL data
ImpellerPixelFormat pixel_format
A 4x4 matrix using column-major storage.
A lightweight object that describes the attributes of a texture that can then used an allocator to cr...
CompressionType compression_type
std::shared_ptr< const fml::Mapping > data