summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jerome Gaillard <jgaillard@google.com> 2025-03-18 05:38:01 -0700
committer Android (Google) Code Review <android-gerrit@google.com> 2025-03-18 05:38:01 -0700
commit1f27f396211bf9ea29dde977ca3dd499facceb94 (patch)
tree644044920083686a37e246bb0fc737e8aa900979
parentfcfe12631f7f865c5dfc1265d757b23487efd0a2 (diff)
parentfacb96af9f4584eaf2c0fb53c414afc12f08f3b7 (diff)
Merge "Only use parcel on Linux" into main
-rw-r--r--libs/hwui/jni/Bitmap.cpp4
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) {