When compiling with Direct2D enabled, I get a couple of compile errors.
Created attachment 291477 [details] Patch
Attachment 291477 [details] did not pass style-queue: ERROR: Source/WebCore/config.h:0: Use #pragma once header guard. [build/header_guard] [5] Total errors found: 1 in 4 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 291477 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=291477&action=review > Source/WebCore/config.h:111 > +#if USE(CG) || PLATFORM(WIN) This shouldn't be necessary if we are using Cairo. Make it if use direct2d. I think it would be even better if we found where we are using CG floats and changed them. We probably shouldn't use CG floats with other rendering backends.
Created attachment 291496 [details] Patch
(In reply to comment #3) > Comment on attachment 291477 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=291477&action=review > > > Source/WebCore/config.h:111 > > +#if USE(CG) || PLATFORM(WIN) > > This shouldn't be necessary if we are using Cairo. Make it if use direct2d. > I think it would be even better if we found where we are using CG floats and > changed them. We probably shouldn't use CG floats with other rendering > backends. Thanks for reviewing :) Updated patch.
Attachment 291496 [details] did not pass style-queue: ERROR: Source/WebCore/config.h:0: Use #pragma once header guard. [build/header_guard] [5] Total errors found: 1 in 4 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 291496 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=291496&action=review > Source/WebCore/config.h:112 > +#if USE(CG) || USE(DIRECT2D) > #ifndef CGFLOAT_DEFINED I don’t understand why we would want to define CGFloat when using Direct2D.
Comment on attachment 291496 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=291496&action=review >> Source/WebCore/config.h:112 >> #ifndef CGFLOAT_DEFINED > > I don’t understand why we would want to define CGFloat when using Direct2D. I agree. I don't need this change locally. If you are getting a build error while enabling Direct2D, I'd love to see the error message. It might be that some CG code is getting build that should not. Or, perhaps we have something defined in terms of CGFloat that we should be using a different type for.
Comment on attachment 291496 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=291496&action=review > Source/WebCore/platform/graphics/win/ImageDecoderDirect2D.h:-35 > -interface IWICImagingFactory; I was purposely not including <WinCodec> here to avoid pulling it in when not needed. Were you finding that you needed to add "include <WinCodec>" in more CPP files than "ImageDecoderDIrect2D.cpp"? I think it's better to add the #include in individual CPP files, rather than force everything that includes the header to also pull in big Microsoft header files.
(In reply to comment #8) > Comment on attachment 291496 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=291496&action=review > > >> Source/WebCore/config.h:112 > >> #ifndef CGFLOAT_DEFINED > > > > I don’t understand why we would want to define CGFloat when using Direct2D. > > I agree. I don't need this change locally. If you are getting a build error > while enabling Direct2D, I'd love to see the error message. > > It might be that some CG code is getting build that should not. Or, perhaps > we have something defined in terms of CGFloat that we should be using a > different type for. Maybe our WebKitSystemInterface.h files are different? I am getting this error: WebKitSystemInterface.h(78): error C2065: 'CGFloat': undeclared identifier (compiling source file C:\Projects\WebKit2\OpenSource\Source\WebCore\platform\network\cf\CookieStorageCFNet.cpp)