 |
Flutter Impeller
|
|
Go to the documentation of this file.
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});
178 ImpellerDisplayListBuilder builder) {
179 GetPeer(builder)->ResetTransform();
184 ImpellerDisplayListBuilder builder) {
185 return GetPeer(builder)->GetSaveCount();
190 ImpellerDisplayListBuilder builder,
192 GetPeer(builder)->RestoreToCount(count);
207 return Create<PathBuilder>().Leak();
236 GetPeer(builder)->QuadraticCurveTo(
ToImpellerType(*control_point),
259 float start_angle_degrees,
260 float end_angle_degrees) {
275 ImpellerPathBuilder builder,
284 GetPeer(builder)->Close();
294 ImpellerPathBuilder builder,
315 ImpellerDisplayListBuilder builder,
334 return Create<Paint>().Leak();
374 GetPeer(paint)->SetStrokeWidth(width);
379 GetPeer(paint)->SetStrokeMiter(miter);
384 ImpellerPaint paint) {
385 GetPeer(builder)->DrawPaint(*GetPeer(paint));
392 ImpellerPaint paint) {
401 ImpellerDisplayListBuilder builder,
406 ImpellerPaint paint) {
418 ImpellerPaint paint) {
419 GetPeer(builder)->DrawRect(
ToImpellerType(*rect), *GetPeer(paint));
425 ImpellerPaint paint) {
426 GetPeer(builder)->DrawOval(
ToImpellerType(*oval_bounds), *GetPeer(paint));
431 ImpellerDisplayListBuilder builder,
434 ImpellerPaint paint) {
443 ImpellerDisplayListBuilder builder,
448 ImpellerPaint paint) {
449 GetPeer(builder)->DrawRoundedRectDifference(
ToImpellerType(*outer_rect),
460 ImpellerPaint paint) {
461 GetPeer(builder)->DrawPath(*GetPeer(path), *GetPeer(paint));
466 ImpellerContext context,
469 void* contents_on_release_user_data) {
478 auto texture = Create<Texture>(*GetPeer(context), desc);
479 if (!texture->IsValid()) {
487 auto wrapped_contents = std::make_shared<fml::NonOwnedMapping>(
490 [contents, contents_on_release_user_data](
auto,
auto) {
491 contents->on_release(contents_on_release_user_data);
494 if (!texture->SetContents(std::move(wrapped_contents))) {
500 if (!texture->SetContents(contents->
data, contents->
length)) {
505 return texture.Leak();
510 ImpellerContext context,
512 uint64_t external_gl_handle) {
513 auto impeller_context = GetPeer(context)->GetContext();
514 if (impeller_context->GetBackendType() !=
521 const auto& reactor = impeller_context_gl.GetReactor();
523 auto wrapped_external_gl_handle =
525 if (wrapped_external_gl_handle.IsDead()) {
538 auto texture = std::make_shared<TextureGLES>(reactor,
540 wrapped_external_gl_handle
542 if (!texture || !texture->IsValid()) {
564 auto interop_texture = GetPeer(texture);
565 if (interop_texture->GetBackendType() !=
567 VALIDATION_LOG <<
"Can only fetch the texture handle of an OpenGL texture.";
587 ImpellerDisplayListBuilder builder) {
588 auto dl = GetPeer(builder)->Build();
589 if (!dl->IsValid()) {
597 ImpellerDisplayListBuilder builder,
598 ImpellerDisplayList display_list,
600 GetPeer(builder)->DrawDisplayList(*GetPeer(display_list), opacity);
627 ImpellerDisplayList display_list) {
628 return GetPeer(surface)->DrawDisplayList(*GetPeer(display_list));
633 ImpellerTexture texture,
636 ImpellerPaint paint) {
637 GetPeer(builder)->DrawTexture(*GetPeer(texture),
646 ImpellerDisplayListBuilder builder,
647 ImpellerTexture texture,
651 ImpellerPaint paint) {
652 GetPeer(builder)->DrawTextureRect(*GetPeer(texture),
670 static std::pair<std::vector<flutter::DlColor>, std::vector<Scalar>>
673 const float* stops) {
674 if (stop_count == 0) {
677 std::pair<std::vector<flutter::DlColor>, std::vector<Scalar>> result;
678 result.first.reserve(stop_count);
679 result.second.reserve(stop_count);
680 for (
size_t i = 0; i < stop_count; i++) {
682 result.second.emplace_back(stops[i]);
700 colors_and_stops.first,
701 colors_and_stops.second,
703 transformation ==
nullptr ?
Matrix{}
722 colors_and_stops.first,
723 colors_and_stops.second,
725 transformation ==
nullptr ?
Matrix{}
748 colors_and_stops.first,
749 colors_and_stops.second,
751 transformation ==
nullptr ?
Matrix{}
772 colors_and_stops.first,
773 colors_and_stops.second,
775 transformation ==
nullptr ?
Matrix{}
864 ImpellerImageFilter outer,
865 ImpellerImageFilter inner) {
870 ImpellerColorFilter color_filter) {
871 GetPeer(paint)->SetColorFilter(*GetPeer(color_filter));
875 ImpellerColorSource color_source) {
876 GetPeer(paint)->SetColorSource(*GetPeer(color_source));
880 ImpellerImageFilter image_filter) {
881 GetPeer(paint)->SetImageFilter(*GetPeer(image_filter));
886 GetPeer(paint)->SetMaskFilter(*GetPeer(
mask_filter));
890 return Create<ParagraphStyle>().Leak();
905 ImpellerPaint paint) {
906 GetPeer(paragraph_style)->SetForeground(
Ref(GetPeer(paint)));
910 ImpellerParagraphStyle paragraph_style,
911 ImpellerPaint paint) {
912 GetPeer(paragraph_style)->SetBackground(
Ref(GetPeer(paint)));
918 GetPeer(paragraph_style)->SetFontWeight(
ToTxtType(weight));
924 GetPeer(paragraph_style)->SetFontStyle(
ToTxtType(style));
928 if (
string ==
nullptr) {
931 return std::string{
string};
936 const char* family_name) {
937 GetPeer(paragraph_style)->SetFontFamily(
ReadString(family_name));
943 GetPeer(paragraph_style)->SetFontSize(size);
949 GetPeer(paragraph_style)->SetHeight(height);
954 ImpellerParagraphStyle paragraph_style,
956 GetPeer(paragraph_style)->SetTextAlignment(
ToTxtType(align));
961 ImpellerParagraphStyle paragraph_style,
963 GetPeer(paragraph_style)->SetTextDirection(
ToTxtType(direction));
968 uint32_t max_lines) {
969 GetPeer(paragraph_style)->SetMaxLines(max_lines);
974 const char* locale) {
975 GetPeer(paragraph_style)->SetLocale(
ReadString(locale));
980 ImpellerParagraph paragraph,
982 GetPeer(builder)->DrawParagraph(*GetPeer(paragraph),
ToImpellerType(*point));
986 ImpellerTypographyContext context) {
987 auto builder = Create<ParagraphBuilder>(*GetPeer(context));
988 if (!builder->IsValid()) {
992 return builder.Leak();
997 ImpellerParagraphBuilder paragraph_builder) {
1003 ImpellerParagraphBuilder paragraph_builder) {
1009 ImpellerParagraphBuilder paragraph_builder,
1010 ImpellerParagraphStyle style) {
1011 GetPeer(paragraph_builder)->PushStyle(*GetPeer(style));
1016 ImpellerParagraphBuilder paragraph_builder) {
1017 GetPeer(paragraph_builder)->PopStyle();
1022 const uint8_t*
data,
1024 if (
data ==
nullptr) {
1030 GetPeer(paragraph_builder)->AddText(
data, length);
1034 ImpellerParagraphBuilder paragraph_builder,
1036 return GetPeer(paragraph_builder)->Build(width).Leak();
1051 return GetPeer(paragraph)->GetMaxWidth();
1056 return GetPeer(paragraph)->GetHeight();
1061 return GetPeer(paragraph)->GetLongestLineWidth();
1066 return GetPeer(paragraph)->GetMinIntrinsicWidth();
1071 return GetPeer(paragraph)->GetMaxIntrinsicWidth();
1076 return GetPeer(paragraph)->GetIdeographicBaseline();
1081 return GetPeer(paragraph)->GetAlphabeticBaseline();
1086 return GetPeer(paragraph)->GetLineCount();
1090 auto context = Create<TypographyContext>();
1091 if (!context->IsValid()) {
1095 return Create<TypographyContext>().Leak();
IMPELLER_EXTERN_C float ImpellerParagraphGetMaxIntrinsicWidth(ImpellerParagraph paragraph)
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderDrawRoundedRect(ImpellerDisplayListBuilder builder, const ImpellerRect *rect, const ImpellerRoundingRadii *radii, ImpellerPaint paint)
IMPELLER_EXTERN_C ImpellerImageFilter ImpellerImageFilterCreateMatrixNew(const ImpellerMatrix *matrix, ImpellerTextureSampling sampling)
void ImpellerPaintSetMaskFilter(ImpellerPaint paint, ImpellerMaskFilter mask_filter)
constexpr flutter::DlColor ToDisplayListType(Color color)
IMPELLER_EXTERN_C void ImpellerParagraphBuilderRetain(ImpellerParagraphBuilder paragraph_builder)
IMPELLER_EXTERN_C void ImpellerParagraphRelease(ImpellerParagraph paragraph)
IMPELLER_EXTERN_C void ImpellerPaintRetain(ImpellerPaint paint)
IMPELLER_EXTERN_C ImpellerContext ImpellerContextCreateOpenGLESNew(uint32_t version, ImpellerProcAddressCallback gl_proc_address_callback, void *gl_proc_address_callback_user_data)
IMPELLER_EXTERN_C void ImpellerImageFilterRetain(ImpellerImageFilter image_filter)
static ScopedObject< MaskFilter > MakeBlur(flutter::DlBlurStyle style, float sigma)
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderRestoreToCount(ImpellerDisplayListBuilder builder, uint32_t count)
IMPELLER_EXTERN_C void ImpellerPaintSetBlendMode(ImpellerPaint paint, ImpellerBlendMode mode)
IMPELLER_EXTERN_C void ImpellerPathRelease(ImpellerPath path)
IMPELLER_EXTERN_C void ImpellerParagraphStyleSetLocale(ImpellerParagraphStyle paragraph_style, const char *locale)
IMPELLER_EXTERN_C void ImpellerPathBuilderAddOval(ImpellerPathBuilder builder, const ImpellerRect *oval_bounds)
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderRetain(ImpellerDisplayListBuilder builder)
static ScopedObject< ImageFilter > MakeMatrix(const Matrix &matrix, flutter::DlImageSampling sampling)
IMPELLER_EXTERN_C ImpellerParagraphBuilder ImpellerParagraphBuilderNew(ImpellerTypographyContext context)
IMPELLER_EXTERN_C void ImpellerPaintSetStrokeWidth(ImpellerPaint paint, float width)
constexpr void FromImpellerType(const Matrix &from, ImpellerMatrix &to)
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderRelease(ImpellerDisplayListBuilder builder)
IMPELLER_EXTERN_C ImpellerTexture ImpellerTextureCreateWithContentsNew(ImpellerContext context, const ImpellerTextureDescriptor *descriptor, const ImpellerMapping *contents, void *contents_on_release_user_data)
static void SafeRelease(void *ptr)
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderDrawDashedLine(ImpellerDisplayListBuilder builder, const ImpellerPoint *from, const ImpellerPoint *to, float on_length, float off_length, ImpellerPaint paint)
IMPELLER_EXTERN_C ImpellerTypographyContext ImpellerTypographyContextNew()
ImpellerCallback IMPELLER_NULLABLE on_release
IMPELLER_EXTERN_C ImpellerColorFilter ImpellerColorFilterCreateBlendNew(const ImpellerColor *color, ImpellerBlendMode blend_mode)
std::shared_ptr< const fml::Mapping > data
static std::pair< std::vector< flutter::DlColor >, std::vector< Scalar > > ParseColorsAndStops(uint32_t stop_count, const ImpellerColor *colors, const float *stops)
IMPELLER_EXTERN_C float ImpellerParagraphGetMinIntrinsicWidth(ImpellerParagraph paragraph)
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderGetTransform(ImpellerDisplayListBuilder builder, ImpellerMatrix *out_transform)
IMPELLER_EXTERN_C void ImpellerPathRetain(ImpellerPath path)
IMPELLER_EXTERN_C void ImpellerParagraphRetain(ImpellerParagraph paragraph)
IMPELLER_EXTERN_C void ImpellerParagraphBuilderAddText(ImpellerParagraphBuilder paragraph_builder, const uint8_t *data, uint32_t length)
std::optional< GLuint > GetGLHandle() const
IMPELLER_EXTERN_C void ImpellerParagraphBuilderPopStyle(ImpellerParagraphBuilder paragraph_builder)
IMPELLER_EXTERN_C void ImpellerPathBuilderQuadraticCurveTo(ImpellerPathBuilder builder, const ImpellerPoint *control_point, const ImpellerPoint *end_point)
void ImpellerPaintSetImageFilter(ImpellerPaint paint, ImpellerImageFilter image_filter)
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 ImpellerPathBuilderRetain(ImpellerPathBuilder builder)
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 ImpellerColorFilterRetain(ImpellerColorFilter color_filter)
IMPELLER_EXTERN_C void ImpellerParagraphStyleSetFontSize(ImpellerParagraphStyle paragraph_style, float size)
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderDrawTexture(ImpellerDisplayListBuilder builder, ImpellerTexture texture, const ImpellerPoint *point, ImpellerTextureSampling sampling, ImpellerPaint paint)
IMPELLER_EXTERN_C ImpellerSurface ImpellerSurfaceCreateWrappedFBONew(ImpellerContext context, uint64_t fbo, ImpellerPixelFormat format, const ImpellerISize *size)
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)
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderTranslate(ImpellerDisplayListBuilder builder, float x_translation, float y_translation)
IMPELLER_EXTERN_C void ImpellerPathBuilderRelease(ImpellerPathBuilder builder)
IMPELLER_EXTERN_C uint32_t ImpellerParagraphGetLineCount(ImpellerParagraph paragraph)
IMPELLER_EXTERN_C void ImpellerParagraphStyleRetain(ImpellerParagraphStyle paragraph_style)
IMPELLER_EXTERN_C uint32_t ImpellerGetVersion()
IMPELLER_EXTERN_C bool ImpellerSurfaceDrawDisplayList(ImpellerSurface surface, ImpellerDisplayList display_list)
IMPELLER_EXTERN_C void ImpellerPathBuilderAddArc(ImpellerPathBuilder builder, const ImpellerRect *oval_bounds, float start_angle_degrees, float end_angle_degrees)
IMPELLER_EXTERN_C void ImpellerParagraphStyleSetFontStyle(ImpellerParagraphStyle paragraph_style, ImpellerFontStyle style)
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderRestore(ImpellerDisplayListBuilder builder)
IMPELLER_EXTERN_C void ImpellerParagraphStyleSetFontFamily(ImpellerParagraphStyle paragraph_style, const char *family_name)
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderScale(ImpellerDisplayListBuilder builder, float x_scale, float y_scale)
IMPELLER_EXTERN_C void ImpellerParagraphStyleSetMaxLines(ImpellerParagraphStyle paragraph_style, uint32_t max_lines)
IMPELLER_EXTERN_C void ImpellerPathBuilderAddRoundedRect(ImpellerPathBuilder builder, const ImpellerRect *rect, const ImpellerRoundingRadii *rounding_radii)
DEFINE_PEER_GETTER(ColorFilter, ImpellerColorFilter)
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderDrawPath(ImpellerDisplayListBuilder builder, ImpellerPath path, ImpellerPaint paint)
void ImpellerPaintSetColorFilter(ImpellerPaint paint, ImpellerColorFilter color_filter)
IMPELLER_EXTERN_C void ImpellerParagraphStyleSetHeight(ImpellerParagraphStyle paragraph_style, float height)
IMPELLER_EXTERN_C float ImpellerParagraphGetMaxWidth(ImpellerParagraph paragraph)
IMPELLER_EXTERN_C void ImpellerPaintSetColor(ImpellerPaint paint, const ImpellerColor *color)
IMPELLER_EXTERN_C void ImpellerTextureRelease(ImpellerTexture texture)
IMPELLER_EXTERN_C void ImpellerPaintSetDrawStyle(ImpellerPaint paint, ImpellerDrawStyle style)
IMPELLER_EXTERN_C void ImpellerParagraphBuilderPushStyle(ImpellerParagraphBuilder paragraph_builder, ImpellerParagraphStyle style)
IMPELLER_EXTERN_C ImpellerMaskFilter ImpellerMaskFilterCreateBlurNew(ImpellerBlurStyle style, float sigma)
constexpr txt::FontWeight ToTxtType(ImpellerFontWeight weight)
void ImpellerPaintSetColorSource(ImpellerPaint paint, ImpellerColorSource color_source)
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderClipPath(ImpellerDisplayListBuilder builder, ImpellerPath path, ImpellerClipOperation op)
IMPELLER_EXTERN_C ImpellerImageFilter ImpellerImageFilterCreateBlurNew(float x_sigma, float y_sigma, ImpellerTileMode tile_mode)
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderDrawOval(ImpellerDisplayListBuilder builder, const ImpellerRect *oval_bounds, ImpellerPaint paint)
IMPELLER_EXTERN_C ImpellerTexture ImpellerTextureCreateWithOpenGLTextureHandleNew(ImpellerContext context, const ImpellerTextureDescriptor *descriptor, uint64_t external_gl_handle)
IMPELLER_EXTERN_C ImpellerDisplayList ImpellerDisplayListBuilderCreateDisplayListNew(ImpellerDisplayListBuilder builder)
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)
static ScopedObject< ImageFilter > MakeErode(Scalar x_radius, Scalar y_radius)
IMPELLER_EXTERN_C void ImpellerContextRetain(ImpellerContext context)
IMPELLER_EXTERN_C uint32_t ImpellerDisplayListBuilderGetSaveCount(ImpellerDisplayListBuilder builder)
ScopedObject< Object > Ref(Object *object)
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 ImpellerColorSourceRelease(ImpellerColorSource color_source)
#define IMPELLER_VERSION_GET_VARIANT(version)
IMPELLER_EXTERN_C void ImpellerPathBuilderLineTo(ImpellerPathBuilder builder, const ImpellerPoint *location)
IMPELLER_EXTERN_C void ImpellerMaskFilterRetain(ImpellerMaskFilter mask_filter)
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderDrawParagraph(ImpellerDisplayListBuilder builder, ImpellerParagraph paragraph, const ImpellerPoint *point)
IMPELLER_EXTERN_C ImpellerPathBuilder ImpellerPathBuilderNew()
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderClipOval(ImpellerDisplayListBuilder builder, const ImpellerRect *oval_bounds, ImpellerClipOperation op)
IMPELLER_EXTERN_C void ImpellerMaskFilterRelease(ImpellerMaskFilter mask_filter)
IMPELLER_EXTERN_C void ImpellerParagraphStyleSetTextDirection(ImpellerParagraphStyle paragraph_style, ImpellerTextDirection direction)
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderRotate(ImpellerDisplayListBuilder builder, float angle_degrees)
IMPELLER_EXTERN_C void ImpellerParagraphStyleRelease(ImpellerParagraphStyle paragraph_style)
IMPELLER_EXTERN_C void ImpellerDisplayListRelease(ImpellerDisplayList display_list)
IMPELLER_EXTERN_C void ImpellerPathBuilderClose(ImpellerPathBuilder builder)
IMPELLER_EXTERN_C void ImpellerTextureRetain(ImpellerTexture texture)
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderResetTransform(ImpellerDisplayListBuilder builder)
IMPELLER_EXTERN_C float ImpellerParagraphGetAlphabeticBaseline(ImpellerParagraph paragraph)
IMPELLER_EXTERN_C void ImpellerPathBuilderCubicCurveTo(ImpellerPathBuilder builder, const ImpellerPoint *control_point_1, const ImpellerPoint *control_point_2, const ImpellerPoint *end_point)
IMPELLER_EXTERN_C ImpellerDisplayListBuilder ImpellerDisplayListBuilderNew(const ImpellerRect *cull_rect)
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderSetTransform(ImpellerDisplayListBuilder builder, const ImpellerMatrix *transform)
constexpr Matrix ToImpellerType(const ImpellerMatrix &m)
IMPELLER_EXTERN_C void ImpellerPathBuilderAddRect(ImpellerPathBuilder builder, const ImpellerRect *rect)
IMPELLER_EXTERN_C ImpellerImageFilter ImpellerImageFilterCreateErodeNew(float x_radius, float y_radius)
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderDrawLine(ImpellerDisplayListBuilder builder, const ImpellerPoint *from, const ImpellerPoint *to, ImpellerPaint paint)
IMPELLER_EXTERN_C void ImpellerContextRelease(ImpellerContext context)
IMPELLER_EXTERN_C float ImpellerParagraphGetIdeographicBaseline(ImpellerParagraph paragraph)
#define IMPELLER_EXTERN_C
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)
#define IMPELLER_VERSION_GET_PATCH(version)
IMPELLER_EXTERN_C void ImpellerPaintSetStrokeCap(ImpellerPaint paint, ImpellerStrokeCap cap)
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderClipRoundedRect(ImpellerDisplayListBuilder builder, const ImpellerRect *rect, const ImpellerRoundingRadii *radii, ImpellerClipOperation op)
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderDrawRect(ImpellerDisplayListBuilder builder, const ImpellerRect *rect, ImpellerPaint paint)
IMPELLER_EXTERN_C void ImpellerPaintSetStrokeJoin(ImpellerPaint paint, ImpellerStrokeJoin join)
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderDrawDisplayList(ImpellerDisplayListBuilder builder, ImpellerDisplayList display_list, float opacity)
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderSave(ImpellerDisplayListBuilder builder)
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)
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderSaveLayer(ImpellerDisplayListBuilder builder, const ImpellerRect *bounds, ImpellerPaint paint, ImpellerImageFilter backdrop)
#define IMPELLER_VERSION_GET_MINOR(version)
ImpellerPixelFormat pixel_format
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)
IMPELLER_EXTERN_C void ImpellerColorSourceRetain(ImpellerColorSource color_source)
IMPELLER_EXTERN_C float ImpellerParagraphGetLongestLineWidth(ImpellerParagraph paragraph)
IMPELLER_EXTERN_C void ImpellerImageFilterRelease(ImpellerImageFilter image_filter)
std::shared_ptr< DlMaskFilter > mask_filter
static ScopedObject< ColorFilter > MakeBlend(Color color, BlendMode mode)
IMPELLER_EXTERN_C void ImpellerParagraphStyleSetTextAlignment(ImpellerParagraphStyle paragraph_style, ImpellerTextAlignment align)
static ScopedObject< Context > CreateOpenGLES(std::function< void *(const char *gl_proc_name)> proc_address_callback)
IMPELLER_EXTERN_C void ImpellerDisplayListRetain(ImpellerDisplayList display_list)
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 void ImpellerDisplayListBuilderDrawPaint(ImpellerDisplayListBuilder builder, ImpellerPaint paint)
IMPELLER_EXTERN_C ImpellerColorFilter ImpellerColorFilterCreateColorMatrixNew(const ImpellerColorMatrix *color_matrix)
static ScopedObject< Surface > WrapFBO(Context &context, uint64_t fbo, PixelFormat color_format, ISize size)
IMPELLER_EXTERN_C ImpellerPath ImpellerPathBuilderCopyPathNew(ImpellerPathBuilder builder, ImpellerFillType fill)
IMPELLER_EXTERN_C ImpellerImageFilter ImpellerImageFilterCreateDilateNew(float x_radius, float y_radius)
static ContextGLES & Cast(Context &base)
IMPELLER_EXTERN_C void ImpellerParagraphStyleSetBackground(ImpellerParagraphStyle paragraph_style, ImpellerPaint paint)
static std::string ReadString(const char *string)
IMPELLER_EXTERN_C void ImpellerParagraphBuilderRelease(ImpellerParagraphBuilder paragraph_builder)
IMPELLER_EXTERN_C void ImpellerParagraphStyleSetFontWeight(ImpellerParagraphStyle paragraph_style, ImpellerFontWeight weight)
IMPELLER_EXTERN_C uint64_t ImpellerTextureGetOpenGLHandle(ImpellerTexture texture)
IMPELLER_EXTERN_C void ImpellerSurfaceRelease(ImpellerSurface surface)
IMPELLER_EXTERN_C void ImpellerPaintSetStrokeMiter(ImpellerPaint paint, float miter)
const uint8_t *IMPELLER_NONNULL data
A lightweight object that describes the attributes of a texture that can then used an allocator to cr...
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderClipRect(ImpellerDisplayListBuilder builder, const ImpellerRect *rect, ImpellerClipOperation op)
static ScopedObject< ColorFilter > MakeMatrix(const float matrix[20])
static void SafeRetain(void *ptr)
IMPELLER_EXTERN_C void ImpellerSurfaceRetain(ImpellerSurface surface)
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)
IMPELLER_EXTERN_C ImpellerPath ImpellerPathBuilderTakePathNew(ImpellerPathBuilder builder, ImpellerFillType fill)
IMPELLER_EXTERN_C void ImpellerParagraphStyleSetForeground(ImpellerParagraphStyle paragraph_style, ImpellerPaint paint)
IMPELLER_EXTERN_C void ImpellerPathBuilderMoveTo(ImpellerPathBuilder builder, const ImpellerPoint *location)
static std::string GetVersionAsString(uint32_t version)
void *IMPELLER_NULLABLE(* ImpellerProcAddressCallback)(const char *IMPELLER_NONNULL proc_name, void *IMPELLER_NULLABLE user_data)
IMPELLER_EXTERN_C ImpellerParagraphStyle ImpellerParagraphStyleNew()
CompressionType compression_type
static ScopedObject< ImageFilter > MakeDilate(Scalar x_radius, Scalar y_radius)
static ScopedObject< ImageFilter > MakeBlur(Scalar x_sigma, Scalar y_sigma, flutter::DlTileMode tile_mode)
IMPELLER_EXTERN_C void ImpellerPaintRelease(ImpellerPaint paint)
IMPELLER_EXTERN_C ImpellerParagraph ImpellerParagraphBuilderBuildParagraphNew(ImpellerParagraphBuilder paragraph_builder, float width)
IMPELLER_EXTERN_C void ImpellerTypographyContextRelease(ImpellerTypographyContext context)
#define IMPELLER_VERSION_GET_MAJOR(version)
A 4x4 matrix using column-major storage.
static ScopedObject< ImageFilter > MakeCompose(const ImageFilter &outer, const ImageFilter &inner)
IMPELLER_EXTERN_C ImpellerImageFilter ImpellerImageFilterCreateComposeNew(ImpellerImageFilter outer, ImpellerImageFilter inner)
IMPELLER_EXTERN_C void ImpellerColorFilterRelease(ImpellerColorFilter color_filter)
IMPELLER_EXTERN_C ImpellerPaint ImpellerPaintNew()
IMPELLER_EXTERN_C float ImpellerParagraphGetHeight(ImpellerParagraph paragraph)
IMPELLER_EXTERN_C void ImpellerTypographyContextRetain(ImpellerTypographyContext context)