Some reftests fail with both remote canvas and webrender enabled.
Categories
(Core :: Graphics, defect, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox71 | --- | fixed |
People
(Reporter: bobowen, Assigned: bobowen)
References
Details
(Whiteboard: sb+)
Attachments
(1 file)
The following reftests fail if both remote canvas and webrender are enabled [1]:
layout/reftests/svg/as-image/canvas-drawImage-scale-2a.html
layout/reftests/svg/as-image/canvas-drawImage-scale-2b.html
layout/reftests/svg/as-image/canvas-drawImage-alpha-2.html
The main reason for this appears to be a performance change for webrender [2]
This means that the SVG draw commands are recorded and played back directly to the canvas DrawTargetD2D1 in the GPU process.
Whereas the reference SVG image is recorded as a webrender blob image and played backed to a DrawTargetSkia in the GPU process.
In other scenarios this doesn't fail because of the following:
- Remote canvas disabled / webrender enabled - DrawTargetSkia is used to rasterize SVG image before it is scaled etc. by canvas DrawTargetD2D1 in content process. DrawTargetSkia used for SVG reference in the GPU process.
- Remote canvas enabled / webrender disabled - SVG commands recorded and played back to canvas DrawTargetD2D1 in GPU process. DrawTargetD2D1 on paint thread (via DrawTargetCapture) used for SVG reference in the content process.
- Remote canvas disabled / webrender disabled - DrawTargetD2D1 is used to rasterize SVG image before it is scaled etc. by canvas DrawTargetD2D1 in content process. DrawTargetD2D1 on paint thread (via DrawTargetCapture) used for SVG reference in the content process.
jrmuizel - I can think of a few solutions, which do you think is the best approach?:
- webrender blob images should use the same type of DrawTarget as they would have without webrender (i.e.) DrawTargetD2D1
- FLAG_BYPASS_SURFACE_CACHE should be passed in, not assumed for DrawTargetRecording or possibly another new flag could be passed to prevent it in the canvas case (this seems like a backwards step though, because presumably recording the commands and delaying rasterisation is more desirable).
- We allow more pixel difference although that would seem to require a very large amount for the canvas-drawImage-alpha-2.html case, so probably not workable.
- We accept that comparing these two types of rendering is no longer valid in this scenario and disable the tests.
[1] https://treeherder.mozilla.org/#/jobs?repo=try&duplicate_jobs=visible&revision=3e8f06f117fb2fdceca5a50d050c6d2435fb26c5&selectedJob=263252613
[2] https://searchfox.org/mozilla-central/rev/8ea946dcf51f0d6400362cc1d49c8d4808eeacf1/image/VectorImage.cpp#939
Comment 1•6 years ago
|
||
We have no plans to use D2D for blob images. Given this I don't feel particularly strongly about which other solution we choose. I'm okay with fuzzying/disable tests when the backends don't match. There's a fair amount of precedent for this.
Updated•6 years ago
|
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 2•6 years ago
|
||
This is required due to different backends being used for SVG images and canvas.
Depends on D43774
Comment 4•6 years ago
|
||
bugherder |
Description
•