diff --git a/framework/BUILD.gn b/framework/BUILD.gn index 4296a34160865ae07f4853cbbcc47aca54c5e5fe..be44261a962c4a76e4bf2b45a408342ec242d16f 100644 --- a/framework/BUILD.gn +++ b/framework/BUILD.gn @@ -200,8 +200,7 @@ ohos_shared_library("videoprocessingengine") { "${target_gen_dir}/../services/video_processing_service_manager_proxy.cpp", "${target_gen_dir}/../services/video_processing_service_manager_stub.cpp", "$ALGORITHM_COMMON_DIR/image_opencl_wrapper.cpp", - "$ALGORITHM_COMMON_DIR/image_openclsetup.cpp", - "$ALGORITHM_EXTENSION_SKIA_DIR/skia_impl.cpp" + "$ALGORITHM_COMMON_DIR/image_openclsetup.cpp" ] deps = [ @@ -212,7 +211,10 @@ ohos_shared_library("videoprocessingengine") { ] if (has_skia) { - deps += ["//third_party/skia:skia_ohos"] + defines += [ "SKIA_ENABLE" ] + deps += [ "//third_party/skia:skia_ohos" ] + include_dirs += [ "$ALGORITHM_EXTENSION_SKIA_DIR/include" ] + sources += [ "$ALGORITHM_EXTENSION_SKIA_DIR/skia_impl.cpp" ] } external_deps = [ @@ -350,13 +352,6 @@ ohos_shared_library("image_processing") { "samgr:samgr_proxy", ] - if (has_skia) { - defines += [ "SKIA_ENABLE" ] - external_deps += [ "skia:skia_canvaskit" ] - include_dirs += [ "$ALGORITHM_EXTENSION_SKIA_DIR/include" ] - sources += [ "$ALGORITHM_EXTENSION_SKIA_DIR/skia_impl.cpp" ] - } - innerapi_tags = [ "ndk" ] output_extension = "so" subsystem_name = "multimedia" @@ -438,13 +433,6 @@ ohos_shared_library("video_processing") { "samgr:samgr_proxy", ] - if (has_skia) { - defines += [ "SKIA_ENABLE" ] - external_deps += [ "skia:skia_canvaskit" ] - include_dirs += [ "$ALGORITHM_EXTENSION_SKIA_DIR/include" ] - sources += [ "$ALGORITHM_EXTENSION_SKIA_DIR/skia_impl.cpp" ] - } - innerapi_tags = [ "ndk" ] output_extension = "so" subsystem_name = "multimedia" diff --git a/framework/algorithm/extension_manager/include/static_extension_list.h b/framework/algorithm/extension_manager/include/static_extension_list.h index 2fad722ee806462f160f703c170e78d815fd5352..27282197488783c7ad7e5b2b627e70050d97762d 100644 --- a/framework/algorithm/extension_manager/include/static_extension_list.h +++ b/framework/algorithm/extension_manager/include/static_extension_list.h @@ -19,7 +19,9 @@ namespace OHOS::Media::VideoProcessingEngine::Extension { using RegisterExtensionFunc = void (*)(uintptr_t extensionListAddr); const std::unordered_map staticExtensionsRegisterMap = { +#ifdef SKIA_ENABLE {"Skia", RegisterSkiaExtensions}, +#endif }; } // namespace OHOS::Media::VideoProcessingEngine::Extension