Closed Bug 1585619 Opened 5 years ago Closed 5 years ago

Investigate to use PrintWindow() for taking snapshot of DirectComposition overlays

Categories

(Core :: Graphics: WebRender, enhancement)

Unspecified
Windows 10
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla73
Tracking Status
firefox73 --- fixed

People

(Reporter: sotaro, Assigned: sotaro)

References

(Blocks 1 open bug)

Details

(Whiteboard: [wr-q41])

Attachments

(1 file)

When there are multiple overlays, wr_renderer_readback() could not be used for taking snapshot. It is nice if PrintWindow() could be used for taking snapshots.

It seems that we could take a snapshot of multiple DirectComposition overlays when we use PrintWindow() with PW_RENDERFULLCONTENT flag.

OS: Unspecified → Windows 10
Assignee: nobody → sotaro.ikeda.g
Blocks: 1592509

In the past, when I tested it without os compositor on try server, sometimes it failed to take a screenshot. It is necessary to retest with os compositor.

The patch was affected by Bug 1591346. BITMAPV4HEADER needs to be changed to top-to-buttom DIB.

(In reply to Sotaro Ikeda [:sotaro] from comment #3)

The patch was affected by Bug 1591346. BITMAPV4HEADER needs to be changed to top-to-buttom DIB.

Updated a patch.

There were test failures. When it happened, it seemed that it failed to get a screenshot.
https://treeherder.mozilla.org/#/jobs?repo=try&revision=4ff279ed422c09586724d6c8019e7ad7a75a1ca6

Whiteboard: [wr-q41]

Waiting gpu tasks complete reduced the intermittent failures, though they still exists.
https://treeherder.mozilla.org/#/jobs?repo=try&revision=2ea5000878bd78ba96aae63ebd8f745582014cf4

Even though, there is enough wait, there is still a case that we could not get correct screenshot :(
https://treeherder.mozilla.org/#/jobs?repo=try&revision=6cfb00aa86de7ff942b3e266015abb07e123fa08

:gw, do you have an idea how to address the reftest? PrintWindow() is a windows api, we do not know an internal of it. Then it might be better not to use PrintWindow() for taking screenshot.

Flags: needinfo?(gwatson)

I'll investigate this today.

Flags: needinfo?(gwatson)

Thank you!

In the attached patch, the implementation of DCLayerTree::WaitForCommitCompletion calls the wrong method.

I kicked off a try run with that updated to call WaitForCommitCompletion on the DC device (patch applied on top of your existing patch).

https://hg.mozilla.org/try/rev/8bccbb22c5eee759f86c97c820864602d5160705
https://treeherder.mozilla.org/#/jobs?repo=try&revision=8bccbb22c5eee759f86c97c820864602d5160705

The try run with that change seems good.

Pushed by sikeda.birchill@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/dab4de5a90b9 Add option of using PrintWindow() for taking snapshot of DirectComposition r=gw
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla73

It seems that recent change caused reftest failure though PrintWindow() seemed to work.
https://treeherder.mozilla.org/#/jobs?repo=try&author=sikeda.birchill%40mozilla.com&selectedJob=279253707

(In reply to Sotaro Ikeda [:sotaro] from comment #16)

It seems that recent change caused reftest failure though PrintWindow() seemed to work.
https://treeherder.mozilla.org/#/jobs?repo=try&author=sikeda.birchill%40mozilla.com&selectedJob=279253707

It seems to be addressed on latest m-c

Blocks: 1592026
Regressions: 1615590
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: