Change the semantics of WebRender document origin

RESOLVED FIXED in Firefox 67

Status

()

enhancement
RESOLVED FIXED
4 months ago
3 months ago

People

(Reporter: kvark, Assigned: kvark)

Tracking

unspecified
mozilla67
Points:
---

Firefox Tracking Flags

(firefox67 fixed)

Details

Attachments

(1 attachment)

Assignee

Description

4 months ago

See https://github.com/servo/servo/issues/21350 for the background. Basically, the rectangle we provide to WR should determine the output position independently of the content of documents.

Assignee

Updated

4 months ago
Assignee: nobody → dmalyshau
Status: NEW → ASSIGNED
Assignee

Comment 1

4 months ago

The goal of this change was to simplify the semantics of our document placement and split the logical elements inside (display list) from the actual screen rectangle occupied by a document.
To achieve that, we introduce the framebuffer space for things Y-flipped on screen.
We fix the frame outputs, so that they get produced on the first frame without loopback from the frame building to scene building.

Attachment #9047587 - Attachment description: [WIP] document origin rewrite and framebuffer coordinates → Document origin rewrite and framebuffer coordinates

Comment 2

4 months ago
Pushed by dmalyshau@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/93f7dc3084a1
Document origin rewrite and framebuffer coordinates r=gw,nical

Backed out for wrench failures

backout: https://hg.mozilla.org/integration/autoland/rev/a066481987fbbf72b10e6fb60d2e2eb190586f4d

push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=93f7dc3084a1350e5c2c21d599ec6634ebe0ec8f&searchStr=windows%2C10%2Cx64%2Cquantumrender%2Crelease%2Cwebrender%2Cstandalone%2Cwebrender-windows%2Cwr%28wrench%29&selectedJob=231256578

failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=231256578&repo=autoland&lineNumber=2150

[task 2019-03-01T15:32:33.114Z] Checking direct-composition v0.1.0 (Z:\task_1551451749\build\src\gfx\wr\direct-composition)
[task 2019-03-01T15:32:33.114Z] Running rustc --crate-name direct_composition direct-composition\src\lib.rs --color never --crate-type lib --emit=dep-info,metadata -C debuginfo=2 -C metadata=3c35567cc46519bc -C extra-filename=-3c35567cc46519bc --out-dir z:\task_1551451749\build\src\gfx\wr\target\debug\deps -C incremental=z:\task_1551451749\build\src\gfx\wr\target\debug\incremental -L dependency=z:\task_1551451749\build\src\gfx\wr\target\debug\deps --extern euclid=z:\task_1551451749\build\src\gfx\wr\target\debug\deps\libeuclid-5c593573341f8625.rmeta --extern gleam=z:\task_1551451749\build\src\gfx\wr\target\debug\deps\libgleam-5ec5d310b14e0779.rmeta --extern mozangle=z:\task_1551451749\build\src\gfx\wr\target\debug\deps\libmozangle-907b9fa44285e6bd.rmeta --extern webrender=z:\task_1551451749\build\src\gfx\wr\target\debug\deps\libwebrender-aa8d6e8518df5cb4.rmeta --extern winapi=z:\task_1551451749\build\src\gfx\wr\target\debug\deps\libwinapi-0a95d0eead7ad2cd.rmeta --extern winit=z:\task_1551451749\build\src\gfx\wr\target\debug\deps\libwinit-551efed08f6931a7.rmeta --deny warnings -L native=z:\task_1551451749\build\src\gfx\wr\target\debug\build\mozangle-d654a3080dd3b3fd\out
[task 2019-03-01T15:32:33.534Z] Running rustc --crate-name direct_composition direct-composition\src\main.rs --color never --crate-type bin --emit=dep-info,metadata -C debuginfo=2 -C metadata=c1196311e44aab81 -C extra-filename=-c1196311e44aab81 --out-dir z:\task_1551451749\build\src\gfx\wr\target\debug\deps -C incremental=z:\task_1551451749\build\src\gfx\wr\target\debug\incremental -L dependency=z:\task_1551451749\build\src\gfx\wr\target\debug\deps --extern direct_composition=z:\task_1551451749\build\src\gfx\wr\target\debug\deps\libdirect_composition-3c35567cc46519bc.rmeta --extern euclid=z:\task_1551451749\build\src\gfx\wr\target\debug\deps\libeuclid-5c593573341f8625.rmeta --extern gleam=z:\task_1551451749\build\src\gfx\wr\target\debug\deps\libgleam-5ec5d310b14e0779.rmeta --extern mozangle=z:\task_1551451749\build\src\gfx\wr\target\debug\deps\libmozangle-907b9fa44285e6bd.rmeta --extern webrender=z:\task_1551451749\build\src\gfx\wr\target\debug\deps\libwebrender-aa8d6e8518df5cb4.rmeta --extern winapi=z:\task_1551451749\build\src\gfx\wr\target\debug\deps\libwinapi-0a95d0eead7ad2cd.rmeta --extern winit=z:\task_1551451749\build\src\gfx\wr\target\debug\deps\libwinit-551efed08f6931a7.rmeta --deny warnings -L native=z:\task_1551451749\build\src\gfx\wr\target\debug\build\mozangle-d654a3080dd3b3fd\out
[task 2019-03-01T15:32:34.365Z] error[E0308]: mismatched types
[task 2019-03-01T15:32:34.365Z] --> direct-composition\src\main_windows.rs:124:43
[task 2019-03-01T15:32:34.365Z] |
[task 2019-03-01T15:32:34.365Z] 124 | document_id: api.add_document(size, 0),
[task 2019-03-01T15:32:34.365Z] | ^^^^ expected struct webrender::webrender_api::FramebufferPixel, found struct webrender::webrender_api::DevicePixel
[task 2019-03-01T15:32:34.365Z] |
[task 2019-03-01T15:32:34.365Z] = note: expected type euclid::TypedSize2D<_, webrender::webrender_api::FramebufferPixel>
[task 2019-03-01T15:32:34.365Z] found type euclid::TypedSize2D<_, webrender::webrender_api::DevicePixel>
[task 2019-03-01T15:32:34.365Z]
[task 2019-03-01T15:32:34.495Z] error[E0308]: mismatched types
[task 2019-03-01T15:32:34.495Z] --> direct-composition\src\main_windows.rs:175:25
[task 2019-03-01T15:32:34.495Z] |
[task 2019-03-01T15:32:34.495Z] 175 | renderer.render(self.size).unwrap();
[task 2019-03-01T15:32:34.495Z] | ^^^^^^^^^ expected struct webrender::webrender_api::FramebufferPixel, found struct webrender::webrender_api::DevicePixel
[task 2019-03-01T15:32:34.495Z] |
[task 2019-03-01T15:32:34.495Z] = note: expected type euclid::TypedSize2D<_, webrender::webrender_api::FramebufferPixel>
[task 2019-03-01T15:32:34.495Z] found type euclid::TypedSize2D<_, webrender::webrender_api::DevicePixel>
[task 2019-03-01T15:32:34.495Z]
[task 2019-03-01T15:32:34.508Z] error: aborting due to 2 previous errors
[task 2019-03-01T15:32:34.508Z]
[task 2019-03-01T15:32:34.508Z] For more information about this error, try rustc --explain E0308.
[task 2019-03-01T15:32:34.591Z] error: Could not compile direct-composition.
[task 2019-03-01T15:32:34.591Z]
[task 2019-03-01T15:32:34.591Z] Caused by:
[task 2019-03-01T15:32:34.592Z] process didn't exit successfully: rustc --crate-name direct_composition direct-composition\src\main.rs --color never --crate-type bin --emit=dep-info,metadata -C debuginfo=2 -C metadata=c1196311e44aab81 -C extra-filename=-c1196311e44aab81 --out-dir z:\task_1551451749\build\src\gfx\wr\target\debug\deps -C incremental=z:\task_1551451749\build\src\gfx\wr\target\debug\incremental -L dependency=z:\task_1551451749\build\src\gfx\wr\target\debug\deps --extern direct_composition=z:\task_1551451749\build\src\gfx\wr\target\debug\deps\libdirect_composition-3c35567cc46519bc.rmeta --extern euclid=z:\task_1551451749\build\src\gfx\wr\target\debug\deps\libeuclid-5c593573341f8625.rmeta --extern gleam=z:\task_1551451749\build\src\gfx\wr\target\debug\deps\libgleam-5ec5d310b14e0779.rmeta --extern mozangle=z:\task_1551451749\build\src\gfx\wr\target\debug\deps\libmozangle-907b9fa44285e6bd.rmeta --extern webrender=z:\task_1551451749\build\src\gfx\wr\target\debug\deps\libwebrender-aa8d6e8518df5cb4.rmeta --extern winapi=z:\task_1551451749\build\src\gfx\wr\target\debug\deps\libwinapi-0a95d0eead7ad2cd.rmeta --extern winit=z:\task_1551451749\build\src\gfx\wr\target\debug\deps\libwinit-551efed08f6931a7.rmeta --deny warnings -L native=z:\task_1551451749\build\src\gfx\wr\target\debug\build\mozangle-d654a3080dd3b3fd\out (exit code: 1)
[task 2019-03-01T15:32:34.597Z]
[task 2019-03-01T15:32:34.597Z] z:\task_1551451749\build\src\gfx\wr\direct-composition>if 101 NEQ 0 EXIT /b 101
[taskcluster 2019-03-01T15:32:34.630Z] Exit Code: 101
[taskcluster 2019-03-01T15:32:34.630Z] User Time: 0s
[taskcluster 2019-03-01T15:32:34.630Z] Kernel Time: 0s
[taskcluster 2019-03-01T15:32:34.630Z] Wall Time: 40m50.2422324s
[taskcluster 2019-03-01T15:32:34.630Z] Result: FAILED
[taskcluster 2019-03-01T15:32:34.630Z] === Task Finished ===
[taskcluster 2019-03-01T15:32:34.630Z] Task Duration: 40m50.2422324s
[taskcluster 2019-03-01T15:32:35.569Z] Uploading redirect artifact public/logs/live.log to URL https://queue.taskcluster.net/v1/task/XLox_N9MTfmXaGu9GY9ZHw/runs/0/artifacts/public/logs/live_backing.log with mime type "text/plain; charset=utf-8" and expiry 2020-02-29T14:50:58.342Z
[taskcluster:error] exit status 101

Flags: needinfo?(dmalyshau)
Assignee

Comment 4

4 months ago

Thanks for backing out! The direct-composition crate wasn't tested by the try run I did, and I can't compile it because I'm on Linux. Should be fixed now.

Flags: needinfo?(dmalyshau)

Comment 5

4 months ago
Pushed by dmalyshau@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ee88f4e35d4f
Document origin rewrite and framebuffer coordinates r=gw,nical

Comment 6

4 months ago
bugherder
Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
Regressions: 1543356
You need to log in before you can comment on or make changes to this bug.