[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/android 787c947028c 5/7: ; * src/android.c (android_blit_copy):
From: |
Po Lu |
Subject: |
feature/android 787c947028c 5/7: ; * src/android.c (android_blit_copy): Fix typos. |
Date: |
Mon, 29 May 2023 06:07:13 -0400 (EDT) |
branch: feature/android
commit 787c947028c0ffd0ebe31cd675c976049cc9777c
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
; * src/android.c (android_blit_copy): Fix typos.
---
src/android.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/src/android.c b/src/android.c
index 4184be3086b..9674fda36d8 100644
--- a/src/android.c
+++ b/src/android.c
@@ -4206,9 +4206,12 @@ android_blit_copy (int src_x, int src_y, int width, int
height,
|| INT_ADD_WRAPV ((uintptr_t) mask, offset, &start))
return;
+ if (height <= 0)
+ return;
+
mask = mask_current = (unsigned char *) start;
- while (--height)
+ while (height--)
{
/* Skip backwards past the end of the mask. */
@@ -4277,12 +4280,12 @@ android_blit_copy (int src_x, int src_y, int width, int
height,
else
temp = MIN (mask_info->width, width);
- if (temp <= 0)
+ if (temp <= 0 || height <= 0)
return;
/* Copy bytes according to the mask. */
- while (--height)
+ while (height--)
{
long_src = (unsigned int *) src_current;
long_dst = (unsigned int *) dst_current;
@@ -4292,11 +4295,12 @@ android_blit_copy (int src_x, int src_y, int width, int
height,
while (temp--)
{
/* Sign extend the mask. */
- height = *(signed char *) mask_current++;
+ i = *(signed char *) mask_current++;
/* Apply the mask. */
- *long_dst = ((*long_src & height)
- | (*long_dst & ~height));
+ *long_dst = ((*long_src & i) | (*long_dst & ~i));
+ long_dst++;
+ long_src++;
}
#else /* __aarch64__ */
android_neon_mask_line (long_src, long_dst, mask, temp);
- feature/android updated (d33bf0a0afd -> 1a1cf6b86fc), Po Lu, 2023/05/29
- feature/android 327d2d01313 1/7: Add extra thread-related checking, Po Lu, 2023/05/29
- feature/android 00671b18438 2/7: Implement android_copy_area in C, Po Lu, 2023/05/29
- feature/android 787c947028c 5/7: ; * src/android.c (android_blit_copy): Fix typos.,
Po Lu <=
- feature/android 9a353545933 3/7: Update Android port, Po Lu, 2023/05/29
- feature/android 7fdde02f321 4/7: Work around more problems with Bitmaps, Po Lu, 2023/05/29
- feature/android 1a1cf6b86fc 7/7: Merge remote-tracking branch 'origin/master' into feature/android, Po Lu, 2023/05/29
- feature/android 1088a8e8dab 6/7: Update Android port, Po Lu, 2023/05/29