summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2025-02-27 11:14:21 -0800
committer Android (Google) Code Review <android-gerrit@google.com> 2025-02-27 11:14:21 -0800
commitdfb9585efedb12d10cbad8db238f93a6a4b83742 (patch)
treebac315ef709527515a22a4466d8918369c4f4859
parentd144d16b68690664ed1960d34259c87e25364355 (diff)
parente37757c40f863bf96212793a590a2177b1d1608d (diff)
Merge "Replace uses of SkPackARGB32 with SkColorSetARGB" into main
-rw-r--r--libs/hwui/jni/GIFMovie.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/libs/hwui/jni/GIFMovie.cpp b/libs/hwui/jni/GIFMovie.cpp
index 6c82aa1ca27d..476b6fda5007 100644
--- a/libs/hwui/jni/GIFMovie.cpp
+++ b/libs/hwui/jni/GIFMovie.cpp
@@ -63,7 +63,7 @@ GIFMovie::GIFMovie(SkStream* stream)
}
fCurrIndex = -1;
fLastDrawIndex = -1;
- fPaintingColor = SkPackARGB32(0, 0, 0, 0);
+ fPaintingColor = SK_AlphaTRANSPARENT;
}
GIFMovie::~GIFMovie()
@@ -127,7 +127,7 @@ static void copyLine(uint32_t* dst, const unsigned char* src, const ColorMapObje
for (; width > 0; width--, src++, dst++) {
if (*src != transparent && *src < cmap->ColorCount) {
const GifColorType& col = cmap->Colors[*src];
- *dst = SkPackARGB32(0xFF, col.Red, col.Green, col.Blue);
+ *dst = SkColorSetRGB(col.Red, col.Green, col.Blue);
}
}
}
@@ -395,10 +395,10 @@ bool GIFMovie::onGetBitmap(SkBitmap* bm)
lastIndex = fGIF->ImageCount - 1;
}
- SkColor bgColor = SkPackARGB32(0, 0, 0, 0);
+ SkColor bgColor = SK_ColorTRANSPARENT;
if (gif->SColorMap != nullptr && gif->SBackGroundColor < gif->SColorMap->ColorCount) {
const GifColorType& col = gif->SColorMap->Colors[gif->SBackGroundColor];
- bgColor = SkColorSetARGB(0xFF, col.Red, col.Green, col.Blue);
+ bgColor = SkColorSetRGB(col.Red, col.Green, col.Blue);
}
// draw each frames - not intelligent way
@@ -411,7 +411,7 @@ bool GIFMovie::onGetBitmap(SkBitmap* bm)
if (!trans && gif->SColorMap != nullptr) {
fPaintingColor = bgColor;
} else {
- fPaintingColor = SkColorSetARGB(0, 0, 0, 0);
+ fPaintingColor = SK_ColorTRANSPARENT;
}
bm->eraseColor(fPaintingColor);