Fix rounding tests after enabling background color layer

RESOLVED FIXED in Firefox 55

Status

()

Core
Graphics: WebRender
RESOLVED FIXED
a year ago
a year ago

People

(Reporter: ethlin, Assigned: ethlin)

Tracking

(Blocks: 1 bug)

unspecified
mozilla55
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox55 fixed)

Details

(Whiteboard: [gfx-noted])

Attachments

(1 attachment)

(Assignee)

Description

a year ago
After enabling background color layer, the test '1ayout/reftests/pixel-rounding/rounded-background-color-top-4.html' will fail[1]. It looks like we'll have some difference on the edge of the elements. I guess it's because originally we paint everything in a painted layer and the coordinate is in float[2]. After we have a color layer for it, the layer's coordinate is in integer[3]. Not sure if we should fuzz these tests or fix them.


[1] https://hg.mozilla.org/mozilla-central/raw-file/tip/layout/tools/reftest/reftest-analyzer.xhtml#logurl=https://queue.taskcluster.net/v1/task/DkZtEIYsRSmLYrTDb-fd_Q/runs/0/artifacts/public/logs/live_backing.log&only_show_unexpected=1
[2] https://dxr.mozilla.org/mozilla-central/source/layout/painting/nsDisplayList.cpp?q=path%3AnsDisplayList.cpp&redirect_type=single#4071
[3] https://dxr.mozilla.org/mozilla-central/source/layout/painting/nsDisplayList.cpp?q=path%3AnsDisplayList.cpp&redirect_type=single#4036
(Assignee)

Comment 1

a year ago
Matt, would you mind providing some suggestions on this?
Flags: needinfo?(matt.woodrow)
Do we need the ColorLayer bounds to be an IntRect?
Flags: needinfo?(matt.woodrow)
(Assignee)

Updated

a year ago
Whiteboard: [gfx-noted]
(Assignee)

Updated

a year ago
Blocks: 1361721
(Assignee)

Comment 3

a year ago
I think I found the problem. Gecko does rounding for the coordinate of layers except mask layer. In this case, we have a color layer and there is a mask layer on it. The position mismatch between the color layer and mask layer causes this problem.
(Assignee)

Comment 4

a year ago
Created attachment 8866651 [details] [diff] [review]
fix rounding problem

I use the same way "ToNearestPixels" to round the bound of mask layer. Then the round reftests passed[1] with background color layer on. I also checked m-c try result[2] and it looks like the change doesn't effect the original tests.

[1] https://treeherder.mozilla.org/#/jobs?repo=try&revision=d25b69de022a955fc179d0adbe40f8355ae0ef42&selectedJob=98236784

[2] https://treeherder.mozilla.org/#/jobs?repo=try&revision=11a9f57acce04d1942937d56746c390534635d43&selectedJob=98239148
Attachment #8866651 - Flags: review?(matt.woodrow)
Attachment #8866651 - Flags: review?(matt.woodrow) → review+
(Assignee)

Updated

a year ago
Assignee: nobody → ethlin
Keywords: checkin-needed

Comment 5

a year ago
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/8336687998c5
Round mask layer boundary to match other layers. r=mattwoodrow
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/8336687998c5
Status: NEW → RESOLVED
Last Resolved: a year ago
status-firefox55: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.