Bug 191093

Summary: [Win][Direct2D] Support building DumpRenderTree for Direct2D
Product: WebKit Reporter: Brent Fulgham <bfulgham>
Component: WebKit2Assignee: Brent Fulgham <bfulgham>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, bfulgham, don.olmstead, Hironori.Fujii, pvollan, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 191411    
Attachments:
Description Flags
Patch
none
Patch achristensen: review+

Description Brent Fulgham 2018-10-30 16:47:02 PDT
Update WebKit's DumpRenderTree project files so that we can build and run layout tests. This initial implementation does not dump pixel data (we are a ways away from pixel-perfect comparisons), but we can begin identifying areas that need work.
Comment 1 Radar WebKit Bug Importer 2018-10-30 16:48:02 PDT
<rdar://problem/45685706>
Comment 2 Brent Fulgham 2018-10-30 16:53:23 PDT
Created attachment 353437 [details]
Patch
Comment 3 Don Olmstead 2018-10-30 16:58:50 PDT
Comment on attachment 353437 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=353437&action=review

Minor nit pick on the cmake side other than that everything looks good

Informal r+

> Tools/DumpRenderTree/PlatformWin.cmake:112
> +        list(APPEND DumpRenderTreeLib_LIBRARIES

You could move common libraries out of the if statement
Comment 4 Brent Fulgham 2018-10-30 17:07:43 PDT
Created attachment 353442 [details]
Patch
Comment 5 Alex Christensen 2018-10-30 18:43:41 PDT
Comment on attachment 353442 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=353442&action=review

r=me

> Tools/DumpRenderTree/win/PixelDumpSupportDirect2D.cpp:41
> +using namespace std;

Please no.

> Tools/DumpRenderTree/win/PixelDumpSupportDirect2D.h:31
> +#include <vector>

let's not.

> Tools/DumpRenderTree/win/PixelDumpSupportDirect2D.h:52
> +    std::vector<unsigned char> m_data;

Vector<uint8_t>
Also, this isn't used.
Comment 6 Brent Fulgham 2018-10-30 19:29:22 PDT
Committed r237616: <https://trac.webkit.org/changeset/237616>
Comment 7 Fujii Hironori 2018-10-30 19:59:47 PDT
Windows port BuildBots seem to get broken by this change.

https://build.webkit.org/builders/Apple%20Win%20Release%20%28Build%29/builds/12752

> C:\cygwin\home\buildbot\slave\win-release\build\Tools\DumpRenderTree\PixelDumpSupport.cpp(41): fatal error C1083: Cannot open include file: 'PixelDumpSupportCG.h': No such file or directory [C:\cygwin\home\buildbot\slave\win-release\build\WebKitBuild\Release\Tools\DumpRenderTree\DumpRenderTreeLib.vcxproj]

https://build.webkit.org/builders/WinCairo%2064-bit%20WKL%20Release%20%28Build%29/builds/4331

> FAILED: Tools/DumpRenderTree/CMakeFiles/DumpRenderTreeLib.dir/win/PixelDumpSupportWin.cpp.obj 
> "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.14.26428\bin\Hostx64\x64\cl.exe"  (...) -c ..\..\Tools\DumpRenderTree\win\PixelDumpSupportWin.cpp
> ..\..\Tools\DumpRenderTree\win\PixelDumpSupportWin.cpp(114): error C2065: 'renderTarget': undeclared identifier
> ..\..\Tools\DumpRenderTree\win\PixelDumpSupportWin.cpp(114): error C2228: left of '.get' must have class/struct/union
> ..\..\Tools\DumpRenderTree\win\PixelDumpSupportWin.cpp(114): note: type is 'unknown-type'
> ..\..\Tools\DumpRenderTree\win\PixelDumpSupportWin.cpp(114): error C2660: 'BitmapContext::createByAdoptingBitmapAndContext': function does not take 1 arguments
> C:\WebKit-BuildWorker\wincairo-wkl-release\build\Tools\DumpRenderTree\cairo\PixelDumpSupportCairo.h(50): note: see declaration
Comment 8 Brent Fulgham 2018-10-30 20:29:08 PDT
(In reply to Fujii Hironori from comment #7)
> Windows port BuildBots seem to get broken by this change.
> 
Oh, yes. I left the Direct2D flag on. I will land a fix ASAP.
Comment 9 Brent Fulgham 2018-10-30 20:32:12 PDT
Committed build fix:

Committed r237619: <https://trac.webkit.org/changeset/237619>
Comment 10 Fujii Hironori 2018-10-30 21:51:06 PDT
Committed r237622: <https://trac.webkit.org/changeset/237622>