Diff
Modified: trunk/ChangeLog (287912 => 287913)
--- trunk/ChangeLog 2022-01-12 07:52:45 UTC (rev 287912)
+++ trunk/ChangeLog 2022-01-12 07:55:30 UTC (rev 287913)
@@ -1,3 +1,12 @@
+2022-01-11 Fujii Hironori <[email protected]>
+
+ Remove Direct2D code (part 2)
+ https://bugs.webkit.org/show_bug.cgi?id=235097
+
+ Reviewed by Yusuke Suzuki.
+
+ * Source/cmake/OptionsAppleWin.cmake:
+
2022-01-10 Alex Christensen <[email protected]>
Start using C++20
Modified: trunk/Source/WebCore/ChangeLog (287912 => 287913)
--- trunk/Source/WebCore/ChangeLog 2022-01-12 07:52:45 UTC (rev 287912)
+++ trunk/Source/WebCore/ChangeLog 2022-01-12 07:55:30 UTC (rev 287913)
@@ -1,3 +1,19 @@
+2022-01-11 Fujii Hironori <[email protected]>
+
+ Remove Direct2D code (part 2)
+ https://bugs.webkit.org/show_bug.cgi?id=235097
+
+ Reviewed by Yusuke Suzuki.
+
+ * platform/graphics/Color.h:
+ * platform/graphics/win/FontCacheWin.cpp:
+ (WebCore::createGDIFont):
+ (WebCore::FontCache::createFontPlatformData):
+ * platform/graphics/win/FontPlatformDataWin.cpp:
+ * platform/image-decoders/ScalableImageDecoder.cpp:
+ (WebCore::ScalableImageDecoder::setTargetContext): Deleted.
+ * platform/image-decoders/ScalableImageDecoder.h:
+
2022-01-11 Said Abou-Hallawa <[email protected]>
[GPU Process] Make SVG resources create remote ImageBuffers for their drawing
Modified: trunk/Source/WebCore/PAL/ChangeLog (287912 => 287913)
--- trunk/Source/WebCore/PAL/ChangeLog 2022-01-12 07:52:45 UTC (rev 287912)
+++ trunk/Source/WebCore/PAL/ChangeLog 2022-01-12 07:55:30 UTC (rev 287913)
@@ -1,3 +1,12 @@
+2022-01-11 Fujii Hironori <[email protected]>
+
+ Remove Direct2D code (part 2)
+ https://bugs.webkit.org/show_bug.cgi?id=235097
+
+ Reviewed by Yusuke Suzuki.
+
+ * pal/PlatformAppleWin.cmake:
+
2022-01-10 Wenson Hsieh <[email protected]>
Add support for a -shouldWrap property when injecting Live Text
Modified: trunk/Source/WebCore/PAL/pal/PlatformAppleWin.cmake (287912 => 287913)
--- trunk/Source/WebCore/PAL/pal/PlatformAppleWin.cmake 2022-01-12 07:52:45 UTC (rev 287912)
+++ trunk/Source/WebCore/PAL/pal/PlatformAppleWin.cmake 2022-01-12 07:55:30 UTC (rev 287913)
@@ -14,17 +14,14 @@
spi/win/CoreTextSPIWin.h
)
-if (${USE_DIRECT2D})
-else ()
- list(APPEND PAL_PUBLIC_HEADERS
- spi/cg/CoreGraphicsSPI.h
- spi/cg/ImageIOSPI.h
- )
+list(APPEND PAL_PUBLIC_HEADERS
+ spi/cg/CoreGraphicsSPI.h
+ spi/cg/ImageIOSPI.h
+)
- list(APPEND PAL_PRIVATE_INCLUDE_DIRECTORIES
- "${PAL_DIR}/pal/spi/cg"
- )
-endif ()
+list(APPEND PAL_PRIVATE_INCLUDE_DIRECTORIES
+ "${PAL_DIR}/pal/spi/cg"
+)
list(APPEND PAL_SOURCES
avfoundation/MediaTimeAVFoundation.cpp
Modified: trunk/Source/WebCore/platform/graphics/Color.h (287912 => 287913)
--- trunk/Source/WebCore/platform/graphics/Color.h 2022-01-12 07:52:45 UTC (rev 287912)
+++ trunk/Source/WebCore/platform/graphics/Color.h 2022-01-12 07:55:30 UTC (rev 287913)
@@ -42,15 +42,6 @@
typedef struct CGColor* CGColorRef;
#endif
-#if PLATFORM(WIN)
-struct _D3DCOLORVALUE;
-typedef _D3DCOLORVALUE D3DCOLORVALUE;
-typedef D3DCOLORVALUE D2D_COLOR_F;
-typedef D2D_COLOR_F D2D1_COLOR_F;
-struct D2D_VECTOR_4F;
-typedef D2D_VECTOR_4F D2D1_VECTOR_4F;
-#endif
-
#if PLATFORM(GTK)
typedef struct _GdkRGBA GdkRGBA;
#endif
@@ -148,12 +139,6 @@
WEBCORE_EXPORT static Color createAndPreserveColorSpace(CGColorRef, OptionSet<Flags> = { });
#endif
-#if PLATFORM(WIN)
- WEBCORE_EXPORT Color(D2D1_COLOR_F);
- WEBCORE_EXPORT operator D2D1_COLOR_F() const;
- WEBCORE_EXPORT operator D2D1_VECTOR_4F() const;
-#endif
-
static constexpr auto transparentBlack = SRGBA<uint8_t> { };
static constexpr auto black = SRGBA<uint8_t> { 0, 0, 0 };
static constexpr auto white = SRGBA<uint8_t> { 255, 255, 255 };
Modified: trunk/Source/WebCore/platform/graphics/win/FontCacheWin.cpp (287912 => 287913)
--- trunk/Source/WebCore/platform/graphics/win/FontCacheWin.cpp 2022-01-12 07:52:45 UTC (rev 287912)
+++ trunk/Source/WebCore/platform/graphics/win/FontCacheWin.cpp 2022-01-12 07:55:30 UTC (rev 287913)
@@ -46,10 +46,6 @@
#include <pal/spi/cg/CoreGraphicsSPI.h>
#endif
-#if USE(DIRECT2D)
-#include <dwrite_3.h>
-#endif
-
using std::min;
namespace WebCore
@@ -539,7 +535,7 @@
matchData.m_chosen.lfUnderline = false;
matchData.m_chosen.lfStrikeOut = false;
matchData.m_chosen.lfCharSet = DEFAULT_CHARSET;
-#if USE(CG) || USE(CAIRO) || USE(DIRECT2D)
+#if USE(CG) || USE(CAIRO)
matchData.m_chosen.lfOutPrecision = OUT_TT_ONLY_PRECIS;
#else
matchData.m_chosen.lfOutPrecision = OUT_TT_PRECIS;
@@ -679,8 +675,6 @@
#if USE(CG)
bool fontCreationFailed = !result->cgFont();
-#elif USE(DIRECT2D)
- bool fontCreationFailed = !result->dwFont();
#elif USE(CAIRO)
bool fontCreationFailed = !result->scaledFont();
#endif
Modified: trunk/Source/WebCore/platform/graphics/win/FontPlatformDataWin.cpp (287912 => 287913)
--- trunk/Source/WebCore/platform/graphics/win/FontPlatformDataWin.cpp 2022-01-12 07:52:45 UTC (rev 287912)
+++ trunk/Source/WebCore/platform/graphics/win/FontPlatformDataWin.cpp 2022-01-12 07:55:30 UTC (rev 287913)
@@ -33,10 +33,6 @@
#include <wtf/text/StringHash.h>
#include <wtf/text/WTFString.h>
-#if USE(DIRECT2D)
-#include <dwrite_3.h>
-#endif
-
using std::min;
namespace WebCore {
Modified: trunk/Source/WebCore/platform/image-decoders/ScalableImageDecoder.cpp (287912 => 287913)
--- trunk/Source/WebCore/platform/image-decoders/ScalableImageDecoder.cpp 2022-01-12 07:52:45 UTC (rev 287912)
+++ trunk/Source/WebCore/platform/image-decoders/ScalableImageDecoder.cpp 2022-01-12 07:55:30 UTC (rev 287913)
@@ -251,11 +251,4 @@
return buffer->backingStore()->image();
}
-#if USE(DIRECT2D)
-void ScalableImageDecoder::setTargetContext(ID2D1RenderTarget*)
-{
- notImplemented();
}
-#endif
-
-}
Modified: trunk/Source/WebCore/platform/image-decoders/ScalableImageDecoder.h (287912 => 287913)
--- trunk/Source/WebCore/platform/image-decoders/ScalableImageDecoder.h 2022-01-12 07:52:45 UTC (rev 287912)
+++ trunk/Source/WebCore/platform/image-decoders/ScalableImageDecoder.h 2022-01-12 07:55:30 UTC (rev 287913)
@@ -204,10 +204,6 @@
private:
virtual void tryDecodeSize(bool) = 0;
-#if USE(DIRECT2D)
- void setTargetContext(ID2D1RenderTarget*) override;
-#endif
-
IntSize m_size;
EncodedDataStatus m_encodedDataStatus { EncodedDataStatus::TypeAvailable };
bool m_decodingSizeFromSetData { false };
Modified: trunk/Source/WebKit/ChangeLog (287912 => 287913)
--- trunk/Source/WebKit/ChangeLog 2022-01-12 07:52:45 UTC (rev 287912)
+++ trunk/Source/WebKit/ChangeLog 2022-01-12 07:55:30 UTC (rev 287913)
@@ -1,3 +1,19 @@
+2022-01-11 Fujii Hironori <[email protected]>
+
+ Remove Direct2D code (part 2)
+ https://bugs.webkit.org/show_bug.cgi?id=235097
+
+ Reviewed by Yusuke Suzuki.
+
+ * UIProcess/BackingStore.h:
+ (): Deleted.
+ * UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp:
+ (WebKit::DrawingAreaProxyCoordinatedGraphics::sizeDidChange):
+ (WebKit::DrawingAreaProxyCoordinatedGraphics::deviceScaleFactorDidChange):
+ * UIProcess/win/PageClientImpl.cpp:
+ * UIProcess/win/WebView.cpp:
+ (WebKit::WebView::paint):
+
2022-01-11 Said Abou-Hallawa <[email protected]>
[GPU Process] Make SVG resources create remote ImageBuffers for their drawing
Modified: trunk/Source/WebKit/UIProcess/BackingStore.h (287912 => 287913)
--- trunk/Source/WebKit/UIProcess/BackingStore.h 2022-01-12 07:52:45 UTC (rev 287912)
+++ trunk/Source/WebKit/UIProcess/BackingStore.h 2022-01-12 07:55:30 UTC (rev 287913)
@@ -30,17 +30,8 @@
#if USE(CAIRO)
#include <WebCore/BackingStoreBackendCairo.h>
-#elif USE(DIRECT2D)
-#include <WebCore/BackingStoreBackendDirect2D.h>
#endif
-#if USE(DIRECT2D)
-interface ID2D1RenderTarget;
-interface ID3D11Device1;
-interface ID3D11DeviceContext1;
-interface ID3D11Texture2D;
-#endif
-
namespace WebKit {
class ShareableBitmap;
@@ -60,12 +51,6 @@
#if USE(CAIRO)
typedef cairo_t* PlatformGraphicsContext;
-#elif USE(DIRECT2D)
- struct DXConnections {
- ID3D11DeviceContext1* immediateContext { nullptr };
- ID3D11Texture2D* backBuffer { nullptr };
- };
- typedef DXConnections PlatformGraphicsContext;
#endif
void paint(PlatformGraphicsContext, const WebCore::IntRect&);
@@ -77,8 +62,6 @@
#if USE(CAIRO)
std::unique_ptr<WebCore::BackingStoreBackendCairo> createBackend();
-#elif USE(DIRECT2D)
- std::unique_ptr<WebCore::BackingStoreBackendDirect2D> createBackend();
#endif
WebCore::IntSize m_size;
@@ -86,8 +69,6 @@
WebPageProxy& m_webPageProxy;
#if USE(CAIRO)
std::unique_ptr<WebCore::BackingStoreBackendCairo> m_backend;
-#elif USE(DIRECT2D)
- std::unique_ptr<WebCore::BackingStoreBackendDirect2D> m_backend;
#endif
};
Modified: trunk/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp (287912 => 287913)
--- trunk/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp 2022-01-12 07:52:45 UTC (rev 287912)
+++ trunk/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp 2022-01-12 07:55:30 UTC (rev 287913)
@@ -46,11 +46,6 @@
#include <wtf/glib/RunLoopSourcePriority.h>
#endif
-#if USE(DIRECT2D)
-#include <d2d1.h>
-#include <d3d11_1.h>
-#endif
-
namespace WebKit {
using namespace WebCore;
@@ -119,17 +114,11 @@
void DrawingAreaProxyCoordinatedGraphics::sizeDidChange()
{
-#if USE(DIRECT2D)
- m_backingStore = nullptr;
-#endif
backingStoreStateDidChange(RespondImmediately);
}
void DrawingAreaProxyCoordinatedGraphics::deviceScaleFactorDidChange()
{
-#if USE(DIRECT2D)
- m_backingStore = nullptr;
-#endif
backingStoreStateDidChange(RespondImmediately);
}
Modified: trunk/Source/WebKit/UIProcess/win/PageClientImpl.cpp (287912 => 287913)
--- trunk/Source/WebKit/UIProcess/win/PageClientImpl.cpp 2022-01-12 07:52:45 UTC (rev 287912)
+++ trunk/Source/WebKit/UIProcess/win/PageClientImpl.cpp 2022-01-12 07:55:30 UTC (rev 287913)
@@ -35,7 +35,6 @@
#include "WebView.h"
#include <WebCore/DOMPasteAccess.h>
#include <WebCore/NotImplemented.h>
-#include <d3d11_1.h>
namespace WebKit {
using namespace WebCore;
Modified: trunk/Source/WebKit/UIProcess/win/WebView.cpp (287912 => 287913)
--- trunk/Source/WebKit/UIProcess/win/WebView.cpp 2022-01-12 07:52:45 UTC (rev 287912)
+++ trunk/Source/WebKit/UIProcess/win/WebView.cpp 2022-01-12 07:55:30 UTC (rev 287913)
@@ -491,15 +491,6 @@
cairo_destroy(context);
cairo_surface_destroy(surface);
-#else
- COMPtr<ID3D11Texture2D> backBuffer;
- HRESULT hr = m_swapChain->GetBuffer(0, __uuidof(ID3D11Texture2D), reinterpret_cast<void**>(&backBuffer));
- if (SUCCEEDED(hr)) {
- BackingStore::DXConnections context { m_immediateContext.get(), backBuffer.get() };
- drawingArea->paint(context, dirtyRect, unpaintedRegion);
- }
-
- m_swapChain->Present(0, 0);
#endif
auto unpaintedRects = unpaintedRegion.rects();
Modified: trunk/Source/cmake/OptionsAppleWin.cmake (287912 => 287913)
--- trunk/Source/cmake/OptionsAppleWin.cmake 2022-01-12 07:52:45 UTC (rev 287912)
+++ trunk/Source/cmake/OptionsAppleWin.cmake 2022-01-12 07:55:30 UTC (rev 287913)
@@ -41,59 +41,52 @@
# Libraries where find_package does not work
set(COREFOUNDATION_LIBRARY CoreFoundation${DEBUG_SUFFIX})
-# Uncomment the following line to try the Direct2D backend.
-# set(USE_DIRECT2D 1)
+SET_AND_EXPOSE_TO_BUILD(USE_CA ON)
+SET_AND_EXPOSE_TO_BUILD(USE_CG ON)
+SET_AND_EXPOSE_TO_BUILD(USE_CORE_TEXT ON)
-if (${USE_DIRECT2D})
- SET_AND_EXPOSE_TO_BUILD(USE_DIRECT2D ON)
-else ()
- SET_AND_EXPOSE_TO_BUILD(USE_CA ON)
- SET_AND_EXPOSE_TO_BUILD(USE_CG ON)
- SET_AND_EXPOSE_TO_BUILD(USE_CORE_TEXT ON)
+set(CMAKE_REQUIRED_INCLUDES ${WEBKIT_LIBRARIES_INCLUDE_DIR})
+set(CMAKE_REQUIRED_LIBRARIES
+ "${WEBKIT_LIBRARIES_LINK_DIR}/CoreFoundation${DEBUG_SUFFIX}.lib"
+ "${WEBKIT_LIBRARIES_LINK_DIR}/AVFoundationCF${DEBUG_SUFFIX}.lib"
+ "${WEBKIT_LIBRARIES_LINK_DIR}/QuartzCore${DEBUG_SUFFIX}.lib"
+ "${WEBKIT_LIBRARIES_LINK_DIR}/libdispatch${DEBUG_SUFFIX}.lib"
+)
- set(CMAKE_REQUIRED_INCLUDES ${WEBKIT_LIBRARIES_INCLUDE_DIR})
- set(CMAKE_REQUIRED_LIBRARIES
- "${WEBKIT_LIBRARIES_LINK_DIR}/CoreFoundation${DEBUG_SUFFIX}.lib"
- "${WEBKIT_LIBRARIES_LINK_DIR}/AVFoundationCF${DEBUG_SUFFIX}.lib"
- "${WEBKIT_LIBRARIES_LINK_DIR}/QuartzCore${DEBUG_SUFFIX}.lib"
- "${WEBKIT_LIBRARIES_LINK_DIR}/libdispatch${DEBUG_SUFFIX}.lib"
- )
+WEBKIT_CHECK_HAVE_INCLUDE(HAVE_AVCF AVFoundationCF/AVCFBase.h)
- WEBKIT_CHECK_HAVE_INCLUDE(HAVE_AVCF AVFoundationCF/AVCFBase.h)
+if (HAVE_AVCF)
+ SET_AND_EXPOSE_TO_BUILD(USE_AVFOUNDATION ON)
+endif ()
- if (HAVE_AVCF)
- SET_AND_EXPOSE_TO_BUILD(USE_AVFOUNDATION ON)
- endif ()
+WEBKIT_CHECK_HAVE_SYMBOL(HAVE_AVCF_LEGIBLE_OUTPUT AVCFPlayerItemLegibleOutputSetCallbacks "TargetConditionals.h;dispatch/dispatch.h;AVFoundationCF/AVFoundationCF.h;AVFoundationCF/AVCFPlayerItemLegibleOutput.h")
+WEBKIT_CHECK_HAVE_SYMBOL(HAVE_AVFOUNDATION_LOADER_DELEGATE AVCFAssetResourceLoaderSetCallbacks "TargetConditionals.h;dispatch/dispatch.h;AVFoundationCF/AVFoundationCF.h")
+WEBKIT_CHECK_HAVE_SYMBOL(HAVE_AVCFURL_PLAYABLE_MIMETYPE AVCFURLAssetIsPlayableExtendedMIMEType "TargetConditionals.h;dispatch/dispatch.h;AVFoundationCF/AVFoundationCF.h")
- WEBKIT_CHECK_HAVE_SYMBOL(HAVE_AVCF_LEGIBLE_OUTPUT AVCFPlayerItemLegibleOutputSetCallbacks "TargetConditionals.h;dispatch/dispatch.h;AVFoundationCF/AVFoundationCF.h;AVFoundationCF/AVCFPlayerItemLegibleOutput.h")
- WEBKIT_CHECK_HAVE_SYMBOL(HAVE_AVFOUNDATION_LOADER_DELEGATE AVCFAssetResourceLoaderSetCallbacks "TargetConditionals.h;dispatch/dispatch.h;AVFoundationCF/AVFoundationCF.h")
- WEBKIT_CHECK_HAVE_SYMBOL(HAVE_AVCFURL_PLAYABLE_MIMETYPE AVCFURLAssetIsPlayableExtendedMIMEType "TargetConditionals.h;dispatch/dispatch.h;AVFoundationCF/AVFoundationCF.h")
+# CMake cannot identify an enum through a symbol check so a source file is required
+WEBKIT_CHECK_SOURCE_COMPILES(HAVE_AVCFPLAYERITEM_CALLBACK_VERSION_2 "
+#include <AVFoundationCF/AVFoundationCF.h>
+#include <AVFoundationCF/AVCFPlayerItemLegibleOutput.h>
+#include <CoreFoundation/CoreFoundation.h>
+#include <dispatch/dispatch.h>
- # CMake cannot identify an enum through a symbol check so a source file is required
- WEBKIT_CHECK_SOURCE_COMPILES(HAVE_AVCFPLAYERITEM_CALLBACK_VERSION_2 "
- #include <AVFoundationCF/AVFoundationCF.h>
- #include <AVFoundationCF/AVCFPlayerItemLegibleOutput.h>
- #include <CoreFoundation/CoreFoundation.h>
- #include <dispatch/dispatch.h>
+int main() {
+ CFArrayRef types = CFArrayCreate(kCFAllocatorDefault, nullptr, 0, nullptr);
+ AVCFPlayerItemLegibleOutputRef legibleOutput = AVCFPlayerItemLegibleOutputCreateWithMediaSubtypesForNativeRepresentation(kCFAllocatorDefault, types);
+ AVCFPlayerItemLegibleOutputCallbacks callbackInfo;
+ callbackInfo.version = kAVCFPlayerItemLegibleOutput_CallbacksVersion_2;
+ dispatch_queue_t dispatchQueue = dispatch_queue_create(\"test\", DISPATCH_QUEUE_SERIAL);
+ AVCFPlayerItemLegibleOutputSetCallbacks(legibleOutput, &callbackInfo, dispatchQueue);
+}")
- int main() {
- CFArrayRef types = CFArrayCreate(kCFAllocatorDefault, nullptr, 0, nullptr);
- AVCFPlayerItemLegibleOutputRef legibleOutput = AVCFPlayerItemLegibleOutputCreateWithMediaSubtypesForNativeRepresentation(kCFAllocatorDefault, types);
- AVCFPlayerItemLegibleOutputCallbacks callbackInfo;
- callbackInfo.version = kAVCFPlayerItemLegibleOutput_CallbacksVersion_2;
- dispatch_queue_t dispatchQueue = dispatch_queue_create(\"test\", DISPATCH_QUEUE_SERIAL);
- AVCFPlayerItemLegibleOutputSetCallbacks(legibleOutput, &callbackInfo, dispatchQueue);
- }")
+if (HAVE_AVCF_LEGIBLE_OUTPUT)
+ SET_AND_EXPOSE_TO_BUILD(HAVE_AVFOUNDATION_MEDIA_SELECTION_GROUP ON)
+ SET_AND_EXPOSE_TO_BUILD(HAVE_AVFOUNDATION_LEGIBLE_OUTPUT_SUPPORT ON)
+ SET_AND_EXPOSE_TO_BUILD(HAVE_MEDIA_ACCESSIBILITY_FRAMEWORK ON)
+endif ()
- if (HAVE_AVCF_LEGIBLE_OUTPUT)
- SET_AND_EXPOSE_TO_BUILD(HAVE_AVFOUNDATION_MEDIA_SELECTION_GROUP ON)
- SET_AND_EXPOSE_TO_BUILD(HAVE_AVFOUNDATION_LEGIBLE_OUTPUT_SUPPORT ON)
- SET_AND_EXPOSE_TO_BUILD(HAVE_MEDIA_ACCESSIBILITY_FRAMEWORK ON)
- endif ()
+WEBKIT_CHECK_HAVE_SYMBOL(HAVE_CACFLAYER_SETCONTENTSSCALE CACFLayerSetContentsScale QuartzCore/CoreAnimationCF.h)
- WEBKIT_CHECK_HAVE_SYMBOL(HAVE_CACFLAYER_SETCONTENTSSCALE CACFLayerSetContentsScale QuartzCore/CoreAnimationCF.h)
-endif ()
-
# Warnings as errors (ignore narrowing conversions)
add_compile_options(/WX /Wv:18)