A couple of reftests rely on the image-rendering attribute which changes mSamplingFilter on ImageLayer and mFlags on CanvasLayer to use a POINT filter. WebRender supports an ImageRendering enum to specify this, but we currently default it to Auto (or Linear).
I currently have a patch of this that is working, but it relies on an updated version of WebRender.
Depends on: 1329574
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/projects/graphics/rev/4328c358a7c1 Specify an ImageRendering for some WebRenderLayers r=kats
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
Pushed by email@example.com: https://hg.mozilla.org/projects/graphics/rev/66ef32af3d41 Mark 8 reftests as passing. r=kats? DONTBUILD
This line looks wrong, shouldn't it be a & instead of | ? https://hg.mozilla.org/projects/graphics/rev/4328c358a7c1e7fbd9536a82a3372dc69fe10633#l5.17
Yes that is definitely wrong. I'm incredibly surprised that it works, and especially passes image rendering tests. It doesn't seem to be harmful right now, so I'll look into it tonight. If it causes a problem we can back it out.
So using | with a bit flag of course causes the conditional to always be true. This is causing us to use a point filter all the time. Additionally I don't believe we should be checking for USE_NEAR_FILTER, as it seems that mSamplingFilter is used instead. ImageLayer was coded correctly. With these fixes some tests are failing. So it seems like always using a point filter on canvases is good enough for some tests. I'll need to look into it more. If there isn't an obvious fix, it may be worth it to backout as WR's texture cache allocates a new page for every point filter request. If everything uses point filters, it could slow things down for no good reason.
Created attachment 8828493 [details] [diff] [review] fix-tf1.patch This fixes the WrTextureFilter that we use in WrCanvasLayer. The reason this took so long is that I was investigating reftest failures with this change on my local machine. It turns out that my high dpi screen was causing linear filtering to fail certain tests. Turning down the resolution and dpi fixed this. Automation doesn't seem to have this problem either. This seems like a bug to me, but for now it should be safe to fix.
Attachment #8828493 - Flags: review?(bugmail)
Created attachment 8828494 [details] [diff] [review] fix-tf2.patch https://treeherder.mozilla.org/#/jobs?repo=try&revision=7a76a937a73ac2ba4d100e0c4611e8e1f6415278&selectedJob=70264338 There is one test failure with this patch applied that needs to be marked as a fails-if(webrender). Investigating the failure it's due to us not supporting pixel snapping with our transforms. Using a point filter caused us to pass when we shouldn't have. I will file a followup bug to fix pixel snapping.
Attachment #8828494 - Flags: review?(bugmail)
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attachment #8828493 - Flags: review?(bugmail) → review+
Attachment #8828494 - Flags: review?(bugmail) → review+
Status: REOPENED → RESOLVED
Last Resolved: 2 years ago → 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.