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

Issue 593437 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

Improve code for detecting/querying opacity of background FillLayers

Project Member Reported by schenney@chromium.org, Mar 9 2016

Issue description

Version: ToT
OS: All

FillLayer::hasRepeatXY() should return true if the image will completely cover an arbitrary area. The existing code requires RepeatFill, while it should require either RepeatFill or RepeatRound, as the latter also fills an area with no spaces.

 
Yes I think lots of cleanup needs to be done in that area. For example FillLayer::hasOpaqueImage() doesn't really mean whether the image is opaque, but whether the output pixel can depend on the existing pixels.

I think it is better to separate the criteria into logical groups:
hasOpaqueImage = image && image->canRender && image->imageSize && image->knownToBeOpaque
hasOpaqueTile = compositeMode == Clear || compositeMode == Copy || (hasOpaqueImage && compositeMode == SrcOver && blendMode == Normal)
hasFullFill = (repeatX == RepeatFill || repeatX == RoundFill) && (repeatY == RoundFill || repeatY == RoundFill)
isOpaque = hasOpaqueTile && hasFullFill

Only for illustrative purpose and may not be exhaustive. This thing takes serious mental effort to prove correctness. :/
Summary: Improve code for detecting/querying opacity of background FillLayers (was: Mark more FillLayers as opaque)
Agreed. I'll generalize this bug title to reflect all the cleanup we need.
Status: Started (was: Assigned)
Status: Fixed (was: Started)

Sign in to add a comment