Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ group("unittests") {
"//flutter/impeller:impeller_dart_unittests",
"//flutter/impeller:impeller_unittests",
"//flutter/impeller/toolkit/interop:example",
"//flutter/impeller/toolkit/interop:library",
]
}

Expand Down
18 changes: 10 additions & 8 deletions impeller/toolkit/interop/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@

import("//flutter/impeller/tools/impeller.gni")

impeller_component("interop_public") {
public = [ "impeller.h" ]

sources = [ "impeller_c.c" ]
}

impeller_component("interop") {
sources = [
"color_filter.cc",
Expand All @@ -27,6 +21,8 @@ impeller_component("interop") {
"image_filter.cc",
"image_filter.h",
"impeller.cc",
"impeller.h",
"impeller_c.c",
"mask_filter.cc",
"mask_filter.h",
"object.cc",
Expand All @@ -43,8 +39,6 @@ impeller_component("interop") {
"texture.h",
]

public_deps = [ ":interop_public" ]

deps = [
"../../base",
"../../display_list",
Expand All @@ -55,6 +49,14 @@ impeller_component("interop") {
]
}

impeller_component("library") {
target_type = "shared_library"

output_name = "impeller"

deps = [ ":interop" ]
}

impeller_component("example") {
target_type = "executable"

Expand Down
12 changes: 10 additions & 2 deletions impeller/toolkit/interop/impeller.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,17 @@
#define IMPELLER_EXTERN_C_END
#endif // defined(__cplusplus)

#ifndef IMPELLER_EXPORT
#ifdef _WIN32
#define IMPELLER_EXPORT_DECORATION __declspec(dllexport)
#else
#define IMPELLER_EXPORT_DECORATION __attribute__((visibility("default")))
#endif

#ifndef IMPELLER_NO_EXPORT
#define IMPELLER_EXPORT IMPELLER_EXPORT_DECORATION
#else // IMPELLER_NO_EXPORT
#define IMPELLER_EXPORT
#endif // IMPELLER_EXPORT
#endif // IMPELLER_NO_EXPORT

#ifdef __clang__
#define IMPELLER_NULLABLE _Nullable
Expand Down