WebPPictureHasTransparency: remove unreachable return

Change-Id: Ia8077918b5110fb7fc74f326d4d16b38d9ed1b38
This commit is contained in:
James Zern 2020-10-26 15:52:20 -07:00
parent 83604bf3ac
commit 3700ffd7e1

View File

@ -61,16 +61,14 @@ static int CheckNonOpaque(const uint8_t* alpha, int width, int height,
// Checking for the presence of non-opaque alpha.
int WebPPictureHasTransparency(const WebPPicture* picture) {
if (picture == NULL) return 0;
if (!picture->use_argb) {
return CheckNonOpaque(picture->a, picture->width, picture->height,
1, picture->a_stride);
} else {
if (picture->use_argb) {
const int alpha_offset = ALPHA_OFFSET;
return CheckNonOpaque((const uint8_t*)picture->argb + alpha_offset,
picture->width, picture->height,
4, picture->argb_stride * sizeof(*picture->argb));
}
return 0;
return CheckNonOpaque(picture->a, picture->width, picture->height,
1, picture->a_stride);
}
//------------------------------------------------------------------------------