diff options
-rw-r--r-- | core/jni/Android.bp | 1 | ||||
-rw-r--r-- | libs/hwui/Android.bp | 8 | ||||
-rw-r--r-- | libs/hwui/jni/Bitmap.cpp | 14 |
3 files changed, 13 insertions, 10 deletions
diff --git a/core/jni/Android.bp b/core/jni/Android.bp index 7ed73d7668b9..40f6acceecb1 100644 --- a/core/jni/Android.bp +++ b/core/jni/Android.bp @@ -488,6 +488,7 @@ cc_library_shared_for_libandroid_runtime { "libbinder", "libbinder_ndk", "libhidlbase", // libhwbinder is in here + "libaconfig_storage_read_api_cc", ], version_script: "platform/linux/libandroid_runtime_export.txt", }, diff --git a/libs/hwui/Android.bp b/libs/hwui/Android.bp index ab1be7e6128d..1bde5ff43aa8 100644 --- a/libs/hwui/Android.bp +++ b/libs/hwui/Android.bp @@ -168,6 +168,14 @@ cc_defaults { "libutils", ], }, + host_linux: { + shared_libs: [ + "libaconfig_storage_read_api_cc", + ], + whole_static_libs: [ + "hwui_flags_cc_lib", + ], + }, }, } diff --git a/libs/hwui/jni/Bitmap.cpp b/libs/hwui/jni/Bitmap.cpp index b6a2ad7064a9..1a258e022dd0 100644 --- a/libs/hwui/jni/Bitmap.cpp +++ b/libs/hwui/jni/Bitmap.cpp @@ -2,6 +2,9 @@ #include "Bitmap.h" #include <android-base/unique_fd.h> +#ifdef __linux__ +#include <com_android_graphics_hwui_flags.h> +#endif #include <hwui/Bitmap.h> #include <hwui/Paint.h> #include <inttypes.h> @@ -33,15 +36,6 @@ #endif #include "android_nio_utils.h" -#ifdef __ANDROID__ -#include <com_android_graphics_hwui_flags.h> -namespace hwui_flags = com::android::graphics::hwui::flags; -#else -namespace hwui_flags { -constexpr bool bitmap_parcel_ashmem_as_immutable() { return false; } -} -#endif - #define DEBUG_PARCEL 0 static jclass gBitmap_class; @@ -861,7 +855,7 @@ static bool shouldParcelAsMutable(SkBitmap& bitmap, AParcel* parcel) { return false; } - if (!hwui_flags::bitmap_parcel_ashmem_as_immutable()) { + if (!com::android::graphics::hwui::flags::bitmap_parcel_ashmem_as_immutable()) { return true; } |