mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-26 13:48:21 +01:00
WebPPictureHasTransparency: remove unreachable return
Change-Id: Ia8077918b5110fb7fc74f326d4d16b38d9ed1b38
This commit is contained in:
parent
83604bf3ac
commit
3700ffd7e1
@ -61,16 +61,14 @@ static int CheckNonOpaque(const uint8_t* alpha, int width, int height,
|
|||||||
// Checking for the presence of non-opaque alpha.
|
// Checking for the presence of non-opaque alpha.
|
||||||
int WebPPictureHasTransparency(const WebPPicture* picture) {
|
int WebPPictureHasTransparency(const WebPPicture* picture) {
|
||||||
if (picture == NULL) return 0;
|
if (picture == NULL) return 0;
|
||||||
if (!picture->use_argb) {
|
if (picture->use_argb) {
|
||||||
return CheckNonOpaque(picture->a, picture->width, picture->height,
|
|
||||||
1, picture->a_stride);
|
|
||||||
} else {
|
|
||||||
const int alpha_offset = ALPHA_OFFSET;
|
const int alpha_offset = ALPHA_OFFSET;
|
||||||
return CheckNonOpaque((const uint8_t*)picture->argb + alpha_offset,
|
return CheckNonOpaque((const uint8_t*)picture->argb + alpha_offset,
|
||||||
picture->width, picture->height,
|
picture->width, picture->height,
|
||||||
4, picture->argb_stride * sizeof(*picture->argb));
|
4, picture->argb_stride * sizeof(*picture->argb));
|
||||||
}
|
}
|
||||||
return 0;
|
return CheckNonOpaque(picture->a, picture->width, picture->height,
|
||||||
|
1, picture->a_stride);
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user