Closed Bug 1125746 Opened 9 years ago Closed 8 years ago

Fix reftest-no-paint failures on layout/reftests/invalidation/test-image-layers-multiple-displayitem.html

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1067360

People

(Reporter: seth, Unassigned)

References

Details

Right now |layout/reftests/invalidation/test-image-layers-multiple-displayitem.html| is marked random-if(B2G). I marked it that way because we started to see a spike in intermittent oranges on that test on B2G after bug 1079627 landed. B2G is suffering the worst, but we're also seeing those failures elsewhere - see bug 1125521. I'd like to get rid of those intermittent oranges and turn this back on on B2G, so I investigated.

The failures are "reftest-no-paint" failures, and it seemed that they were being triggered because the image wasn't getting layerized as expected, despite having a perspective transform. In the course of trying to understand what was going wrong, I realized that there is nothing to trigger sync decoding of layerized images in reftest snapshots, because RasterImage::GetImageContainer offers no way to request a sync decode. I've fixed that problem in bug 1125055.

However, bug 1125055 *still* didn't fix the problem with |test-image-layers-multiple-displayitem.html|! After more investigation, my conclusion is this: especially after bug 1125055, there's nothing on the image's end that should prevent it from getting layerized. Instead, the problem lies here:

https://dxr.mozilla.org/mozilla-central/source/layout/base/FrameLayerBuilder.cpp?from=CanOptimizeAwayPaintedLayer#2119

If I ensure that that line always returns true (as if CheckInLayerTreeCompressionMode() always returned true) then the intermittent orange is fixed.

I'm filing this bug in the hopes that people with more layers expertise can help me figure out a solution here and reenable the test. As it is, this code makes our invalidation reftests depend on timing in a way that seems like it will inevitably lead to intermittent oranges.
One thing that might work, depending on exactly how the reftest harness does its invalidation checking: it might be enough to always return true from CanOptimizeAwayPaintedLayer if we're sync decoding images. (Presumably we know whether we're sync decoding images in the layers code? We certainly do when we're constructing the display list, so I'm sure we can get the information there one way or another.)
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.