三、IMX8平台skia修改

更新skia库

更新源码的skia库,从m66升级到skui使用的m75版本

git fetch aosp --tags
git checkout android-10.0.0_r1
cat 

cat include/core/SkMilestone.h结果如下:

/*
 * Copyright 2016 Google Inc.
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */
#ifndef SK_MILESTONE
#define SK_MILESTONE 75
#endif

去除host_supported,使用旧的EGL、GLES、ICU库

 cc_library_static {
     name: "libskia",
-    host_supported: true,
     cflags: [
         "-U_FORTIFY_SOURCE",
         "-DATRACE_TAG=ATRACE_TAG_VIEW",
@@ -894,6 +893,7 @@ cc_library_static {
           "include/config/linux",
         ],
       },
+
       darwin: {
         cflags: [
           "-mssse3",
@@ -972,10 +972,13 @@ cc_defaults {
 cc_defaults {
     name: "skia_deps",
     shared_libs: [
-        "libandroidicu",
+        "libEGL",
+        "libGLESv2",
         "libdng_sdk",
         "libexpat",
         "libft2",
+        "libicui18n",
+        "libicuuc",
         "libjpeg",
         "liblog",
         "libpiex",

添加libskui_m75.so

cc_library_shared {
    name: "libskia_m75",
    .......
}

mmm .编译,生成

[100% 1/1] Install: out/target/product/yfve_8q/system/lib64/libskia_m75.so

skui在IMX8平台显示效果

本文地址:https://blog.csdn.net/czhzasui/article/details/108868572