New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 702059 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

Remove special case in image decoders for opaque alpha channel

Project Member Reported by cblume@chromium.org, Mar 16 2017

Issue description

The image decoders which support alpha have a special case to handle situations where the alpha channel is unused.

This can come up from a handful of cases but the net effect is we are detecting if the image was actually opaque, despite the image being encoded to say that it wasn't.


Some scenarios where this could happen are:
- a gif frame's palette includes transparency but no pixels use that transparent palette entry,
- an animation frame completely covering the previous frame & having no transparent pixels, and
- an animation frame partially covering a previous frame, but the previous frame containing no visible transparent pixels.


The reason we detected when the image was actually opaque is because it was faster to draw opaque images. This might not be true any more with things like GPU raster. It may not even be true for CPU raster now-a-days.
 

Comment 1 by aelias@chromium.org, Mar 21 2017

Cc: aelias@chromium.org
For what it's worth, I did a bit of code archeology and this optimization/tradeoff was introduced in 2006 in https://trac.webkit.org/changeset/12748 .  Unfortunately, that patch didn't come with any examples of what case it was aiming to improve.

Comment 2 by noel@chromium.org, Mar 21 2017

#1 Agree that patch referred to didn't come with examples.  It did however come with a change description that suggests that the drawing optimization ("do a blit instead of a blend") was the reason for making the change.

Sign in to add a comment