Bug 215041

Summary: [WinCairo] WebKitTestRunner should support pixel dump for accelerated compositing mode
Product: WebKit Reporter: Fujii Hironori <Hironori.Fujii>
Component: Tools / TestsAssignee: Fujii Hironori <Hironori.Fujii>
Status: RESOLVED FIXED    
Severity: Normal CC: annulen, don.olmstead, ews-watchlist, gyuyoung.kim, ryuan.choi, sergio, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=247479
Attachments:
Description Flags
WIP patch
none
Playwright script
none
WIP patch
none
WIP patch
none
WIP patch
none
Patch none

Description Fujii Hironori 2020-07-31 16:10:00 PDT
[WinCairo] DumpRenderTree and WebKitTestRunner doesn's support pixel dump for accelerated compositing mode

AppleWin supports it. CACFLayerTreeHost::paint seems do the task.

Bug 46849 – [chromium] Add accelerated compositing support to DumpRenderTree and test_shell
Comment 1 Fujii Hironori 2020-07-31 16:13:11 PDT
Created attachment 405755 [details]
WIP patch

BitBlt can capture the window content.
But, the problem is the windows shoudd be visible and needs diabling WindowStaion.
Comment 2 Fujii Hironori 2021-10-20 23:52:56 PDT
Created attachment 441991 [details]
Playwright script

I checked Playwright screen capture feature on Windows.
Chrome and Firefox can capture the browser window both in headless and non-headless modes.
WebKit (WinCairo based) can capture only in non-headless modes.
I should check how Chrome and Firefox capture in the headless mode.

winget openjs.nodejs
npm install playwright
node video.mjs
Comment 3 Fujii Hironori 2022-01-16 22:57:25 PST
Created attachment 449309 [details]
WIP patch
Comment 4 Fujii Hironori 2022-01-17 23:45:33 PST
Created attachment 449364 [details]
WIP patch
Comment 5 Fujii Hironori 2022-01-25 14:12:33 PST
Created attachment 449966 [details]
WIP patch
Comment 6 Fujii Hironori 2022-01-25 22:41:06 PST
Created attachment 449997 [details]
Patch
Comment 7 Don Olmstead 2022-01-27 15:09:03 PST
Comment on attachment 449997 [details]
Patch

Is this all that's needed to get pixel tests working? TestController:::takeViewPortSnapshot is unimplemented on Windows.
Comment 8 Fujii Hironori 2022-01-27 16:54:16 PST
(In reply to Don Olmstead from comment #7)
> Comment on attachment 449997 [details]
> Patch
> 
> Is this all that's needed to get pixel tests working?
> TestController:::takeViewPortSnapshot is unimplemented on Windows.

Yes, this patch makes AC mode pixel tests pass. However, DRT doesn't support it.

takeViewPortSnapshot is used only by fast/mediastream tests (Bug 231059).
Comment 9 EWS 2022-01-28 21:23:28 PST
Committed r288784 (246561@main): <https://commits.webkit.org/246561@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 449997 [details].
Comment 10 Radar WebKit Bug Importer 2022-01-28 21:24:19 PST
<rdar://problem/88217028>