diff options
author | 2025-03-14 13:50:14 +0000 | |
---|---|---|
committer | 2025-03-14 14:30:25 +0000 | |
commit | facb96af9f4584eaf2c0fb53c414afc12f08f3b7 (patch) | |
tree | cebc2799f763feefe9409efb46762932fad2722c | |
parent | 88a0447ff0df8fc403579c3c8149dd07dd60f6a4 (diff) |
Only use parcel on Linux
binder_parcel is not available on Mac or Windows.
Flag: NONE host-only change
Bug: 381394200
Test: build libhwui on mac
Change-Id: I5cc6599c267e24051c025b8988bbd72403054634
-rw-r--r-- | libs/hwui/jni/Bitmap.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/hwui/jni/Bitmap.cpp b/libs/hwui/jni/Bitmap.cpp index 104ece6582f5..b6a2ad7064a9 100644 --- a/libs/hwui/jni/Bitmap.cpp +++ b/libs/hwui/jni/Bitmap.cpp @@ -28,7 +28,9 @@ #include "SkRefCnt.h" #include "SkStream.h" #include "SkTypes.h" +#ifdef __linux__ // Only Linux support parcel #include "android/binder_parcel.h" +#endif #include "android_nio_utils.h" #ifdef __ANDROID__ @@ -851,6 +853,7 @@ static jobject Bitmap_createFromParcel(JNIEnv* env, jobject, jobject parcel) { #endif } +#ifdef __linux__ // Only Linux support parcel // Returns whether this bitmap should be written to the parcel as mutable. static bool shouldParcelAsMutable(SkBitmap& bitmap, AParcel* parcel) { // If the bitmap is immutable, then parcel as immutable. @@ -867,6 +870,7 @@ static bool shouldParcelAsMutable(SkBitmap& bitmap, AParcel* parcel) { // writing it to the parcel. return !shouldUseAshmem(parcel, bitmap.computeByteSize()); } +#endif static jboolean Bitmap_writeToParcel(JNIEnv* env, jobject, jlong bitmapHandle, jint density, jobject parcel) { |