Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 5be462d

Browse files
authored
[Impeller] libImpeller: Fix missing exports on some paint methods. (#55814)
cc @lyceel. I'll followup with a linker script to to verify this later.
1 parent a002104 commit 5be462d

File tree

1 file changed

+21
-12
lines changed

1 file changed

+21
-12
lines changed

impeller/toolkit/interop/impeller.cc

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,9 @@ void ImpellerPathBuilderCubicCurveTo(ImpellerPathBuilder builder,
248248
);
249249
}
250250

251-
IMPELLER_EXTERN_C void ImpellerPathBuilderAddRect(ImpellerPathBuilder builder,
252-
const ImpellerRect* rect) {
251+
IMPELLER_EXTERN_C
252+
void ImpellerPathBuilderAddRect(ImpellerPathBuilder builder,
253+
const ImpellerRect* rect) {
253254
GetPeer(builder)->AddRect(ToImpellerType(*rect));
254255
}
255256

@@ -290,9 +291,9 @@ ImpellerPath ImpellerPathBuilderCopyPathNew(ImpellerPathBuilder builder,
290291
return GetPeer(builder)->CopyPath(ToImpellerType(fill)).Leak();
291292
}
292293

293-
IMPELLER_EXTERN_C ImpellerPath ImpellerPathBuilderTakePathNew(
294-
ImpellerPathBuilder builder,
295-
ImpellerFillType fill) {
294+
IMPELLER_EXTERN_C
295+
ImpellerPath ImpellerPathBuilderTakePathNew(ImpellerPathBuilder builder,
296+
ImpellerFillType fill) {
296297
return GetPeer(builder)->TakePath(ToImpellerType(fill)).Leak();
297298
}
298299

@@ -884,27 +885,32 @@ ImpellerImageFilter ImpellerImageFilterCreateComposeNew(
884885
return ImageFilter::MakeCompose(*GetPeer(outer), *GetPeer(inner)).Leak();
885886
}
886887

888+
IMPELLER_EXTERN_C
887889
void ImpellerPaintSetColorFilter(ImpellerPaint paint,
888890
ImpellerColorFilter color_filter) {
889891
GetPeer(paint)->SetColorFilter(*GetPeer(color_filter));
890892
}
891893

894+
IMPELLER_EXTERN_C
892895
void ImpellerPaintSetColorSource(ImpellerPaint paint,
893896
ImpellerColorSource color_source) {
894897
GetPeer(paint)->SetColorSource(*GetPeer(color_source));
895898
}
896899

900+
IMPELLER_EXTERN_C
897901
void ImpellerPaintSetImageFilter(ImpellerPaint paint,
898902
ImpellerImageFilter image_filter) {
899903
GetPeer(paint)->SetImageFilter(*GetPeer(image_filter));
900904
}
901905

906+
IMPELLER_EXTERN_C
902907
void ImpellerPaintSetMaskFilter(ImpellerPaint paint,
903908
ImpellerMaskFilter mask_filter) {
904909
GetPeer(paint)->SetMaskFilter(*GetPeer(mask_filter));
905910
}
906911

907-
IMPELLER_EXTERN_C ImpellerParagraphStyle ImpellerParagraphStyleNew() {
912+
IMPELLER_EXTERN_C
913+
ImpellerParagraphStyle ImpellerParagraphStyleNew() {
908914
return Create<ParagraphStyle>().Leak();
909915
}
910916

@@ -924,9 +930,9 @@ void ImpellerParagraphStyleSetForeground(ImpellerParagraphStyle paragraph_style,
924930
GetPeer(paragraph_style)->SetForeground(Ref(GetPeer(paint)));
925931
}
926932

927-
IMPELLER_EXTERN_C void ImpellerParagraphStyleSetBackground(
928-
ImpellerParagraphStyle paragraph_style,
929-
ImpellerPaint paint) {
933+
IMPELLER_EXTERN_C
934+
void ImpellerParagraphStyleSetBackground(ImpellerParagraphStyle paragraph_style,
935+
ImpellerPaint paint) {
930936
GetPeer(paragraph_style)->SetBackground(Ref(GetPeer(paint)));
931937
}
932938

@@ -1000,7 +1006,8 @@ void ImpellerDisplayListBuilderDrawParagraph(ImpellerDisplayListBuilder builder,
10001006
GetPeer(builder)->DrawParagraph(*GetPeer(paragraph), ToImpellerType(*point));
10011007
}
10021008

1003-
IMPELLER_EXTERN_C ImpellerParagraphBuilder ImpellerParagraphBuilderNew(
1009+
IMPELLER_EXTERN_C
1010+
ImpellerParagraphBuilder ImpellerParagraphBuilderNew(
10041011
ImpellerTypographyContext context) {
10051012
auto builder = Create<ParagraphBuilder>(*GetPeer(context));
10061013
if (!builder->IsValid()) {
@@ -1048,7 +1055,8 @@ void ImpellerParagraphBuilderAddText(ImpellerParagraphBuilder paragraph_builder,
10481055
GetPeer(paragraph_builder)->AddText(data, length);
10491056
}
10501057

1051-
IMPELLER_EXTERN_C ImpellerParagraph ImpellerParagraphBuilderBuildParagraphNew(
1058+
IMPELLER_EXTERN_C
1059+
ImpellerParagraph ImpellerParagraphBuilderBuildParagraphNew(
10521060
ImpellerParagraphBuilder paragraph_builder,
10531061
float width) {
10541062
return GetPeer(paragraph_builder)->Build(width).Leak();
@@ -1104,7 +1112,8 @@ uint32_t ImpellerParagraphGetLineCount(ImpellerParagraph paragraph) {
11041112
return GetPeer(paragraph)->GetLineCount();
11051113
}
11061114

1107-
IMPELLER_EXTERN_C ImpellerTypographyContext ImpellerTypographyContextNew() {
1115+
IMPELLER_EXTERN_C
1116+
ImpellerTypographyContext ImpellerTypographyContextNew() {
11081117
auto context = Create<TypographyContext>();
11091118
if (!context->IsValid()) {
11101119
VALIDATION_LOG << "Could not create typography context.";

0 commit comments

Comments
 (0)