Drawing of background in overscrolled state is incorrect for transparent layers

RESOLVED INVALID

Status

()

Core
Panning and Zooming
RESOLVED INVALID
4 years ago
3 years ago

People

(Reporter: botond, Unassigned)

Tracking

Trunk
ARM
Gonk (Firefox OS)
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

4 years ago
Jeff pointed out two opacity-related issues with my implementation of bug 1014280 (drawing of background color in overscrolled state).

  1. Currently, we draw a large quad (without the overscroll transform)
     of the background, with the layer's opacity, and then on top draw 
     a smaller quad (with the overscroll transform) of the layer contents,
     also with the layer's oapcity.
 
     If the layer is transparent, say with opacity 0.5, this means the
     background is drawn with 0.5 opacity, and then the layer contents
     are drawn on top of that with 0.5 opacity. The opacities compound,
     resulting in the layer contents showing with 0.75 opacity.

  2. If an intermediate surface is used to render the layer, the layer
     contents are drawn onto the intermediate surface without opacity,
     and then the intermediate surface is drawn with opacity. However,
     the background is still drawn with opacity, so if we have a layer
     with 0.5 opacity, it will end up showing with 0.25 opacity.

Fixing (2) is simple: draw the background without opacity when using an intermediate surface.

To fix (1), instead of drawing the whole large quad with the background color, we should just draw the portions that are not inside the small quad (with the layer contents), so that the two things (background and contents) do not overlap.
(Reporter)

Comment 1

3 years ago
This is moot now that the overscroll effect no longer exposes blank regions of the page (bug 1057578).

Bug 1061976 tracks the removal of the current overscroll background drawing code.
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.