Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 1be112f2 authored by Leon Scroggins III's avatar Leon Scroggins III
Browse files

Rename setAlphaFlags to setUnpremultipliedRequired

Bug: 135133301
Test: I48e49ee08ab1954eddf62ecae87942aeb128c10d

There is never any reason to request OPAQUE. If the image is already
opaque, using PREMUL or UNPREMUL has no effect. If the image is not
opaque, the requesting OPAQUE is an error. This behavior is not
helpful.

In addition, this matches the Java API for
android.graphics.ImageDecoder.

Lastly, the old API was confusing for animated images. It is possible
for the first frame to be opaque, while a later frame is not. Requesting
OPAQUE seems reasonable for this image, until decoding the non-opaque
frame, at which point the inconsistency shows. Having a setting of
unpremul or not makes it obvious what will happen for the later frame.

Change-Id: I3381582e27894e1072db9b8635f3762b801f5d69
parent f157a263
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment