fix compile issue

Signed-off-by: HengmingWang <wanghengming@huawei.com>
This commit is contained in:
HengmingWang 2024-04-08 15:10:08 +08:00
parent e75b98671d
commit ba5e6558a8
33 changed files with 92 additions and 84 deletions

View File

@ -88,20 +88,19 @@
"vulkan-headers",
"hiview",
"battery_manager",
"cJSON"
"cJSON",
"jsoncpp",
"openssl"
],
"third_party": [
"flutter",
"libuv",
"openssl",
"libxml2",
"bounds_checking_function",
"icu",
"libpng",
"zlib",
"skia",
"cJSON",
"jsoncpp",
"egl",
"opengles",
"vulkan-headers",

View File

@ -30,7 +30,6 @@ config("local_drawing_config") {
include_dirs = [
"../drawing",
"../../../../../../../multimedia/image_framework/interfaces/innerkits/include/",
"../../../../../rosen/modules/2d_graphics/include",
"../../../../../rosen/modules/2d_graphics/src/drawing/engine_adapter",
]

View File

@ -17,8 +17,8 @@
#include <cstdint>
#include "../js_drawing_utils.h"
#include "../color_filter_napi/js_color_filter.h"
#include "js_drawing_utils.h"
#include "color_filter_napi/js_color_filter.h"
namespace OHOS::Rosen {
namespace Drawing {

View File

@ -13,26 +13,29 @@
* limitations under the License.
*/
#include <mutex>
#include "js_canvas.h"
#include "../brush_napi/js_brush.h"
#include "../pen_napi/js_pen.h"
#include "../path_napi/js_path.h"
#include "../text_blob_napi/js_text_blob.h"
#include "../js_drawing_utils.h"
#include "native_value.h"
#include <mutex>
#ifdef ROSEN_OHOS
#include "pixel_map.h"
#include "pixel_map_napi.h"
#endif
#include "native_value.h"
#include "draw/canvas.h"
#include "image/image.h"
#include "draw/path.h"
#include "image/image.h"
#include "text/text.h"
#include "text/text_blob.h"
#include "utils/point.h"
#include "utils/sampling_options.h"
#include "utils/rect.h"
#include "utils/sampling_options.h"
#include "brush_napi/js_brush.h"
#include "pen_napi/js_pen.h"
#include "path_napi/js_path.h"
#include "text_blob_napi/js_text_blob.h"
#include "js_drawing_utils.h"
namespace OHOS::Rosen {
#ifdef ROSEN_OHOS

View File

@ -14,10 +14,11 @@
*/
#include "js_color_filter.h"
#include "../js_drawing_utils.h"
#include "native_value.h"
#include "draw/color.h"
#include "js_drawing_utils.h"
namespace OHOS::Rosen {
namespace Drawing {

View File

@ -13,15 +13,16 @@
* limitations under the License.
*/
#include "js_enum.h"
#include <map>
#include <vector>
#include "native_value.h"
#include "draw/blend_mode.h"
#include "text/font_types.h"
#include "js_enum.h"
#include "../js_drawing_utils.h"
#include "native_value.h"
#include "js_drawing_utils.h"
#ifdef WINDOWS_PLATFORM
#ifdef DIFFERENCE

View File

@ -14,10 +14,12 @@
*/
#include "js_font.h"
#include "js_typeface.h"
#include "../js_drawing_utils.h"
#include "native_value.h"
#include "js_drawing_utils.h"
#include "js_typeface.h"
namespace OHOS::Rosen {
namespace Drawing {
thread_local napi_ref JsFont::constructor_ = nullptr;

View File

@ -14,9 +14,11 @@
*/
#include "js_typeface.h"
#include "../js_drawing_utils.h"
#include "native_value.h"
#include "js_drawing_utils.h"
namespace OHOS::Rosen {
namespace Drawing {
thread_local napi_ref JsTypeface::constructor_ = nullptr;

View File

@ -14,9 +14,11 @@
*/
#include "js_path.h"
#include "../js_drawing_utils.h"
#include "native_value.h"
#include "js_drawing_utils.h"
namespace OHOS::Rosen {
namespace Drawing {
thread_local napi_ref JsPath::constructor_ = nullptr;

View File

@ -17,8 +17,8 @@
#include <cstdint>
#include "../js_drawing_utils.h"
#include "../color_filter_napi/js_color_filter.h"
#include "js_drawing_utils.h"
#include "color_filter_napi/js_color_filter.h"
namespace OHOS::Rosen {
namespace Drawing {

View File

@ -14,10 +14,12 @@
*/
#include "js_text_blob.h"
#include "../js_drawing_utils.h"
#include "native_value.h"
#include "../font_napi/js_font.h"
#include "../js_common.h"
#include "js_common.h"
#include "js_drawing_utils.h"
#include "font_napi/js_font.h"
namespace OHOS::Rosen {
namespace Drawing {

View File

@ -211,7 +211,6 @@ template("graphics2d_source_set") {
"$drawing_core_src_dir/engine_adapter",
"$ace_root/frameworks",
"$rosen_root/modules/render_service_base/include",
"//third_party/bounds_checking_function/include",
"//third_party/skia/include/core",
"//third_party/skia/include/private",
"//third_party/skia/src/core",
@ -221,7 +220,7 @@ template("graphics2d_source_set") {
"$rosen_root/../interfaces/kits/napi/graphic/drawing/common_napi",
]
configs = [ "//third_party/jsoncpp:jsoncpp_public_config" ]
external_deps += [ "jsoncpp:jsoncpp" ]
defines += [ "USE_ACE_SKIA" ]
@ -243,7 +242,6 @@ template("graphics2d_source_set") {
"$rosen_root/modules/2d_engine/rosen_text",
"$rosen_root/modules/2d_engine/rosen_text/adapter",
"$rosen_root/modules/2d_engine/rosen_text/export",
"//third_party/bounds_checking_function/include",
"$platform_dir/image_native",
]
if (defined(use_new_skia) && use_new_skia) {
@ -274,13 +272,11 @@ template("graphics2d_source_set") {
}
if (platform == "ohos" || platform == "ohos_ng") {
external_deps += [
"bounds_checking_function:libsec_static",
"hilog:libhilog",
"hitrace:hitrace_meter",
]
deps = [
"//third_party/bounds_checking_function:libsec_static",
"//third_party/skia:skia_$platform",
]
deps = [ "//third_party/skia:skia_$platform" ]
defines += [ "USE_GRAPHIC_TEXT_GINE" ]
deps += [ "$graphic_2d_root/rosen/build/icu:rosen_libicu_$platform" ]
include_dirs += [ "$flutter_root/engine" ]
@ -312,7 +308,7 @@ template("graphics2d_source_set") {
deps += [ "$rosen_root/modules/platform:hilog" ]
}
deps += [ "//third_party/bounds_checking_function:libsec_static" ]
external_deps += [ "bounds_checking_function:libsec_static" ]
deps += [ "$graphic_2d_root/utils:sandbox_utils" ]
defines += [ "MODULE_DRAWING" ]
@ -403,7 +399,7 @@ if (enable_text_gine) {
"$rosen_root/modules/texgine/texgine_drawing:libtexgine_drawing",
]
external_deps = [ "hilog:libhilog" ]
public_deps = [ "//third_party/bounds_checking_function:libsec_static" ]
public_external_deps = [ "bounds_checking_function:libsec_static" ]
defines += [ "USE_GRAPHIC_TEXT_GINE" ]
public_configs = [ ":2d_graphics_config" ]
innerapi_tags = [ "platformsdk_indirect" ]

View File

@ -102,8 +102,6 @@ template("drawing_ndk_source_set") {
"$drawing_utils_root",
"$graphic_2d_root/rosen/modules/render_service_base/include",
"$rosen_root/modules/texgine/src",
"//foundation/multimedia/image_framework/interfaces/kits/js/common/include/",
"//foundation/multimedia/image_framework/interfaces/kits/native/include/",
"//foundation/multimedia/image_framework/interfaces/innerkits/include/mdkKits/",
]
@ -117,7 +115,6 @@ template("drawing_ndk_source_set") {
"$rosen_root/modules/2d_engine/rosen_text",
"$rosen_root/modules/2d_engine/rosen_text/adapter",
"$rosen_root/modules/2d_engine/rosen_text/export",
"//third_party/bounds_checking_function/include",
]
} else {
include_dirs += [
@ -129,13 +126,13 @@ template("drawing_ndk_source_set") {
if (platform == "ohos" || platform == "ohos_ng") {
defines += [ "OHOS_PLATFORM" ]
external_deps += [
"bounds_checking_function:libsec_static",
"hilog:libhilog",
"image_framework:image_native",
"image_framework:pixelmap_ndk",
]
deps = [ "//third_party/bounds_checking_function:libsec_static" ]
deps += [ "$graphic_2d_root/rosen/build/icu:rosen_libicu_$platform" ]
deps = [ "$graphic_2d_root/rosen/build/icu:rosen_libicu_$platform" ]
include_dirs += [ "$flutter_root/engine" ]
if (enable_text_gine && use_texgine) {
@ -155,7 +152,7 @@ template("drawing_ndk_source_set") {
deps += [ "$rosen_root/modules/platform:hilog" ]
}
deps += [ "//third_party/bounds_checking_function:libsec_static" ]
external_deps += [ "bounds_checking_function:libsec_static" ]
defines += [ "MODULE_DRAWING" ]
defines += [ "USE_GRAPHIC_TEXT_GINE" ]

View File

@ -27,9 +27,9 @@ ohos_source_set("render_frame_trace") {
cflags += [ "-fwhole-program-vtables" ]
}
}
deps = [ "//third_party/jsoncpp:jsoncpp" ]
external_deps = [ "jsoncpp:jsoncpp" ]
if (!build_ohos_sdk) {
external_deps = [
external_deps += [
"ipc:ipc_single",
"qos_manager:concurrent_task_client",
]

View File

@ -150,8 +150,9 @@ ohos_source_set("rosen_ohos_sources") {
public_deps += [
"$graphic_2d_root:libgl",
"$graphic_2d_root:libvulkan",
"//third_party/openssl:libcrypto_shared",
]
public_external_deps = [ "openssl:libcrypto_shared" ]
}
if (graphic_2d_feature_enable_opinc) {

View File

@ -78,8 +78,9 @@ ohos_static_library("librender_backend") {
"$graphic_2d_root:libgl",
"$graphic_2d_root:libvulkan",
"$graphic_2d_root/rosen/modules/2d_graphics:2d_graphics",
"//third_party/openssl:libcrypto_shared",
]
public_external_deps = [ "openssl:libcrypto_shared" ]
}
public_deps += [ "//third_party/skia:skia_ohos" ]

View File

@ -123,8 +123,10 @@ ohos_source_set("libtexgine_source") {
if (enable_text_gine) {
defines += [ "USE_GRAPHIC_TEXT_GINE" ]
}
deps = [ "//third_party/bounds_checking_function:libsec_static" ]
include_dirs = [ "//third_party/bounds_checking_function/include" ]
external_deps = [
"bounds_checking_function:libsec_static",
"cJSON:cjson_static",
]
if (platform == "ohos") {
defines += [ "BUILD_NON_SDK_VER" ]
@ -137,8 +139,7 @@ ohos_source_set("libtexgine_source") {
defines += [ "TEXGINE_ENABLE_DEBUGLOG" ]
}
external_deps = [
"cJSON:cjson_static",
external_deps += [
"c_utils:utils",
"hilog:libhilog",
"hitrace:hitrace_meter",
@ -157,8 +158,6 @@ ohos_source_set("libtexgine_source") {
public_deps +=
[ "$graphic_2d_root/rosen/build/icu:rosen_libicu_$platform" ]
}
include_dirs += [ "//third_party/cJSON" ]
deps += [ "//third_party/cJSON:cjson_static" ]
}
}

View File

@ -68,7 +68,6 @@ ohos_executable("drawing_engine_sample") {
"$graphic_2d_root/rosen/include/common",
"$graphic_2d_root/rosen/modules/render_service_base/src/platform/ohos/backend",
"$graphic_2d_root/rosen/modules/render_service_base/src",
"//foundation/communication/ipc/interfaces/innerkits/ipc_core/include",
]
sources += [
@ -110,7 +109,6 @@ ohos_executable("drawing_engine_sample") {
public_deps += [
"$graphic_2d_root:libvulkan",
"$graphic_2d_root/rosen/modules/render_service_base:librender_service_base",
"//third_party/openssl:libcrypto_shared",
]
external_deps = [
"c_utils:utils",
@ -120,6 +118,7 @@ ohos_executable("drawing_engine_sample") {
"init:libbegetutil",
"ipc:ipc_core",
]
public_external_deps = [ "openssl:libcrypto_shared" ]
subsystem_name = "graphic"
part_name = "graphic_2d"
@ -137,7 +136,6 @@ ohos_executable("drawing_sample_rs") {
"$graphic_2d_root/rosen/modules/render_service_base/include",
"$graphic_2d_root/rosen/modules/render_service_client",
"$graphic_2d_root/rosen/include/common",
"//foundation/window/window_manager/interfaces/innerkits/wm",
]
deps = [
@ -145,7 +143,6 @@ ohos_executable("drawing_sample_rs") {
"$graphic_2d_root/rosen/modules/2d_graphics/drawing_ndk:native_drawing_ndk",
"$graphic_2d_root/rosen/modules/render_service_base:librender_service_base",
"$graphic_2d_root/rosen/modules/render_service_client:librender_service_client",
"//third_party/zlib:libz",
]
external_deps = [

View File

@ -23,11 +23,11 @@ ohos_source_set("demo_set") {
sources = [
"drawing_demo.cpp",
"test_base.cpp",
"test_case/draw_path.cpp",
"test_case/draw_rect.cpp",
"test_case/draw_path_test.cpp",
"test_case/draw_rect_test.cpp",
"test_case/test_base.cpp",
"test_case/test_common.cpp",
"test_case_factory.cpp",
"test_common.cpp",
]
deps = [

View File

@ -13,10 +13,12 @@
* limitations under the License.
*/
#include "drawing_demo.h"
#include <sstream>
#include "display_manager.h"
#include "test_case_factory.h"
#include "test_common.h"
#include "test_case/test_common.h"
using namespace OHOS::Rosen;

View File

@ -17,8 +17,7 @@
#include <chrono>
#include <iostream>
#include <string>
#include <surface.h>
#include "test_base.h"
#include "transaction/rs_transaction.h"
#include "ui/rs_root_node.h"
#include "ui/rs_surface_node.h"
@ -26,6 +25,8 @@
#include "utils/log.h"
#include "window.h"
#include "test_case/test_base.h"
namespace OHOS {
namespace Rosen {
#define ALL_TAST_CASE "ALL"

View File

@ -12,7 +12,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "draw_path.h"
#include "draw_path_test.h"
namespace OHOS {
namespace Rosen {

View File

@ -12,9 +12,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef DRAWING_DEMO_DRAW_PATH_H
#define DRAWING_DEMO_DRAW_PATH_H
#include "../test_base.h"
#ifndef DRAWING_DEMO_DRAW_PATH_TEST_H
#define DRAWING_DEMO_DRAW_PATH_TEST_H
#include "test_base.h"
namespace OHOS {
namespace Rosen {
@ -29,4 +29,4 @@ protected:
};
} // namespace Rosen
} // namespace OHOS
#endif // DRAWING_DEMO_DRAW_PATH_H
#endif // DRAWING_DEMO_DRAW_PATH_TEST_H

View File

@ -12,7 +12,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "draw_rect.h"
#include "draw_rect_test.h"
namespace OHOS {
namespace Rosen {

View File

@ -12,9 +12,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef DRAWING_DEMO_DRAW_RECT_H
#define DRAWING_DEMO_DRAW_RECT_H
#include "../test_base.h"
#ifndef DRAWING_DEMO_DRAW_RECT_TEST_H
#define DRAWING_DEMO_DRAW_RECT_TEST_H
#include "test_base.h"
namespace OHOS {
namespace Rosen {
@ -28,4 +28,4 @@ protected:
};
} // namespace Rosen
} // namespace OHOS
#endif // DRAWING_DEMO_DRAW_RECT_H
#endif // DRAWING_DEMO_DRAW_RECT_TEST_H

View File

@ -13,10 +13,12 @@
* limitations under the License.
*/
#include "test_base.h"
#include <sstream>
#include <string>
#include "image/image.h"
#include "test_common.h"
#include "image/image.h"
#include "utils/log.h"
namespace OHOS {

View File

@ -13,7 +13,9 @@
* limitations under the License.
*/
#include "test_common.h"
#include <fcntl.h>
#include "image/image.h"
#include "image_packer.h"
#include "utils/log.h"

View File

@ -13,8 +13,8 @@
* limitations under the License.
*/
#include "test_case_factory.h"
#include "test_case/draw_path.h"
#include "test_case/draw_rect.h"
#include "test_case/draw_path_test.h"
#include "test_case/draw_rect_test.h"
using namespace OHOS::Rosen;
namespace {

View File

@ -14,7 +14,7 @@
*/
#ifndef TEST_CASE_FACTORY_H
#define TEST_CASE_FACTORY_H
#include "test_base.h"
#include "test_case/test_base.h"
namespace OHOS {
namespace Rosen {

View File

@ -71,12 +71,12 @@ ohos_unittest("2d_graphics_skia_canvas_test") {
deps = [
"//foundation/graphic/graphic_2d/rosen/modules/2d_graphics:2d_graphics",
"//third_party/jsoncpp:jsoncpp_static",
]
external_deps = [
"hilog:libhilog",
"image_framework:image_native",
"jsoncpp:jsoncpp",
]
include_dirs += [

View File

@ -74,10 +74,9 @@ ohos_unittest("RSRenderServiceBasePlatformTest") {
if (ace_enable_gpu) {
include_dirs += [ "//third_party/openssl/include" ]
public_deps += [
"$graphic_2d_root:libgl",
"//third_party/openssl:libcrypto_shared",
]
public_deps += [ "$graphic_2d_root:libgl" ]
public_external_deps = [ "openssl:libcrypto_shared" ]
}
external_deps = [