After enabling background color layer, the test '1ayout/reftests/pixel-rounding/rounded-background-color-top-4.html' will fail. 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. After we have a color layer for it, the layer's coordinate is in integer. Not sure if we should fuzz these tests or fix them.  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  https://dxr.mozilla.org/mozilla-central/source/layout/painting/nsDisplayList.cpp?q=path%3AnsDisplayList.cpp&redirect_type=single#4071  https://dxr.mozilla.org/mozilla-central/source/layout/painting/nsDisplayList.cpp?q=path%3AnsDisplayList.cpp&redirect_type=single#4036
Matt, would you mind providing some suggestions on this?
Do we need the ColorLayer bounds to be an IntRect?
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.
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 with background color layer on. I also checked m-c try result and it looks like the change doesn't effect the original tests.  https://treeherder.mozilla.org/#/jobs?repo=try&revision=d25b69de022a955fc179d0adbe40f8355ae0ef42&selectedJob=98236784  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: nobody → ethlin
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/mozilla-inbound/rev/8336687998c5 Round mask layer boundary to match other layers. r=mattwoodrow
Status: NEW → RESOLVED
Last Resolved: 2 years 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.