haikuwebkit/Source/WebCore/PlatformFTW.cmake

255 lines
8.2 KiB
CMake
Raw Permalink Normal View History

include(platform/Curl.cmake)
if (NOT APPLE_BUILD)
include(platform/ImageDecoders.cmake)
endif ()
[OpenSSL] Add stubs and build for Web Crypto https://bugs.webkit.org/show_bug.cgi?id=206449 Reviewed by Jiewen Tan. .: Enable Web Crypto as an experiment for WinCairo and PlayStation. Add the USE_OPENSSL definition to platforms using OpenSSL. * Source/cmake/OptionsFTW.cmake: * Source/cmake/OptionsPlayStation.cmake: * Source/cmake/OptionsWin.cmake: * Source/cmake/OptionsWinCairo.cmake: Source/WebCore: Add stubs for an OpenSSL implementation of Web Crypto. Add the associated CMake files for OpenSSL platforms and reference them on the platforms using OpenSSL. Tests will be enabled as functionality lands. * PlatformFTW.cmake: * PlatformPlayStation.cmake: * PlatformWinCairo.cmake: * crypto/keys/CryptoKeyEC.h: * crypto/keys/CryptoKeyRSA.h: * crypto/openssl/CryptoAlgorithmAES_CBCOpenSSL.cpp: Added. (WebCore::CryptoAlgorithmAES_CBC::platformEncrypt): (WebCore::CryptoAlgorithmAES_CBC::platformDecrypt): * crypto/openssl/CryptoAlgorithmAES_CFBOpenSSL.cpp: Added. (WebCore::CryptoAlgorithmAES_CFB::platformEncrypt): (WebCore::CryptoAlgorithmAES_CFB::platformDecrypt): * crypto/openssl/CryptoAlgorithmAES_CTROpenSSL.cpp: Added. (WebCore::CryptoAlgorithmAES_CTR::platformEncrypt): (WebCore::CryptoAlgorithmAES_CTR::platformDecrypt): * crypto/openssl/CryptoAlgorithmAES_GCMOpenSSL.cpp: Added. (WebCore::CryptoAlgorithmAES_GCM::platformEncrypt): (WebCore::CryptoAlgorithmAES_GCM::platformDecrypt): * crypto/openssl/CryptoAlgorithmAES_KWOpenSSL.cpp: Added. (WebCore::CryptoAlgorithmAES_KW::platformWrapKey): (WebCore::CryptoAlgorithmAES_KW::platformUnwrapKey): * crypto/openssl/CryptoAlgorithmECDHOpenSSL.cpp: Added. (WebCore::CryptoAlgorithmECDH::platformDeriveBits): * crypto/openssl/CryptoAlgorithmECDSAOpenSSL.cpp: Added. (WebCore::CryptoAlgorithmECDSA::platformSign): (WebCore::CryptoAlgorithmECDSA::platformVerify): * crypto/openssl/CryptoAlgorithmHKDFOpenSSL.cpp: Added. (WebCore::CryptoAlgorithmHKDF::platformDeriveBits): * crypto/openssl/CryptoAlgorithmHMACOpenSSL.cpp: Added. (WebCore::CryptoAlgorithmHMAC::platformSign): (WebCore::CryptoAlgorithmHMAC::platformVerify): * crypto/openssl/CryptoAlgorithmPBKDF2OpenSSL.cpp: Added. (WebCore::CryptoAlgorithmPBKDF2::platformDeriveBits): * crypto/openssl/CryptoAlgorithmRSAES_PKCS1_v1_5OpenSSL.cpp: Added. (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformEncrypt): (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformDecrypt): * crypto/openssl/CryptoAlgorithmRSASSA_PKCS1_v1_5OpenSSL.cpp: Added. (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformSign): (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformVerify): * crypto/openssl/CryptoAlgorithmRSA_OAEPOpenSSL.cpp: Added. (WebCore::CryptoAlgorithmRSA_OAEP::platformEncrypt): (WebCore::CryptoAlgorithmRSA_OAEP::platformDecrypt): * crypto/openssl/CryptoAlgorithmRSA_PSSOpenSSL.cpp: Added. (WebCore::CryptoAlgorithmRSA_PSS::platformSign): (WebCore::CryptoAlgorithmRSA_PSS::platformVerify): * crypto/openssl/CryptoAlgorithmRegistryOpenSSL.cpp: Added. (WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms): * crypto/openssl/CryptoKeyECOpenSSL.cpp: Added. (WebCore::CryptoKeyEC::keySizeInBits const): (WebCore::CryptoKeyEC::platformSupportedCurve): (WebCore::CryptoKeyEC::platformGeneratePair): (WebCore::CryptoKeyEC::platformImportRaw): (WebCore::CryptoKeyEC::platformImportJWKPublic): (WebCore::CryptoKeyEC::platformImportJWKPrivate): (WebCore::CryptoKeyEC::platformImportSpki): (WebCore::CryptoKeyEC::platformImportPkcs8): (WebCore::CryptoKeyEC::platformExportRaw const): (WebCore::CryptoKeyEC::platformAddFieldElements const): (WebCore::CryptoKeyEC::platformExportSpki const): (WebCore::CryptoKeyEC::platformExportPkcs8 const): * crypto/openssl/CryptoKeyRSAOpenSSL.cpp: Added. (WebCore::CryptoKeyRSA::create): (WebCore::CryptoKeyRSA::isRestrictedToHash const): (WebCore::CryptoKeyRSA::keySizeInBits const): (WebCore::CryptoKeyRSA::generatePair): (WebCore::CryptoKeyRSA::importSpki): (WebCore::CryptoKeyRSA::importPkcs8): (WebCore::CryptoKeyRSA::exportSpki const): (WebCore::CryptoKeyRSA::exportPkcs8 const): (WebCore::CryptoKeyRSA::exportData const): * crypto/openssl/SerializedCryptoKeyWrapOpenSSL.cpp: Added. (WebCore::getDefaultWebCryptoMasterKey): (WebCore::wrapSerializedCryptoKey): (WebCore::unwrapSerializedCryptoKey): * platform/OpenSSL.cmake: Added. Canonical link: https://commits.webkit.org/219674@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254958 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-01-23 02:45:17 +00:00
include(platform/OpenSSL.cmake)
Use IWICBitmap (rather than ID2D1Bitmap) for NativeImagePtr on FTW https://bugs.webkit.org/show_bug.cgi?id=200093 Reviewed by Dean Jackson. Source/WebCore: When I wrote the original Direct2D code, I did not realize that the backing memory for the ID2D1Bitmap was inaccessible since it is effectively a representation of GPU memory. There is no API to access or modify the pixels. Instead, MSDN documentation indicates that we should be using IWICBitmap objects, which are converted to ID2D1Bitmap objects when things are ready to be rendered. This makes it possible to use the TextureMapper backend to do efficient compositing and tile drawing, since the data backing the bitmap can now be accessed and manipulated, allowing us to support filters and other effects. * PlatformFTW.cmake: * platform/MIMETypeRegistry.cpp: (WebCore::supportedImageMIMETypesForEncoding): * platform/graphics/ANGLEWebKitBridge.h: * platform/graphics/GraphicsContext.h: * platform/graphics/ImageBuffer.h: * platform/graphics/NativeImage.h: * platform/graphics/OpenGLShims.h: * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas): * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp: (WebCore::GraphicsContext3D::GraphicsContext3D): (WebCore::GraphicsContext3D::platformLayer const): * platform/graphics/texmap/BitmapTexture.cpp: (WebCore::BitmapTexture::updateContents): * platform/graphics/texmap/BitmapTextureGL.cpp: (WebCore::BitmapTextureGL::updateContents): * platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp: (WebCore::GraphicsContext3D::~GraphicsContext3D): * platform/graphics/win/GraphicsContextDirect2D.cpp: (WebCore::GraphicsContext::GraphicsContext): (WebCore::GraphicsContext::platformInit): (WebCore::GraphicsContextPlatformPrivate::setAlpha): (WebCore::GraphicsContext::drawNativeImage): (WebCore::GraphicsContext::drawDeviceBitmap): (WebCore::GraphicsContext::releaseWindowsContext): (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate): (WebCore::GraphicsContextPlatformPrivate::beginDraw): (WebCore::GraphicsContextPlatformPrivate::endDraw): (WebCore::GraphicsContext::drawPattern): (WebCore::GraphicsContext::clipPath): * platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h: * platform/graphics/win/ImageBufferDataDirect2D.cpp: (WebCore::ImageBufferData::getData const): (WebCore::ImageBufferData::putData): * platform/graphics/win/ImageBufferDataDirect2D.h: (): Deleted. * platform/graphics/win/ImageBufferDirect2D.cpp: (WebCore::ImageBuffer::createCompatibleBuffer): (WebCore::ImageBuffer::ImageBuffer): (WebCore::createCroppedImageIfNecessary): (WebCore::createBitmapImageAfterScalingIfNeeded): (WebCore::ImageBuffer::copyImage const): (WebCore::ImageBuffer::sinkIntoNativeImage): (WebCore::ImageBuffer::copyNativeImage const): (WebCore::ImageBuffer::draw): * platform/graphics/win/ImageDecoderDirect2D.cpp: (WebCore::ImageDecoderDirect2D::createFrameImageAtIndex): * platform/graphics/win/ImageDirect2D.cpp: (WebCore::BitmapImage::drawFrameMatchingSourceSize): * platform/graphics/win/NativeImageDirect2D.cpp: (WebCore::imagingFactory): (WebCore::nativeImageSize): (WebCore::nativeImageHasAlpha): (WebCore::nativeImageSinglePixelSolidColor): (WebCore::drawNativeImage): (WebCore::clearNativeImageSubimages): * platform/graphics/win/PathDirect2D.cpp: (WebCore::Path::strokeContains const): * platform/graphics/win/PatternDirect2D.cpp: (WebCore::Pattern::createPlatformPattern const): * platform/win/PasteboardWin.cpp: (WebCore::Pasteboard::read): * rendering/RenderElement.cpp: (WebCore::RenderElement::shouldRespectImageOrientation const): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::adjustTiledBackingCoverage): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::nativeImage): Source/WebCore/PAL: * pal/PlatformFTW.cmake: Canonical link: https://commits.webkit.org/213964@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247841 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-07-25 22:02:00 +00:00
include(platform/TextureMapper.cmake)
list(APPEND WebCore_PRIVATE_INCLUDE_DIRECTORIES
"${DirectX_INCLUDE_DIRS}"
"${WEBKIT_LIBRARIES_DIR}/include"
"${WEBCORE_DIR}/accessibility/win"
"${WEBCORE_DIR}/page/win"
"${WEBCORE_DIR}/platform/graphics/egl"
"${WEBCORE_DIR}/platform/graphics/opengl"
"${WEBCORE_DIR}/platform/graphics/opentype"
"${WEBCORE_DIR}/platform/graphics/win"
"${WEBCORE_DIR}/platform/mediacapabilities"
"${WEBCORE_DIR}/platform/network/win"
Use IWICBitmap (rather than ID2D1Bitmap) for NativeImagePtr on FTW https://bugs.webkit.org/show_bug.cgi?id=200093 Reviewed by Dean Jackson. Source/WebCore: When I wrote the original Direct2D code, I did not realize that the backing memory for the ID2D1Bitmap was inaccessible since it is effectively a representation of GPU memory. There is no API to access or modify the pixels. Instead, MSDN documentation indicates that we should be using IWICBitmap objects, which are converted to ID2D1Bitmap objects when things are ready to be rendered. This makes it possible to use the TextureMapper backend to do efficient compositing and tile drawing, since the data backing the bitmap can now be accessed and manipulated, allowing us to support filters and other effects. * PlatformFTW.cmake: * platform/MIMETypeRegistry.cpp: (WebCore::supportedImageMIMETypesForEncoding): * platform/graphics/ANGLEWebKitBridge.h: * platform/graphics/GraphicsContext.h: * platform/graphics/ImageBuffer.h: * platform/graphics/NativeImage.h: * platform/graphics/OpenGLShims.h: * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas): * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp: (WebCore::GraphicsContext3D::GraphicsContext3D): (WebCore::GraphicsContext3D::platformLayer const): * platform/graphics/texmap/BitmapTexture.cpp: (WebCore::BitmapTexture::updateContents): * platform/graphics/texmap/BitmapTextureGL.cpp: (WebCore::BitmapTextureGL::updateContents): * platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp: (WebCore::GraphicsContext3D::~GraphicsContext3D): * platform/graphics/win/GraphicsContextDirect2D.cpp: (WebCore::GraphicsContext::GraphicsContext): (WebCore::GraphicsContext::platformInit): (WebCore::GraphicsContextPlatformPrivate::setAlpha): (WebCore::GraphicsContext::drawNativeImage): (WebCore::GraphicsContext::drawDeviceBitmap): (WebCore::GraphicsContext::releaseWindowsContext): (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate): (WebCore::GraphicsContextPlatformPrivate::beginDraw): (WebCore::GraphicsContextPlatformPrivate::endDraw): (WebCore::GraphicsContext::drawPattern): (WebCore::GraphicsContext::clipPath): * platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h: * platform/graphics/win/ImageBufferDataDirect2D.cpp: (WebCore::ImageBufferData::getData const): (WebCore::ImageBufferData::putData): * platform/graphics/win/ImageBufferDataDirect2D.h: (): Deleted. * platform/graphics/win/ImageBufferDirect2D.cpp: (WebCore::ImageBuffer::createCompatibleBuffer): (WebCore::ImageBuffer::ImageBuffer): (WebCore::createCroppedImageIfNecessary): (WebCore::createBitmapImageAfterScalingIfNeeded): (WebCore::ImageBuffer::copyImage const): (WebCore::ImageBuffer::sinkIntoNativeImage): (WebCore::ImageBuffer::copyNativeImage const): (WebCore::ImageBuffer::draw): * platform/graphics/win/ImageDecoderDirect2D.cpp: (WebCore::ImageDecoderDirect2D::createFrameImageAtIndex): * platform/graphics/win/ImageDirect2D.cpp: (WebCore::BitmapImage::drawFrameMatchingSourceSize): * platform/graphics/win/NativeImageDirect2D.cpp: (WebCore::imagingFactory): (WebCore::nativeImageSize): (WebCore::nativeImageHasAlpha): (WebCore::nativeImageSinglePixelSolidColor): (WebCore::drawNativeImage): (WebCore::clearNativeImageSubimages): * platform/graphics/win/PathDirect2D.cpp: (WebCore::Path::strokeContains const): * platform/graphics/win/PatternDirect2D.cpp: (WebCore::Pattern::createPlatformPattern const): * platform/win/PasteboardWin.cpp: (WebCore::Pasteboard::read): * rendering/RenderElement.cpp: (WebCore::RenderElement::shouldRespectImageOrientation const): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::adjustTiledBackingCoverage): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::nativeImage): Source/WebCore/PAL: * pal/PlatformFTW.cmake: Canonical link: https://commits.webkit.org/213964@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247841 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-07-25 22:02:00 +00:00
"${WEBCORE_DIR}/platform/win"
)
list(APPEND WebCore_SOURCES
Use IWICBitmap (rather than ID2D1Bitmap) for NativeImagePtr on FTW https://bugs.webkit.org/show_bug.cgi?id=200093 Reviewed by Dean Jackson. Source/WebCore: When I wrote the original Direct2D code, I did not realize that the backing memory for the ID2D1Bitmap was inaccessible since it is effectively a representation of GPU memory. There is no API to access or modify the pixels. Instead, MSDN documentation indicates that we should be using IWICBitmap objects, which are converted to ID2D1Bitmap objects when things are ready to be rendered. This makes it possible to use the TextureMapper backend to do efficient compositing and tile drawing, since the data backing the bitmap can now be accessed and manipulated, allowing us to support filters and other effects. * PlatformFTW.cmake: * platform/MIMETypeRegistry.cpp: (WebCore::supportedImageMIMETypesForEncoding): * platform/graphics/ANGLEWebKitBridge.h: * platform/graphics/GraphicsContext.h: * platform/graphics/ImageBuffer.h: * platform/graphics/NativeImage.h: * platform/graphics/OpenGLShims.h: * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas): * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp: (WebCore::GraphicsContext3D::GraphicsContext3D): (WebCore::GraphicsContext3D::platformLayer const): * platform/graphics/texmap/BitmapTexture.cpp: (WebCore::BitmapTexture::updateContents): * platform/graphics/texmap/BitmapTextureGL.cpp: (WebCore::BitmapTextureGL::updateContents): * platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp: (WebCore::GraphicsContext3D::~GraphicsContext3D): * platform/graphics/win/GraphicsContextDirect2D.cpp: (WebCore::GraphicsContext::GraphicsContext): (WebCore::GraphicsContext::platformInit): (WebCore::GraphicsContextPlatformPrivate::setAlpha): (WebCore::GraphicsContext::drawNativeImage): (WebCore::GraphicsContext::drawDeviceBitmap): (WebCore::GraphicsContext::releaseWindowsContext): (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate): (WebCore::GraphicsContextPlatformPrivate::beginDraw): (WebCore::GraphicsContextPlatformPrivate::endDraw): (WebCore::GraphicsContext::drawPattern): (WebCore::GraphicsContext::clipPath): * platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h: * platform/graphics/win/ImageBufferDataDirect2D.cpp: (WebCore::ImageBufferData::getData const): (WebCore::ImageBufferData::putData): * platform/graphics/win/ImageBufferDataDirect2D.h: (): Deleted. * platform/graphics/win/ImageBufferDirect2D.cpp: (WebCore::ImageBuffer::createCompatibleBuffer): (WebCore::ImageBuffer::ImageBuffer): (WebCore::createCroppedImageIfNecessary): (WebCore::createBitmapImageAfterScalingIfNeeded): (WebCore::ImageBuffer::copyImage const): (WebCore::ImageBuffer::sinkIntoNativeImage): (WebCore::ImageBuffer::copyNativeImage const): (WebCore::ImageBuffer::draw): * platform/graphics/win/ImageDecoderDirect2D.cpp: (WebCore::ImageDecoderDirect2D::createFrameImageAtIndex): * platform/graphics/win/ImageDirect2D.cpp: (WebCore::BitmapImage::drawFrameMatchingSourceSize): * platform/graphics/win/NativeImageDirect2D.cpp: (WebCore::imagingFactory): (WebCore::nativeImageSize): (WebCore::nativeImageHasAlpha): (WebCore::nativeImageSinglePixelSolidColor): (WebCore::drawNativeImage): (WebCore::clearNativeImageSubimages): * platform/graphics/win/PathDirect2D.cpp: (WebCore::Path::strokeContains const): * platform/graphics/win/PatternDirect2D.cpp: (WebCore::Pattern::createPlatformPattern const): * platform/win/PasteboardWin.cpp: (WebCore::Pasteboard::read): * rendering/RenderElement.cpp: (WebCore::RenderElement::shouldRespectImageOrientation const): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::adjustTiledBackingCoverage): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::nativeImage): Source/WebCore/PAL: * pal/PlatformFTW.cmake: Canonical link: https://commits.webkit.org/213964@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247841 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-07-25 22:02:00 +00:00
accessibility/win/AXObjectCacheWin.cpp
accessibility/win/AccessibilityObjectWin.cpp
accessibility/win/AccessibilityObjectWrapperWin.cpp
editing/win/EditorWin.cpp
html/HTMLSelectElementWin.cpp
page/win/DragControllerWin.cpp
page/win/EventHandlerWin.cpp
page/win/FrameWin.cpp
page/win/FrameWinDirect2D.cpp
Use IWICBitmap (rather than ID2D1Bitmap) for NativeImagePtr on FTW https://bugs.webkit.org/show_bug.cgi?id=200093 Reviewed by Dean Jackson. Source/WebCore: When I wrote the original Direct2D code, I did not realize that the backing memory for the ID2D1Bitmap was inaccessible since it is effectively a representation of GPU memory. There is no API to access or modify the pixels. Instead, MSDN documentation indicates that we should be using IWICBitmap objects, which are converted to ID2D1Bitmap objects when things are ready to be rendered. This makes it possible to use the TextureMapper backend to do efficient compositing and tile drawing, since the data backing the bitmap can now be accessed and manipulated, allowing us to support filters and other effects. * PlatformFTW.cmake: * platform/MIMETypeRegistry.cpp: (WebCore::supportedImageMIMETypesForEncoding): * platform/graphics/ANGLEWebKitBridge.h: * platform/graphics/GraphicsContext.h: * platform/graphics/ImageBuffer.h: * platform/graphics/NativeImage.h: * platform/graphics/OpenGLShims.h: * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas): * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp: (WebCore::GraphicsContext3D::GraphicsContext3D): (WebCore::GraphicsContext3D::platformLayer const): * platform/graphics/texmap/BitmapTexture.cpp: (WebCore::BitmapTexture::updateContents): * platform/graphics/texmap/BitmapTextureGL.cpp: (WebCore::BitmapTextureGL::updateContents): * platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp: (WebCore::GraphicsContext3D::~GraphicsContext3D): * platform/graphics/win/GraphicsContextDirect2D.cpp: (WebCore::GraphicsContext::GraphicsContext): (WebCore::GraphicsContext::platformInit): (WebCore::GraphicsContextPlatformPrivate::setAlpha): (WebCore::GraphicsContext::drawNativeImage): (WebCore::GraphicsContext::drawDeviceBitmap): (WebCore::GraphicsContext::releaseWindowsContext): (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate): (WebCore::GraphicsContextPlatformPrivate::beginDraw): (WebCore::GraphicsContextPlatformPrivate::endDraw): (WebCore::GraphicsContext::drawPattern): (WebCore::GraphicsContext::clipPath): * platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h: * platform/graphics/win/ImageBufferDataDirect2D.cpp: (WebCore::ImageBufferData::getData const): (WebCore::ImageBufferData::putData): * platform/graphics/win/ImageBufferDataDirect2D.h: (): Deleted. * platform/graphics/win/ImageBufferDirect2D.cpp: (WebCore::ImageBuffer::createCompatibleBuffer): (WebCore::ImageBuffer::ImageBuffer): (WebCore::createCroppedImageIfNecessary): (WebCore::createBitmapImageAfterScalingIfNeeded): (WebCore::ImageBuffer::copyImage const): (WebCore::ImageBuffer::sinkIntoNativeImage): (WebCore::ImageBuffer::copyNativeImage const): (WebCore::ImageBuffer::draw): * platform/graphics/win/ImageDecoderDirect2D.cpp: (WebCore::ImageDecoderDirect2D::createFrameImageAtIndex): * platform/graphics/win/ImageDirect2D.cpp: (WebCore::BitmapImage::drawFrameMatchingSourceSize): * platform/graphics/win/NativeImageDirect2D.cpp: (WebCore::imagingFactory): (WebCore::nativeImageSize): (WebCore::nativeImageHasAlpha): (WebCore::nativeImageSinglePixelSolidColor): (WebCore::drawNativeImage): (WebCore::clearNativeImageSubimages): * platform/graphics/win/PathDirect2D.cpp: (WebCore::Path::strokeContains const): * platform/graphics/win/PatternDirect2D.cpp: (WebCore::Pattern::createPlatformPattern const): * platform/win/PasteboardWin.cpp: (WebCore::Pasteboard::read): * rendering/RenderElement.cpp: (WebCore::RenderElement::shouldRespectImageOrientation const): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::adjustTiledBackingCoverage): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::nativeImage): Source/WebCore/PAL: * pal/PlatformFTW.cmake: Canonical link: https://commits.webkit.org/213964@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247841 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-07-25 22:02:00 +00:00
platform/Cursor.cpp
platform/LocalizedStrings.cpp
platform/StaticPasteboard.cpp
platform/audio/PlatformMediaSessionManager.cpp
platform/generic/KeyedDecoderGeneric.cpp
platform/generic/KeyedEncoderGeneric.cpp
platform/graphics/GLContext.cpp
platform/graphics/PlatformDisplay.cpp
platform/graphics/egl/GLContextEGL.cpp
platform/graphics/opentype/OpenTypeUtilities.cpp
[FTW] Refactor Direct2D code to follow Cairo's model to support modern WebKit https://bugs.webkit.org/show_bug.cgi?id=200270 Reviewed by Dean Jackson. Refactor the Direct2D code in WebCore so that the core routines can be shared between GraphicsContext and GraphicsContextImpl. Implement PlatformContext, BackingStoreBackend, and GraphicsContextImpl for the Direct2D engine. This patch effectively just moves code around. * PlatformFTW.cmake: * platform/graphics/GraphicsContext.h: * platform/graphics/GraphicsContextImpl.h: * platform/graphics/ImageSource.cpp: * platform/graphics/Pattern.h: * platform/graphics/displaylists/DisplayListRecorder.cpp: * platform/graphics/displaylists/DisplayListRecorder.h: * platform/graphics/win/BackingStoreBackendDirect2D.h: Added. * platform/graphics/win/BackingStoreBackendDirect2DImpl.cpp: Added. * platform/graphics/win/BackingStoreBackendDirect2DImpl.h: Added. * platform/graphics/win/Direct2DOperations.cpp: Added. * platform/graphics/win/Direct2DOperations.h: Added. * platform/graphics/win/Direct2DUtilities.cpp: Added. * platform/graphics/win/Direct2DUtilities.h: Added. * platform/graphics/win/FontCascadeDirect2D.cpp: * platform/graphics/win/GradientDirect2D.cpp: * platform/graphics/win/GraphicsContextDirect2D.cpp: * platform/graphics/win/GraphicsContextImplDirect2D.cpp: Added. * platform/graphics/win/GraphicsContextImplDirect2D.h: Added. * platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h: * platform/graphics/win/ImageBufferDataDirect2D.h: * platform/graphics/win/ImageBufferDirect2D.cpp: * platform/graphics/win/NativeImageDirect2D.cpp: * platform/graphics/win/PathDirect2D.cpp: * platform/graphics/win/PatternDirect2D.cpp: * platform/graphics/win/PlatformContextDirect2D.cpp: Added. * platform/graphics/win/PlatformContextDirect2D.h: Added. * platform/win/DragImageWin.cpp: * svg/graphics/SVGImage.cpp: Canonical link: https://commits.webkit.org/214068@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248020 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-07-30 22:36:14 +00:00
platform/graphics/win/BackingStoreBackendDirect2DImpl.cpp
Use IWICBitmap (rather than ID2D1Bitmap) for NativeImagePtr on FTW https://bugs.webkit.org/show_bug.cgi?id=200093 Reviewed by Dean Jackson. Source/WebCore: When I wrote the original Direct2D code, I did not realize that the backing memory for the ID2D1Bitmap was inaccessible since it is effectively a representation of GPU memory. There is no API to access or modify the pixels. Instead, MSDN documentation indicates that we should be using IWICBitmap objects, which are converted to ID2D1Bitmap objects when things are ready to be rendered. This makes it possible to use the TextureMapper backend to do efficient compositing and tile drawing, since the data backing the bitmap can now be accessed and manipulated, allowing us to support filters and other effects. * PlatformFTW.cmake: * platform/MIMETypeRegistry.cpp: (WebCore::supportedImageMIMETypesForEncoding): * platform/graphics/ANGLEWebKitBridge.h: * platform/graphics/GraphicsContext.h: * platform/graphics/ImageBuffer.h: * platform/graphics/NativeImage.h: * platform/graphics/OpenGLShims.h: * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas): * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp: (WebCore::GraphicsContext3D::GraphicsContext3D): (WebCore::GraphicsContext3D::platformLayer const): * platform/graphics/texmap/BitmapTexture.cpp: (WebCore::BitmapTexture::updateContents): * platform/graphics/texmap/BitmapTextureGL.cpp: (WebCore::BitmapTextureGL::updateContents): * platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp: (WebCore::GraphicsContext3D::~GraphicsContext3D): * platform/graphics/win/GraphicsContextDirect2D.cpp: (WebCore::GraphicsContext::GraphicsContext): (WebCore::GraphicsContext::platformInit): (WebCore::GraphicsContextPlatformPrivate::setAlpha): (WebCore::GraphicsContext::drawNativeImage): (WebCore::GraphicsContext::drawDeviceBitmap): (WebCore::GraphicsContext::releaseWindowsContext): (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate): (WebCore::GraphicsContextPlatformPrivate::beginDraw): (WebCore::GraphicsContextPlatformPrivate::endDraw): (WebCore::GraphicsContext::drawPattern): (WebCore::GraphicsContext::clipPath): * platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h: * platform/graphics/win/ImageBufferDataDirect2D.cpp: (WebCore::ImageBufferData::getData const): (WebCore::ImageBufferData::putData): * platform/graphics/win/ImageBufferDataDirect2D.h: (): Deleted. * platform/graphics/win/ImageBufferDirect2D.cpp: (WebCore::ImageBuffer::createCompatibleBuffer): (WebCore::ImageBuffer::ImageBuffer): (WebCore::createCroppedImageIfNecessary): (WebCore::createBitmapImageAfterScalingIfNeeded): (WebCore::ImageBuffer::copyImage const): (WebCore::ImageBuffer::sinkIntoNativeImage): (WebCore::ImageBuffer::copyNativeImage const): (WebCore::ImageBuffer::draw): * platform/graphics/win/ImageDecoderDirect2D.cpp: (WebCore::ImageDecoderDirect2D::createFrameImageAtIndex): * platform/graphics/win/ImageDirect2D.cpp: (WebCore::BitmapImage::drawFrameMatchingSourceSize): * platform/graphics/win/NativeImageDirect2D.cpp: (WebCore::imagingFactory): (WebCore::nativeImageSize): (WebCore::nativeImageHasAlpha): (WebCore::nativeImageSinglePixelSolidColor): (WebCore::drawNativeImage): (WebCore::clearNativeImageSubimages): * platform/graphics/win/PathDirect2D.cpp: (WebCore::Path::strokeContains const): * platform/graphics/win/PatternDirect2D.cpp: (WebCore::Pattern::createPlatformPattern const): * platform/win/PasteboardWin.cpp: (WebCore::Pasteboard::read): * rendering/RenderElement.cpp: (WebCore::RenderElement::shouldRespectImageOrientation const): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::adjustTiledBackingCoverage): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::nativeImage): Source/WebCore/PAL: * pal/PlatformFTW.cmake: Canonical link: https://commits.webkit.org/213964@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247841 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-07-25 22:02:00 +00:00
platform/graphics/win/ColorDirect2D.cpp
platform/graphics/win/ComplexTextControllerDirectWrite.cpp
platform/graphics/win/DIBPixelData.cpp
[FTW] Refactor Direct2D code to follow Cairo's model to support modern WebKit https://bugs.webkit.org/show_bug.cgi?id=200270 Reviewed by Dean Jackson. Refactor the Direct2D code in WebCore so that the core routines can be shared between GraphicsContext and GraphicsContextImpl. Implement PlatformContext, BackingStoreBackend, and GraphicsContextImpl for the Direct2D engine. This patch effectively just moves code around. * PlatformFTW.cmake: * platform/graphics/GraphicsContext.h: * platform/graphics/GraphicsContextImpl.h: * platform/graphics/ImageSource.cpp: * platform/graphics/Pattern.h: * platform/graphics/displaylists/DisplayListRecorder.cpp: * platform/graphics/displaylists/DisplayListRecorder.h: * platform/graphics/win/BackingStoreBackendDirect2D.h: Added. * platform/graphics/win/BackingStoreBackendDirect2DImpl.cpp: Added. * platform/graphics/win/BackingStoreBackendDirect2DImpl.h: Added. * platform/graphics/win/Direct2DOperations.cpp: Added. * platform/graphics/win/Direct2DOperations.h: Added. * platform/graphics/win/Direct2DUtilities.cpp: Added. * platform/graphics/win/Direct2DUtilities.h: Added. * platform/graphics/win/FontCascadeDirect2D.cpp: * platform/graphics/win/GradientDirect2D.cpp: * platform/graphics/win/GraphicsContextDirect2D.cpp: * platform/graphics/win/GraphicsContextImplDirect2D.cpp: Added. * platform/graphics/win/GraphicsContextImplDirect2D.h: Added. * platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h: * platform/graphics/win/ImageBufferDataDirect2D.h: * platform/graphics/win/ImageBufferDirect2D.cpp: * platform/graphics/win/NativeImageDirect2D.cpp: * platform/graphics/win/PathDirect2D.cpp: * platform/graphics/win/PatternDirect2D.cpp: * platform/graphics/win/PlatformContextDirect2D.cpp: Added. * platform/graphics/win/PlatformContextDirect2D.h: Added. * platform/win/DragImageWin.cpp: * svg/graphics/SVGImage.cpp: Canonical link: https://commits.webkit.org/214068@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248020 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-07-30 22:36:14 +00:00
platform/graphics/win/Direct2DOperations.cpp
platform/graphics/win/Direct2DUtilities.cpp
[FTW] Support web fonts https://bugs.webkit.org/show_bug.cgi?id=200771 <rdar://problem/54350291> Reviewed by Dean Jackson. The current code path for handling web fonts uses 'AddFontMemResourceEx'. Unfortunately, this only updates the font caches used by GDI, and is not exposed to DirectWrite. This patch does the following: 1. Moves some code into a new DirectWriteUtilities file, similar to how Direct2D is handled, so we can share code in more places. 2. After adding the font to GDI, it adds the font information to the DirectWrite font cache. 3. Add logic to check the overall system DirectWrite fonts, as well as the custom font cache used for downloaded fonts. * PlatformFTW.cmake: Add DirectWriteUtilities.cpp * css/CSSFontFaceSource.cpp: * loader/cache/CachedFont.cpp: * loader/cache/CachedSVGFont.cpp: * platform/graphics/Font.cpp: * platform/graphics/Font.h: * platform/graphics/FontCache.cpp: * platform/graphics/FontPlatformData.cpp: * platform/graphics/FontPlatformData.h: * platform/graphics/opentype/OpenTypeUtilities.cpp: (WebCore::renameAndActivateFont): * platform/graphics/win/DirectWriteUtilities.cpp: Added. * platform/graphics/win/DirectWriteUtilities.h: Added. * platform/graphics/win/FontCacheWin.cpp: (WebCore::createGDIFont): * platform/graphics/win/FontCascadeDirect2D.cpp: * platform/graphics/win/FontCustomPlatformData.cpp: (WebCore::FontCustomPlatformData::fontPlatformData): * platform/graphics/win/FontPlatformDataDirect2D.cpp: (WebCore::FontPlatformData::platformDataInit): (WebCore::FontPlatformData::FontPlatformData): (WebCore::FontPlatformData::createFallbackFont): * platform/graphics/win/FontPlatformDataWin.cpp: * platform/graphics/win/GlyphPageTreeNodeDirect2D.cpp: (WebCore::GlyphPage::fill): * platform/graphics/win/GraphicsContextDirect2D.cpp: * platform/graphics/win/SimpleFontDataDirect2D.cpp: (WebCore::Font::systemDWriteFactory): Deleted. (WebCore::Font::systemDWriteGdiInterop): Deleted. * platform/graphics/win/SimpleFontDataWin.cpp: Canonical link: https://commits.webkit.org/214523@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248748 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-08-15 21:49:01 +00:00
platform/graphics/win/DirectWriteUtilities.cpp
Use IWICBitmap (rather than ID2D1Bitmap) for NativeImagePtr on FTW https://bugs.webkit.org/show_bug.cgi?id=200093 Reviewed by Dean Jackson. Source/WebCore: When I wrote the original Direct2D code, I did not realize that the backing memory for the ID2D1Bitmap was inaccessible since it is effectively a representation of GPU memory. There is no API to access or modify the pixels. Instead, MSDN documentation indicates that we should be using IWICBitmap objects, which are converted to ID2D1Bitmap objects when things are ready to be rendered. This makes it possible to use the TextureMapper backend to do efficient compositing and tile drawing, since the data backing the bitmap can now be accessed and manipulated, allowing us to support filters and other effects. * PlatformFTW.cmake: * platform/MIMETypeRegistry.cpp: (WebCore::supportedImageMIMETypesForEncoding): * platform/graphics/ANGLEWebKitBridge.h: * platform/graphics/GraphicsContext.h: * platform/graphics/ImageBuffer.h: * platform/graphics/NativeImage.h: * platform/graphics/OpenGLShims.h: * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas): * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp: (WebCore::GraphicsContext3D::GraphicsContext3D): (WebCore::GraphicsContext3D::platformLayer const): * platform/graphics/texmap/BitmapTexture.cpp: (WebCore::BitmapTexture::updateContents): * platform/graphics/texmap/BitmapTextureGL.cpp: (WebCore::BitmapTextureGL::updateContents): * platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp: (WebCore::GraphicsContext3D::~GraphicsContext3D): * platform/graphics/win/GraphicsContextDirect2D.cpp: (WebCore::GraphicsContext::GraphicsContext): (WebCore::GraphicsContext::platformInit): (WebCore::GraphicsContextPlatformPrivate::setAlpha): (WebCore::GraphicsContext::drawNativeImage): (WebCore::GraphicsContext::drawDeviceBitmap): (WebCore::GraphicsContext::releaseWindowsContext): (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate): (WebCore::GraphicsContextPlatformPrivate::beginDraw): (WebCore::GraphicsContextPlatformPrivate::endDraw): (WebCore::GraphicsContext::drawPattern): (WebCore::GraphicsContext::clipPath): * platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h: * platform/graphics/win/ImageBufferDataDirect2D.cpp: (WebCore::ImageBufferData::getData const): (WebCore::ImageBufferData::putData): * platform/graphics/win/ImageBufferDataDirect2D.h: (): Deleted. * platform/graphics/win/ImageBufferDirect2D.cpp: (WebCore::ImageBuffer::createCompatibleBuffer): (WebCore::ImageBuffer::ImageBuffer): (WebCore::createCroppedImageIfNecessary): (WebCore::createBitmapImageAfterScalingIfNeeded): (WebCore::ImageBuffer::copyImage const): (WebCore::ImageBuffer::sinkIntoNativeImage): (WebCore::ImageBuffer::copyNativeImage const): (WebCore::ImageBuffer::draw): * platform/graphics/win/ImageDecoderDirect2D.cpp: (WebCore::ImageDecoderDirect2D::createFrameImageAtIndex): * platform/graphics/win/ImageDirect2D.cpp: (WebCore::BitmapImage::drawFrameMatchingSourceSize): * platform/graphics/win/NativeImageDirect2D.cpp: (WebCore::imagingFactory): (WebCore::nativeImageSize): (WebCore::nativeImageHasAlpha): (WebCore::nativeImageSinglePixelSolidColor): (WebCore::drawNativeImage): (WebCore::clearNativeImageSubimages): * platform/graphics/win/PathDirect2D.cpp: (WebCore::Path::strokeContains const): * platform/graphics/win/PatternDirect2D.cpp: (WebCore::Pattern::createPlatformPattern const): * platform/win/PasteboardWin.cpp: (WebCore::Pasteboard::read): * rendering/RenderElement.cpp: (WebCore::RenderElement::shouldRespectImageOrientation const): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::adjustTiledBackingCoverage): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::nativeImage): Source/WebCore/PAL: * pal/PlatformFTW.cmake: Canonical link: https://commits.webkit.org/213964@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247841 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-07-25 22:02:00 +00:00
platform/graphics/win/FloatPointDirect2D.cpp
platform/graphics/win/FloatRectDirect2D.cpp
platform/graphics/win/FloatSizeDirect2D.cpp
platform/graphics/win/FontCacheWin.cpp
platform/graphics/win/FontCascadeDirect2D.cpp
platform/graphics/win/FontCustomPlatformData.cpp
[Cocoa] USE(PLATFORM_SYSTEM_FALLBACK_LIST) is true on all Cocoa platforms, so there's no need to consult it in Cocoa-specific files https://bugs.webkit.org/show_bug.cgi?id=215684 Reviewed by Darin Adler. Source/WebCore: Removes dead code. No new tests because there is no behavior change. * Configurations/WebCore.xcconfig: * PlatformFTW.cmake: * PlatformWin.cmake: * page/cocoa/MemoryReleaseCocoa.mm: (WebCore::platformReleaseMemory): * platform/FreeType.cmake: * platform/graphics/FontCascadeDescription.cpp: (WebCore::FontCascadeDescription::effectiveFamilyCount const): Deleted. (WebCore::FontCascadeDescription::effectiveFamilyAt const): Deleted. * platform/graphics/cocoa/FontCacheCoreText.cpp: (WebCore::invalidateFontCache): * platform/graphics/cocoa/FontDescriptionCocoa.cpp: (WebCore::FontCascadeDescription::effectiveFamilyAt const): * platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp: (WebCore::FontFamilySpecificationCoreText::fontRanges const): * platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp: * platform/graphics/harfbuzz/FontDescriptionHarfBuzz.cpp: Added. Moved port-specific implementations into port-specific files. (WebCore::FontCascadeDescription::effectiveFamilyCount const): (WebCore::FontCascadeDescription::effectiveFamilyAt const): * platform/graphics/win/FontDescriptionWin.cpp: Added. Moved port-specific implementations into port-specific files. (WebCore::FontCascadeDescription::effectiveFamilyCount const): (WebCore::FontCascadeDescription::effectiveFamilyAt const): Source/WebCore/PAL: * pal/spi/cocoa/CoreTextSPI.h: Source/WTF: * wtf/PlatformUse.h: Canonical link: https://commits.webkit.org/229041@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@266672 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-09-05 21:34:14 +00:00
platform/graphics/win/FontDescriptionWin.cpp
platform/graphics/win/FontPlatformDataDirect2D.cpp
Use IWICBitmap (rather than ID2D1Bitmap) for NativeImagePtr on FTW https://bugs.webkit.org/show_bug.cgi?id=200093 Reviewed by Dean Jackson. Source/WebCore: When I wrote the original Direct2D code, I did not realize that the backing memory for the ID2D1Bitmap was inaccessible since it is effectively a representation of GPU memory. There is no API to access or modify the pixels. Instead, MSDN documentation indicates that we should be using IWICBitmap objects, which are converted to ID2D1Bitmap objects when things are ready to be rendered. This makes it possible to use the TextureMapper backend to do efficient compositing and tile drawing, since the data backing the bitmap can now be accessed and manipulated, allowing us to support filters and other effects. * PlatformFTW.cmake: * platform/MIMETypeRegistry.cpp: (WebCore::supportedImageMIMETypesForEncoding): * platform/graphics/ANGLEWebKitBridge.h: * platform/graphics/GraphicsContext.h: * platform/graphics/ImageBuffer.h: * platform/graphics/NativeImage.h: * platform/graphics/OpenGLShims.h: * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas): * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp: (WebCore::GraphicsContext3D::GraphicsContext3D): (WebCore::GraphicsContext3D::platformLayer const): * platform/graphics/texmap/BitmapTexture.cpp: (WebCore::BitmapTexture::updateContents): * platform/graphics/texmap/BitmapTextureGL.cpp: (WebCore::BitmapTextureGL::updateContents): * platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp: (WebCore::GraphicsContext3D::~GraphicsContext3D): * platform/graphics/win/GraphicsContextDirect2D.cpp: (WebCore::GraphicsContext::GraphicsContext): (WebCore::GraphicsContext::platformInit): (WebCore::GraphicsContextPlatformPrivate::setAlpha): (WebCore::GraphicsContext::drawNativeImage): (WebCore::GraphicsContext::drawDeviceBitmap): (WebCore::GraphicsContext::releaseWindowsContext): (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate): (WebCore::GraphicsContextPlatformPrivate::beginDraw): (WebCore::GraphicsContextPlatformPrivate::endDraw): (WebCore::GraphicsContext::drawPattern): (WebCore::GraphicsContext::clipPath): * platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h: * platform/graphics/win/ImageBufferDataDirect2D.cpp: (WebCore::ImageBufferData::getData const): (WebCore::ImageBufferData::putData): * platform/graphics/win/ImageBufferDataDirect2D.h: (): Deleted. * platform/graphics/win/ImageBufferDirect2D.cpp: (WebCore::ImageBuffer::createCompatibleBuffer): (WebCore::ImageBuffer::ImageBuffer): (WebCore::createCroppedImageIfNecessary): (WebCore::createBitmapImageAfterScalingIfNeeded): (WebCore::ImageBuffer::copyImage const): (WebCore::ImageBuffer::sinkIntoNativeImage): (WebCore::ImageBuffer::copyNativeImage const): (WebCore::ImageBuffer::draw): * platform/graphics/win/ImageDecoderDirect2D.cpp: (WebCore::ImageDecoderDirect2D::createFrameImageAtIndex): * platform/graphics/win/ImageDirect2D.cpp: (WebCore::BitmapImage::drawFrameMatchingSourceSize): * platform/graphics/win/NativeImageDirect2D.cpp: (WebCore::imagingFactory): (WebCore::nativeImageSize): (WebCore::nativeImageHasAlpha): (WebCore::nativeImageSinglePixelSolidColor): (WebCore::drawNativeImage): (WebCore::clearNativeImageSubimages): * platform/graphics/win/PathDirect2D.cpp: (WebCore::Path::strokeContains const): * platform/graphics/win/PatternDirect2D.cpp: (WebCore::Pattern::createPlatformPattern const): * platform/win/PasteboardWin.cpp: (WebCore::Pasteboard::read): * rendering/RenderElement.cpp: (WebCore::RenderElement::shouldRespectImageOrientation const): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::adjustTiledBackingCoverage): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::nativeImage): Source/WebCore/PAL: * pal/PlatformFTW.cmake: Canonical link: https://commits.webkit.org/213964@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247841 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-07-25 22:02:00 +00:00
platform/graphics/win/FontPlatformDataWin.cpp
platform/graphics/win/FontWin.cpp
platform/graphics/win/GlyphPageTreeNodeDirect2D.cpp
platform/graphics/win/GradientDirect2D.cpp
Rename GraphicsContext3D to GraphicsContextGL https://bugs.webkit.org/show_bug.cgi?id=205778 <rdar://problem/58327597> Reviewed by Sam Weinig. Rename all the GraphicsContext3D things to GraphicsContextGL (includes Extensions3D and GRAPHICS_CONTEXT_3D). GraphicsContext3DBase now becomes GraphicsContextGL. GraphicsContext3D is now GraphicsContextGLOpenGL (since it represents the OpenGL implementation of the API). .: * Source/CMakeLists.txt: * Source/cmake/OptionsFTW.cmake: * Source/cmake/OptionsGTK.cmake: * Source/cmake/OptionsMac.cmake: * Source/cmake/OptionsPlayStation.cmake: * Source/cmake/OptionsWPE.cmake: * Source/cmake/OptionsWinCairo.cmake: PerformanceTests: * StitchMarker/wtf/FeatureDefines.h: * StitchMarker/wtf/Platform.h: Source/WebCore: * CMakeLists.txt: * Headers.cmake: * PlatformAppleWin.cmake: * PlatformFTW.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWin.cmake: * Sources.txt: * SourcesCocoa.txt: * SourcesGTK.txt: * SourcesWPE.txt: * WebCore.xcodeproj/project.pbxproj: * html/HTMLVideoElement.cpp: * html/HTMLVideoElement.h: * html/OffscreenCanvas.cpp: * html/canvas/ANGLEInstancedArrays.cpp: * html/canvas/OESVertexArrayObject.cpp: * html/canvas/WebGL2RenderingContext.cpp: * html/canvas/WebGL2RenderingContext.h: * html/canvas/WebGLActiveInfo.h: * html/canvas/WebGLBuffer.cpp: * html/canvas/WebGLBuffer.h: * html/canvas/WebGLCompressedTextureASTC.cpp: * html/canvas/WebGLCompressedTextureATC.cpp: * html/canvas/WebGLCompressedTextureETC.cpp: * html/canvas/WebGLCompressedTextureETC1.cpp: * html/canvas/WebGLCompressedTexturePVRTC.cpp: * html/canvas/WebGLCompressedTextureS3TC.cpp: * html/canvas/WebGLContextAttributes.h: * html/canvas/WebGLContextGroup.cpp: * html/canvas/WebGLContextGroup.h: * html/canvas/WebGLContextObject.cpp: * html/canvas/WebGLContextObject.h: * html/canvas/WebGLDebugShaders.cpp: * html/canvas/WebGLDepthTexture.cpp: * html/canvas/WebGLDepthTexture.h: * html/canvas/WebGLDrawBuffers.cpp: * html/canvas/WebGLFramebuffer.cpp: * html/canvas/WebGLFramebuffer.h: * html/canvas/WebGLObject.cpp: * html/canvas/WebGLObject.h: * html/canvas/WebGLProgram.cpp: * html/canvas/WebGLProgram.h: * html/canvas/WebGLQuery.cpp: * html/canvas/WebGLQuery.h: * html/canvas/WebGLRenderbuffer.cpp: * html/canvas/WebGLRenderbuffer.h: * html/canvas/WebGLRenderingContext.cpp: * html/canvas/WebGLRenderingContext.h: * html/canvas/WebGLRenderingContextBase.cpp: * html/canvas/WebGLRenderingContextBase.h: * html/canvas/WebGLSampler.cpp: * html/canvas/WebGLSampler.h: * html/canvas/WebGLShader.cpp: * html/canvas/WebGLShader.h: * html/canvas/WebGLShaderPrecisionFormat.h: * html/canvas/WebGLSharedObject.cpp: * html/canvas/WebGLSharedObject.h: * html/canvas/WebGLSync.cpp: * html/canvas/WebGLSync.h: * html/canvas/WebGLTexture.cpp: * html/canvas/WebGLTexture.h: * html/canvas/WebGLTransformFeedback.cpp: * html/canvas/WebGLTransformFeedback.h: * html/canvas/WebGLVertexArrayObject.cpp: * html/canvas/WebGLVertexArrayObject.h: * html/canvas/WebGLVertexArrayObjectBase.cpp: * html/canvas/WebGLVertexArrayObjectBase.h: * html/canvas/WebGLVertexArrayObjectOES.cpp: * html/canvas/WebGLVertexArrayObjectOES.h: * inspector/InspectorShaderProgram.cpp: * loader/FrameLoaderClient.h: * page/Chrome.cpp: * platform/SourcesCairo.txt: * platform/TextureMapper.cmake: * platform/WebGLStateTracker.cpp: * platform/WebGLStateTracker.h: * platform/graphics/ANGLEWebKitBridge.cpp: * platform/graphics/ExtensionsGL.h: Renamed from Source/WebCore/platform/graphics/Extensions3D.h. * platform/graphics/FormatConverter.cpp: * platform/graphics/FormatConverter.h: * platform/graphics/GLContext.cpp: * platform/graphics/GLContext.h: * platform/graphics/GraphicsContext.h: * platform/graphics/GraphicsContext3D.cpp: Removed. * platform/graphics/GraphicsContext3DBase.cpp: Removed. * platform/graphics/GraphicsContextGL.cpp: Added. * platform/graphics/GraphicsContextGL.h: Renamed from Source/WebCore/platform/graphics/GraphicsContext3DBase.h. * platform/graphics/GraphicsContextGLAttributes.h: Renamed from Source/WebCore/platform/graphics/GraphicsContext3DAttributes.h. * platform/graphics/ImageBuffer.cpp: * platform/graphics/ImageBuffer.h: * platform/graphics/MediaPlayer.cpp: * platform/graphics/MediaPlayer.h: * platform/graphics/MediaPlayerPrivate.h: * platform/graphics/OpenGLShims.cpp: * platform/graphics/angle/ExtensionsGLANGLE.cpp: Renamed from Source/WebCore/platform/graphics/angle/Extensions3DANGLE.cpp. * platform/graphics/angle/ExtensionsGLANGLE.h: Renamed from Source/WebCore/platform/graphics/angle/Extensions3DANGLE.h. * platform/graphics/angle/GraphicsContextGLANGLE.cpp: Renamed from Source/WebCore/platform/graphics/angle/GraphicsContext3DANGLE.cpp. * platform/graphics/angle/TemporaryANGLESetting.cpp: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: * platform/graphics/cairo/GraphicsContextGLCairo.cpp: Renamed from Source/WebCore/platform/graphics/cairo/GraphicsContext3DCairo.cpp. * platform/graphics/cairo/ImageBufferCairo.cpp: * platform/graphics/cg/GraphicsContextGLCG.cpp: Renamed from Source/WebCore/platform/graphics/cg/GraphicsContext3DCG.cpp. * platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm: Renamed from Source/WebCore/platform/graphics/cocoa/GraphicsContext3DCocoa.mm. * platform/graphics/cocoa/IOSurface.mm: * platform/graphics/cocoa/WebGLLayer.h: * platform/graphics/cocoa/WebGLLayer.mm: * platform/graphics/cpu/arm/GraphicsContextGLNEON.h: Renamed from Source/WebCore/platform/graphics/cpu/arm/GraphicsContext3DNEON.h. * platform/graphics/cv/TextureCacheCV.h: * platform/graphics/cv/TextureCacheCV.mm: * platform/graphics/cv/VideoTextureCopierCV.cpp: * platform/graphics/cv/VideoTextureCopierCV.h: * platform/graphics/egl/GLContextEGL.cpp: * platform/graphics/egl/GLContextEGL.h: * platform/graphics/glx/GLContextGLX.cpp: * platform/graphics/glx/GLContextGLX.h: * platform/graphics/gpu/Texture.cpp: * platform/graphics/gpu/Texture.h: * platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp: * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: * platform/graphics/ios/GraphicsContextGLOpenGLESIOS.h: Renamed from Source/WebCore/platform/graphics/ios/GraphicsContext3DIOS.h. * platform/graphics/nicosia/texmap/NicosiaGC3DANGLELayer.cpp: * platform/graphics/nicosia/texmap/NicosiaGC3DANGLELayer.h: * platform/graphics/nicosia/texmap/NicosiaGC3DLayer.cpp: * platform/graphics/nicosia/texmap/NicosiaGC3DLayer.h: * platform/graphics/opengl/ExtensionsGLOpenGL.cpp: Renamed from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.cpp. * platform/graphics/opengl/ExtensionsGLOpenGL.h: Renamed from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.h. * platform/graphics/opengl/ExtensionsGLOpenGLCommon.cpp: Renamed from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.cpp. * platform/graphics/opengl/ExtensionsGLOpenGLCommon.h: Renamed from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.h. * platform/graphics/opengl/ExtensionsGLOpenGLES.cpp: Renamed from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.cpp. * platform/graphics/opengl/ExtensionsGLOpenGLES.h: Renamed from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.h. * platform/graphics/opengl/GraphicsContextGLOpenGL.cpp: Added. * platform/graphics/opengl/GraphicsContextGLOpenGL.h: Renamed from Source/WebCore/platform/graphics/GraphicsContext3D.h. * platform/graphics/opengl/GraphicsContextGLOpenGLBase.cpp: Renamed from Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp. * platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp: Renamed from Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp. * platform/graphics/opengl/GraphicsContextGLOpenGLES.cpp: Renamed from Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp. * platform/graphics/opengl/GraphicsContextGLOpenGLManager.cpp: Renamed from Source/WebCore/platform/graphics/GraphicsContext3DManager.cpp. * platform/graphics/opengl/GraphicsContextGLOpenGLManager.h: Renamed from Source/WebCore/platform/graphics/GraphicsContext3DManager.h. * platform/graphics/opengl/GraphicsContextGLOpenGLPrivate.cpp: Renamed from Source/WebCore/platform/graphics/GraphicsContext3DPrivate.cpp. * platform/graphics/opengl/GraphicsContextGLOpenGLPrivate.h: Renamed from Source/WebCore/platform/graphics/GraphicsContext3DPrivate.h. * platform/graphics/opengl/TemporaryOpenGLSetting.cpp: * platform/graphics/opengl/TemporaryOpenGLSetting.h: * platform/graphics/texmap/BitmapTextureGL.cpp: * platform/graphics/texmap/GraphicsContextGLTextureMapper.cpp: Renamed from Source/WebCore/platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp. * platform/graphics/texmap/TextureMapperGC3DPlatformLayer.cpp: * platform/graphics/texmap/TextureMapperGC3DPlatformLayer.h: * platform/graphics/texmap/TextureMapperGL.cpp: * platform/graphics/win/GraphicsContextGLDirect2D.cpp: Renamed from Source/WebCore/platform/graphics/win/GraphicsContext3DDirect2D.cpp. * testing/Internals.cpp: Source/WebKit: * CMakeLists.txt: * UIProcess/gtk/WaylandCompositor.cpp: (WebKit::WaylandCompositor::initializeEGL): * UIProcess/mac/HighPerformanceGPUManager.cpp: * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: (WebKit::MediaPlayerPrivateRemote::copyVideoTextureToPlatformTexture): * WebProcess/GPU/media/MediaPlayerPrivateRemote.h: * WebProcess/WebPage/WebPage.cpp: * WebProcess/WebPage/mac/WebPageMac.mm: * WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::displayConfigurationChanged): Source/WTF: * wtf/FeatureDefines.h: * wtf/Platform.h: Tools: * Scripts/webkitpy/common/config/watchlist: Canonical link: https://commits.webkit.org/218939@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254064 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-01-06 18:52:42 +00:00
platform/graphics/win/GraphicsContextGLDirect2D.cpp
platform/graphics/win/GraphicsContextDirect2D.cpp
Use IWICBitmap (rather than ID2D1Bitmap) for NativeImagePtr on FTW https://bugs.webkit.org/show_bug.cgi?id=200093 Reviewed by Dean Jackson. Source/WebCore: When I wrote the original Direct2D code, I did not realize that the backing memory for the ID2D1Bitmap was inaccessible since it is effectively a representation of GPU memory. There is no API to access or modify the pixels. Instead, MSDN documentation indicates that we should be using IWICBitmap objects, which are converted to ID2D1Bitmap objects when things are ready to be rendered. This makes it possible to use the TextureMapper backend to do efficient compositing and tile drawing, since the data backing the bitmap can now be accessed and manipulated, allowing us to support filters and other effects. * PlatformFTW.cmake: * platform/MIMETypeRegistry.cpp: (WebCore::supportedImageMIMETypesForEncoding): * platform/graphics/ANGLEWebKitBridge.h: * platform/graphics/GraphicsContext.h: * platform/graphics/ImageBuffer.h: * platform/graphics/NativeImage.h: * platform/graphics/OpenGLShims.h: * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas): * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp: (WebCore::GraphicsContext3D::GraphicsContext3D): (WebCore::GraphicsContext3D::platformLayer const): * platform/graphics/texmap/BitmapTexture.cpp: (WebCore::BitmapTexture::updateContents): * platform/graphics/texmap/BitmapTextureGL.cpp: (WebCore::BitmapTextureGL::updateContents): * platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp: (WebCore::GraphicsContext3D::~GraphicsContext3D): * platform/graphics/win/GraphicsContextDirect2D.cpp: (WebCore::GraphicsContext::GraphicsContext): (WebCore::GraphicsContext::platformInit): (WebCore::GraphicsContextPlatformPrivate::setAlpha): (WebCore::GraphicsContext::drawNativeImage): (WebCore::GraphicsContext::drawDeviceBitmap): (WebCore::GraphicsContext::releaseWindowsContext): (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate): (WebCore::GraphicsContextPlatformPrivate::beginDraw): (WebCore::GraphicsContextPlatformPrivate::endDraw): (WebCore::GraphicsContext::drawPattern): (WebCore::GraphicsContext::clipPath): * platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h: * platform/graphics/win/ImageBufferDataDirect2D.cpp: (WebCore::ImageBufferData::getData const): (WebCore::ImageBufferData::putData): * platform/graphics/win/ImageBufferDataDirect2D.h: (): Deleted. * platform/graphics/win/ImageBufferDirect2D.cpp: (WebCore::ImageBuffer::createCompatibleBuffer): (WebCore::ImageBuffer::ImageBuffer): (WebCore::createCroppedImageIfNecessary): (WebCore::createBitmapImageAfterScalingIfNeeded): (WebCore::ImageBuffer::copyImage const): (WebCore::ImageBuffer::sinkIntoNativeImage): (WebCore::ImageBuffer::copyNativeImage const): (WebCore::ImageBuffer::draw): * platform/graphics/win/ImageDecoderDirect2D.cpp: (WebCore::ImageDecoderDirect2D::createFrameImageAtIndex): * platform/graphics/win/ImageDirect2D.cpp: (WebCore::BitmapImage::drawFrameMatchingSourceSize): * platform/graphics/win/NativeImageDirect2D.cpp: (WebCore::imagingFactory): (WebCore::nativeImageSize): (WebCore::nativeImageHasAlpha): (WebCore::nativeImageSinglePixelSolidColor): (WebCore::drawNativeImage): (WebCore::clearNativeImageSubimages): * platform/graphics/win/PathDirect2D.cpp: (WebCore::Path::strokeContains const): * platform/graphics/win/PatternDirect2D.cpp: (WebCore::Pattern::createPlatformPattern const): * platform/win/PasteboardWin.cpp: (WebCore::Pasteboard::read): * rendering/RenderElement.cpp: (WebCore::RenderElement::shouldRespectImageOrientation const): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::adjustTiledBackingCoverage): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::nativeImage): Source/WebCore/PAL: * pal/PlatformFTW.cmake: Canonical link: https://commits.webkit.org/213964@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247841 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-07-25 22:02:00 +00:00
platform/graphics/win/GraphicsContextWin.cpp
platform/graphics/win/IconWin.cpp
Allow different back-ends for ImageBuffer https://bugs.webkit.org/show_bug.cgi?id=207048 Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2020-02-18 Reviewed by Tim Horton. Source/WebCore: ImageBuffer will be re-factored to decouple the platform specifics and the back-end details from the interface "ImageBuffer". A class hierarchy for the ImageBufferBackend will added to allow code sharing and to split the code according to the platform and the back-end details. ImageBuffer will be kept interface with the rest of the code but different back-ends will be created. ConcreteImageBuffer is a template class which inherits ImageBuffer and will act as a bridge to the concrete ImageBufferBackend. Based on the RenderingMode, a ConcreteImageBuffer<BackendType> will be created. Instead of checking the renderingMode in many places of the code and instead of and using preprocessor directives, all these decisions will be made in the concrete ImageBufferBackend. This re-factoring will allow creating new types of ImageBuffers backed by new ImageBufferBackends. These new ImageBufferBackends will implement DisplayList drawing and synchronize remote rendering. * Headers.cmake: * PlatformAppleWin.cmake: * PlatformFTW.cmake: * PlatformMac.cmake: * PlatformWin.cmake: * Sources.txt: * SourcesCocoa.txt: * WebCore.xcodeproj/project.pbxproj: * html/CanvasBase.cpp: (WebCore::CanvasBase::setImageBuffer const): * platform/Cairo.cmake: * platform/SourcesCairo.txt: * platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::nativeImageForCurrentFrameRespectingOrientation): * platform/graphics/ConcreteImageBuffer.h: Added. (WebCore::ConcreteImageBuffer::create): (WebCore::ConcreteImageBuffer::ConcreteImageBuffer): (WebCore::ConcreteImageBuffer::ensureBackend const): (WebCore::ConcreteImageBuffer::putImageData): * platform/graphics/ImageBuffer.cpp: (WebCore::ImageBuffer::create): (WebCore::ImageBuffer::createCompatibleBuffer): (WebCore::ImageBuffer::sizeNeedsClamping): (WebCore::ImageBuffer::compatibleBufferSize): (WebCore::ImageBuffer::sinkIntoNativeImage): (WebCore::ImageBuffer::sinkIntoImage): (WebCore::ImageBuffer::drawConsuming): (WebCore::ImageBuffer::toBGRAData const): Deleted. (WebCore::ImageBuffer::transformColorSpace): Deleted. (WebCore::ImageBuffer::genericConvertToLuminanceMask): Deleted. (WebCore::ImageBuffer::convertToLuminanceMask): Deleted. (WebCore::ImageBuffer::platformLayer const): Deleted. (WebCore::ImageBuffer::copyToPlatformTexture): Deleted. (WebCore::ImageBuffer::memoryCost const): Deleted. (WebCore::ImageBuffer::externalMemoryCost const): Deleted. * platform/graphics/ImageBuffer.h: (WebCore::ImageBuffer::draw): (WebCore::ImageBuffer::drawPattern): (WebCore::ImageBuffer::drawConsuming): (WebCore::ImageBuffer::putImageData): (): Deleted. (WebCore::ImageBuffer::internalSize const): Deleted. (WebCore::ImageBuffer::logicalSize const): Deleted. (WebCore::ImageBuffer::resolutionScale const): Deleted. (WebCore::ImageBuffer::baseTransform const): Deleted. * platform/graphics/ImageBufferBackend.cpp: Added. (WebCore::ImageBufferBackend::ImageBufferBackend): (WebCore::ImageBufferBackend::calculateBackendSize): (WebCore::ImageBufferBackend::sinkIntoNativeImage): (WebCore::ImageBufferBackend::sinkIntoImage): (WebCore::ImageBufferBackend::drawConsuming): (WebCore::ImageBufferBackend::convertToLuminanceMask): (WebCore::ImageBufferBackend::toBGRAData const): (WebCore::copyPremultipliedToPremultiplied): (WebCore::copyPremultipliedToUnpremultiplied): (WebCore::copyUnpremultipliedToPremultiplied): (WebCore::copyFunctor): (WebCore::ImageBufferBackend::copyImagePixels const): (WebCore::ImageBufferBackend::getImageData const): (WebCore::ImageBufferBackend::putImageData): * platform/graphics/ImageBufferBackend.h: Added. (WebCore::ImageBufferBackend::flushContext): (WebCore::ImageBufferBackend::logicalSize const): (WebCore::ImageBufferBackend::backendSize const): (WebCore::ImageBufferBackend::resolutionScale const): (WebCore::ImageBufferBackend::colorSpace const): (WebCore::ImageBufferBackend::baseTransform const): (WebCore::ImageBufferBackend::memoryCost const): (WebCore::ImageBufferBackend::externalMemoryCost const): (WebCore::ImageBufferBackend::transformColorSpace): (WebCore::ImageBufferBackend::platformLayer const): (WebCore::ImageBufferBackend::copyToPlatformTexture const): (WebCore::ImageBufferBackend::bytesPerRow const): (WebCore::ImageBufferBackend::backendColorFormat const): (WebCore::ImageBufferBackend::toBackendCoordinates const): (WebCore::ImageBufferBackend::logicalRect const): (WebCore::ImageBufferBackend::backendRect const): * platform/graphics/PlatformImageBuffer.h: Added. * platform/graphics/ShadowBlur.cpp: (WebCore::ShadowBlur::drawShadowBuffer): * platform/graphics/cairo/CairoOperations.cpp: (WebCore::Cairo::drawShadowLayerBuffer): (WebCore::Cairo::drawShadowImage): (WebCore::Cairo::fillShadowBuffer): * platform/graphics/cairo/GraphicsContextCairo.cpp: (WebCore::GraphicsContext::clipToImageBuffer): * platform/graphics/cairo/GraphicsContextImplCairo.cpp: (WebCore::GraphicsContextImplCairo::clipToImageBuffer): * platform/graphics/cairo/ImageBufferCairo.cpp: Removed. * platform/graphics/cairo/ImageBufferCairoBackend.cpp: Added. (WebCore::ImageBufferCairoBackend::copyImage const): (WebCore::ImageBufferCairoBackend::draw): (WebCore::ImageBufferCairoBackend::drawPattern): (WebCore::ImageBufferCairoBackend::transformColorSpace): (WebCore::ImageBufferCairoBackend::toDataURL const): (WebCore::ImageBufferCairoBackend::toData const): * platform/graphics/cairo/ImageBufferCairoBackend.h: Added. (WebCore::ImageBufferCairoBackend::platformTransformColorSpace): * platform/graphics/cairo/ImageBufferCairoGLSurfaceBackend.cpp: Added. (WebCore::clearSurface): (WebCore::ImageBufferCairoGLSurfaceBackend::create): (WebCore::ImageBufferCairoGLSurfaceBackend::ImageBufferCairoGLSurfaceBackend): (WebCore::ImageBufferCairoGLSurfaceBackend::~ImageBufferCairoGLSurfaceBackend): (WebCore::ImageBuffer::platformLayer const): (WebCore::ImageBufferCairoGLSurfaceBackend::copyToPlatformTexture): (WebCore::ImageBufferCairoGLSurfaceBackend::createCompositorBuffer): (WebCore::ImageBufferCairoGLSurfaceBackend::swapBuffersIfNeeded): (WebCore::ImageBufferCairoGLSurfaceBackend::paintToTextureMapper): * platform/graphics/cairo/ImageBufferCairoGLSurfaceBackend.h: Added. * platform/graphics/cairo/ImageBufferCairoImageSurfaceBackend.cpp: Added. (WebCore::ImageBufferCairoImageSurfaceBackend::create): (WebCore::ImageBufferCairoImageSurfaceBackend::ImageBufferCairoImageSurfaceBackend): (WebCore::ImageBufferCairoImageSurfaceBackend::platformTransformColorSpace): * platform/graphics/cairo/ImageBufferCairoImageSurfaceBackend.h: Added. * platform/graphics/cairo/ImageBufferCairoSurfaceBackend.cpp: Added. (WebCore::ImageBufferCairoSurfaceBackend::ImageBufferCairoSurfaceBackend): (WebCore::ImageBufferCairoSurfaceBackend::context const): (WebCore::ImageBufferCairoSurfaceBackend::bytesPerRow const): (WebCore::ImageBufferCairoSurfaceBackend::copyNativeImage const): (WebCore::ImageBufferCairoSurfaceBackend::cairoSurfaceCoerceToImage const): (WebCore::ImageBufferCairoSurfaceBackend::toBGRAData const): (WebCore::ImageBufferCairoSurfaceBackend::getImageData const): (WebCore::ImageBufferCairoSurfaceBackend::putImageData): * platform/graphics/cairo/ImageBufferCairoSurfaceBackend.h: Added. * platform/graphics/cg/ImageBufferCG.cpp: Removed. * platform/graphics/cg/ImageBufferCGBackend.cpp: Added. (WebCore::ImageBufferCGBackend::contextColorSpace): (WebCore::ImageBufferCGBackend::setupContext): (WebCore::createCroppedImageIfNecessary): (WebCore::createBitmapImageAfterScalingIfNeeded): (WebCore::ImageBufferCGBackend::copyImage const): (WebCore::ImageBufferCGBackend::sinkIntoImage): (WebCore::ImageBufferCGBackend::draw): (WebCore::ImageBufferCGBackend::drawPattern): (WebCore::ImageBufferCGBackend::baseTransform const): (WebCore::ImageBufferCGBackend::toCFData const): (WebCore::ImageBufferCGBackend::toData const): (WebCore::ImageBufferCGBackend::toDataURL const): (WebCore::makeVImageBuffer): (WebCore::copyImagePixelsAccelerated): (WebCore::ImageBufferCGBackend::copyImagePixels const): * platform/graphics/cg/ImageBufferCGBackend.h: Added. * platform/graphics/cg/ImageBufferCGBitmapBackend.cpp: Added. (WebCore::ImageBufferCGBitmapBackend::create): (WebCore::ImageBufferCGBitmapBackend::ImageBufferCGBitmapBackend): (WebCore::ImageBufferCGBitmapBackend::context const): (WebCore::ImageBufferCGBitmapBackend::copyNativeImage const): (WebCore::ImageBufferCGBitmapBackend::toBGRAData const): (WebCore::ImageBufferCGBitmapBackend::getImageData const): (WebCore::ImageBufferCGBitmapBackend::putImageData): * platform/graphics/cg/ImageBufferCGBitmapBackend.h: Added. * platform/graphics/cg/ImageBufferDataCG.cpp: Removed. * platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp: Added. (WebCore::ImageBufferIOSurfaceBackend::calculateBackendSize): (WebCore::ImageBufferIOSurfaceBackend::contextColorSpace): (WebCore::ImageBufferIOSurfaceBackend::create): (WebCore::ImageBufferIOSurfaceBackend::ImageBufferIOSurfaceBackend): (WebCore::ImageBufferIOSurfaceBackend::context const): (WebCore::ImageBufferIOSurfaceBackend::flushContext): (WebCore::ImageBufferIOSurfaceBackend::memoryCost const): (WebCore::ImageBufferIOSurfaceBackend::externalMemoryCost const): (WebCore::ImageBufferIOSurfaceBackend::bytesPerRow const): (WebCore::ImageBufferIOSurfaceBackend::backendColorFormat const): (WebCore::ImageBufferIOSurfaceBackend::copyNativeImage const): (WebCore::ImageBufferIOSurfaceBackend::sinkIntoNativeImage): (WebCore::ImageBufferIOSurfaceBackend::drawConsuming): (WebCore::ImageBufferIOSurfaceBackend::toBGRAData const): (WebCore::ImageBufferIOSurfaceBackend::getImageData const): (WebCore::ImageBufferIOSurfaceBackend::putImageData): * platform/graphics/cg/ImageBufferIOSurfaceBackend.h: Added. * platform/graphics/cg/PDFDocumentImage.cpp: (WebCore::PDFDocumentImage::updateCachedImageIfNeeded): * platform/graphics/cocoa/IOSurface.mm: (WebCore::IOSurface::createFromImageBuffer): Deleted. * platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp: (WebCore::GraphicsContextGLOpenGL::paintRenderingResultsToCanvas): * platform/graphics/win/ImageBufferDataDirect2D.cpp: Removed. * platform/graphics/win/ImageBufferDataDirect2D.h: Removed. * platform/graphics/win/ImageBufferDirect2D.cpp: Removed. * platform/graphics/win/ImageBufferDirect2DBackend.cpp: Added. (WebCore::ImageBufferDirect2DBackend::create): (WebCore::ImageBufferDirect2DBackend::ImageBufferDirect2DBackend): (WebCore::ImageBufferDirect2DBackend::context const): (WebCore::ImageBufferDirect2DBackend::flushContext): (WebCore::ImageBufferDirect2DBackend::copyNativeImage const): (WebCore::createCroppedImageIfNecessary): (WebCore::createBitmapImageAfterScalingIfNeeded): (WebCore::ImageBufferDirect2DBackend::copyImage const): (WebCore::ImageBufferDirect2DBackend::sinkIntoImage): (WebCore::ImageBufferDirect2DBackend::compatibleBitmap): (WebCore::ImageBufferDirect2DBackend::draw): (WebCore::ImageBufferDirect2DBackend::drawPattern): (WebCore::ImageBufferDirect2DBackend::toDataURL const): (WebCore::ImageBufferDirect2DBackend::toData const): (WebCore::ImageBufferDirect2DBackend::toBGRAData const): (WebCore::ImageBufferDirect2DBackend::getImageData const): (WebCore::ImageBufferDirect2DBackend::putImageData): * platform/graphics/win/ImageBufferDirect2DBackend.h: Added. * platform/mediastream/gstreamer/MockGStreamerVideoCaptureSource.cpp: (WebCore::WrappedMockRealtimeVideoSource::updateSampleBuffer): * rendering/svg/SVGRenderingContext.cpp: (WebCore::SVGRenderingContext::bufferForeground): Source/WebKit: * WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::createSelectionSnapshot const): Canonical link: https://commits.webkit.org/220895@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@256892 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-19 01:12:47 +00:00
platform/graphics/win/ImageBufferDirect2DBackend.cpp
platform/graphics/win/ImageDecoderDirect2D.cpp
platform/graphics/win/ImageDirect2D.cpp
Use IWICBitmap (rather than ID2D1Bitmap) for NativeImagePtr on FTW https://bugs.webkit.org/show_bug.cgi?id=200093 Reviewed by Dean Jackson. Source/WebCore: When I wrote the original Direct2D code, I did not realize that the backing memory for the ID2D1Bitmap was inaccessible since it is effectively a representation of GPU memory. There is no API to access or modify the pixels. Instead, MSDN documentation indicates that we should be using IWICBitmap objects, which are converted to ID2D1Bitmap objects when things are ready to be rendered. This makes it possible to use the TextureMapper backend to do efficient compositing and tile drawing, since the data backing the bitmap can now be accessed and manipulated, allowing us to support filters and other effects. * PlatformFTW.cmake: * platform/MIMETypeRegistry.cpp: (WebCore::supportedImageMIMETypesForEncoding): * platform/graphics/ANGLEWebKitBridge.h: * platform/graphics/GraphicsContext.h: * platform/graphics/ImageBuffer.h: * platform/graphics/NativeImage.h: * platform/graphics/OpenGLShims.h: * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas): * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp: (WebCore::GraphicsContext3D::GraphicsContext3D): (WebCore::GraphicsContext3D::platformLayer const): * platform/graphics/texmap/BitmapTexture.cpp: (WebCore::BitmapTexture::updateContents): * platform/graphics/texmap/BitmapTextureGL.cpp: (WebCore::BitmapTextureGL::updateContents): * platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp: (WebCore::GraphicsContext3D::~GraphicsContext3D): * platform/graphics/win/GraphicsContextDirect2D.cpp: (WebCore::GraphicsContext::GraphicsContext): (WebCore::GraphicsContext::platformInit): (WebCore::GraphicsContextPlatformPrivate::setAlpha): (WebCore::GraphicsContext::drawNativeImage): (WebCore::GraphicsContext::drawDeviceBitmap): (WebCore::GraphicsContext::releaseWindowsContext): (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate): (WebCore::GraphicsContextPlatformPrivate::beginDraw): (WebCore::GraphicsContextPlatformPrivate::endDraw): (WebCore::GraphicsContext::drawPattern): (WebCore::GraphicsContext::clipPath): * platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h: * platform/graphics/win/ImageBufferDataDirect2D.cpp: (WebCore::ImageBufferData::getData const): (WebCore::ImageBufferData::putData): * platform/graphics/win/ImageBufferDataDirect2D.h: (): Deleted. * platform/graphics/win/ImageBufferDirect2D.cpp: (WebCore::ImageBuffer::createCompatibleBuffer): (WebCore::ImageBuffer::ImageBuffer): (WebCore::createCroppedImageIfNecessary): (WebCore::createBitmapImageAfterScalingIfNeeded): (WebCore::ImageBuffer::copyImage const): (WebCore::ImageBuffer::sinkIntoNativeImage): (WebCore::ImageBuffer::copyNativeImage const): (WebCore::ImageBuffer::draw): * platform/graphics/win/ImageDecoderDirect2D.cpp: (WebCore::ImageDecoderDirect2D::createFrameImageAtIndex): * platform/graphics/win/ImageDirect2D.cpp: (WebCore::BitmapImage::drawFrameMatchingSourceSize): * platform/graphics/win/NativeImageDirect2D.cpp: (WebCore::imagingFactory): (WebCore::nativeImageSize): (WebCore::nativeImageHasAlpha): (WebCore::nativeImageSinglePixelSolidColor): (WebCore::drawNativeImage): (WebCore::clearNativeImageSubimages): * platform/graphics/win/PathDirect2D.cpp: (WebCore::Path::strokeContains const): * platform/graphics/win/PatternDirect2D.cpp: (WebCore::Pattern::createPlatformPattern const): * platform/win/PasteboardWin.cpp: (WebCore::Pasteboard::read): * rendering/RenderElement.cpp: (WebCore::RenderElement::shouldRespectImageOrientation const): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::adjustTiledBackingCoverage): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::nativeImage): Source/WebCore/PAL: * pal/PlatformFTW.cmake: Canonical link: https://commits.webkit.org/213964@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247841 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-07-25 22:02:00 +00:00
platform/graphics/win/ImageWin.cpp
platform/graphics/win/IntPointWin.cpp
platform/graphics/win/IntRectWin.cpp
platform/graphics/win/IntSizeWin.cpp
platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp
platform/graphics/win/NativeImageDirect2D.cpp
platform/graphics/win/PathDirect2D.cpp
platform/graphics/win/PatternDirect2D.cpp
[FTW] Refactor Direct2D code to follow Cairo's model to support modern WebKit https://bugs.webkit.org/show_bug.cgi?id=200270 Reviewed by Dean Jackson. Refactor the Direct2D code in WebCore so that the core routines can be shared between GraphicsContext and GraphicsContextImpl. Implement PlatformContext, BackingStoreBackend, and GraphicsContextImpl for the Direct2D engine. This patch effectively just moves code around. * PlatformFTW.cmake: * platform/graphics/GraphicsContext.h: * platform/graphics/GraphicsContextImpl.h: * platform/graphics/ImageSource.cpp: * platform/graphics/Pattern.h: * platform/graphics/displaylists/DisplayListRecorder.cpp: * platform/graphics/displaylists/DisplayListRecorder.h: * platform/graphics/win/BackingStoreBackendDirect2D.h: Added. * platform/graphics/win/BackingStoreBackendDirect2DImpl.cpp: Added. * platform/graphics/win/BackingStoreBackendDirect2DImpl.h: Added. * platform/graphics/win/Direct2DOperations.cpp: Added. * platform/graphics/win/Direct2DOperations.h: Added. * platform/graphics/win/Direct2DUtilities.cpp: Added. * platform/graphics/win/Direct2DUtilities.h: Added. * platform/graphics/win/FontCascadeDirect2D.cpp: * platform/graphics/win/GradientDirect2D.cpp: * platform/graphics/win/GraphicsContextDirect2D.cpp: * platform/graphics/win/GraphicsContextImplDirect2D.cpp: Added. * platform/graphics/win/GraphicsContextImplDirect2D.h: Added. * platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h: * platform/graphics/win/ImageBufferDataDirect2D.h: * platform/graphics/win/ImageBufferDirect2D.cpp: * platform/graphics/win/NativeImageDirect2D.cpp: * platform/graphics/win/PathDirect2D.cpp: * platform/graphics/win/PatternDirect2D.cpp: * platform/graphics/win/PlatformContextDirect2D.cpp: Added. * platform/graphics/win/PlatformContextDirect2D.h: Added. * platform/win/DragImageWin.cpp: * svg/graphics/SVGImage.cpp: Canonical link: https://commits.webkit.org/214068@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248020 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-07-30 22:36:14 +00:00
platform/graphics/win/PlatformContextDirect2D.cpp
Use IWICBitmap (rather than ID2D1Bitmap) for NativeImagePtr on FTW https://bugs.webkit.org/show_bug.cgi?id=200093 Reviewed by Dean Jackson. Source/WebCore: When I wrote the original Direct2D code, I did not realize that the backing memory for the ID2D1Bitmap was inaccessible since it is effectively a representation of GPU memory. There is no API to access or modify the pixels. Instead, MSDN documentation indicates that we should be using IWICBitmap objects, which are converted to ID2D1Bitmap objects when things are ready to be rendered. This makes it possible to use the TextureMapper backend to do efficient compositing and tile drawing, since the data backing the bitmap can now be accessed and manipulated, allowing us to support filters and other effects. * PlatformFTW.cmake: * platform/MIMETypeRegistry.cpp: (WebCore::supportedImageMIMETypesForEncoding): * platform/graphics/ANGLEWebKitBridge.h: * platform/graphics/GraphicsContext.h: * platform/graphics/ImageBuffer.h: * platform/graphics/NativeImage.h: * platform/graphics/OpenGLShims.h: * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas): * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp: (WebCore::GraphicsContext3D::GraphicsContext3D): (WebCore::GraphicsContext3D::platformLayer const): * platform/graphics/texmap/BitmapTexture.cpp: (WebCore::BitmapTexture::updateContents): * platform/graphics/texmap/BitmapTextureGL.cpp: (WebCore::BitmapTextureGL::updateContents): * platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp: (WebCore::GraphicsContext3D::~GraphicsContext3D): * platform/graphics/win/GraphicsContextDirect2D.cpp: (WebCore::GraphicsContext::GraphicsContext): (WebCore::GraphicsContext::platformInit): (WebCore::GraphicsContextPlatformPrivate::setAlpha): (WebCore::GraphicsContext::drawNativeImage): (WebCore::GraphicsContext::drawDeviceBitmap): (WebCore::GraphicsContext::releaseWindowsContext): (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate): (WebCore::GraphicsContextPlatformPrivate::beginDraw): (WebCore::GraphicsContextPlatformPrivate::endDraw): (WebCore::GraphicsContext::drawPattern): (WebCore::GraphicsContext::clipPath): * platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h: * platform/graphics/win/ImageBufferDataDirect2D.cpp: (WebCore::ImageBufferData::getData const): (WebCore::ImageBufferData::putData): * platform/graphics/win/ImageBufferDataDirect2D.h: (): Deleted. * platform/graphics/win/ImageBufferDirect2D.cpp: (WebCore::ImageBuffer::createCompatibleBuffer): (WebCore::ImageBuffer::ImageBuffer): (WebCore::createCroppedImageIfNecessary): (WebCore::createBitmapImageAfterScalingIfNeeded): (WebCore::ImageBuffer::copyImage const): (WebCore::ImageBuffer::sinkIntoNativeImage): (WebCore::ImageBuffer::copyNativeImage const): (WebCore::ImageBuffer::draw): * platform/graphics/win/ImageDecoderDirect2D.cpp: (WebCore::ImageDecoderDirect2D::createFrameImageAtIndex): * platform/graphics/win/ImageDirect2D.cpp: (WebCore::BitmapImage::drawFrameMatchingSourceSize): * platform/graphics/win/NativeImageDirect2D.cpp: (WebCore::imagingFactory): (WebCore::nativeImageSize): (WebCore::nativeImageHasAlpha): (WebCore::nativeImageSinglePixelSolidColor): (WebCore::drawNativeImage): (WebCore::clearNativeImageSubimages): * platform/graphics/win/PathDirect2D.cpp: (WebCore::Path::strokeContains const): * platform/graphics/win/PatternDirect2D.cpp: (WebCore::Pattern::createPlatformPattern const): * platform/win/PasteboardWin.cpp: (WebCore::Pasteboard::read): * rendering/RenderElement.cpp: (WebCore::RenderElement::shouldRespectImageOrientation const): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::adjustTiledBackingCoverage): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::nativeImage): Source/WebCore/PAL: * pal/PlatformFTW.cmake: Canonical link: https://commits.webkit.org/213964@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247841 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-07-25 22:02:00 +00:00
platform/graphics/win/SimpleFontDataWin.cpp
platform/graphics/win/SimpleFontDataDirect2D.cpp
platform/graphics/win/TextAnalyzerHelper.cpp
Use IWICBitmap (rather than ID2D1Bitmap) for NativeImagePtr on FTW https://bugs.webkit.org/show_bug.cgi?id=200093 Reviewed by Dean Jackson. Source/WebCore: When I wrote the original Direct2D code, I did not realize that the backing memory for the ID2D1Bitmap was inaccessible since it is effectively a representation of GPU memory. There is no API to access or modify the pixels. Instead, MSDN documentation indicates that we should be using IWICBitmap objects, which are converted to ID2D1Bitmap objects when things are ready to be rendered. This makes it possible to use the TextureMapper backend to do efficient compositing and tile drawing, since the data backing the bitmap can now be accessed and manipulated, allowing us to support filters and other effects. * PlatformFTW.cmake: * platform/MIMETypeRegistry.cpp: (WebCore::supportedImageMIMETypesForEncoding): * platform/graphics/ANGLEWebKitBridge.h: * platform/graphics/GraphicsContext.h: * platform/graphics/ImageBuffer.h: * platform/graphics/NativeImage.h: * platform/graphics/OpenGLShims.h: * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas): * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp: (WebCore::GraphicsContext3D::GraphicsContext3D): (WebCore::GraphicsContext3D::platformLayer const): * platform/graphics/texmap/BitmapTexture.cpp: (WebCore::BitmapTexture::updateContents): * platform/graphics/texmap/BitmapTextureGL.cpp: (WebCore::BitmapTextureGL::updateContents): * platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp: (WebCore::GraphicsContext3D::~GraphicsContext3D): * platform/graphics/win/GraphicsContextDirect2D.cpp: (WebCore::GraphicsContext::GraphicsContext): (WebCore::GraphicsContext::platformInit): (WebCore::GraphicsContextPlatformPrivate::setAlpha): (WebCore::GraphicsContext::drawNativeImage): (WebCore::GraphicsContext::drawDeviceBitmap): (WebCore::GraphicsContext::releaseWindowsContext): (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate): (WebCore::GraphicsContextPlatformPrivate::beginDraw): (WebCore::GraphicsContextPlatformPrivate::endDraw): (WebCore::GraphicsContext::drawPattern): (WebCore::GraphicsContext::clipPath): * platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h: * platform/graphics/win/ImageBufferDataDirect2D.cpp: (WebCore::ImageBufferData::getData const): (WebCore::ImageBufferData::putData): * platform/graphics/win/ImageBufferDataDirect2D.h: (): Deleted. * platform/graphics/win/ImageBufferDirect2D.cpp: (WebCore::ImageBuffer::createCompatibleBuffer): (WebCore::ImageBuffer::ImageBuffer): (WebCore::createCroppedImageIfNecessary): (WebCore::createBitmapImageAfterScalingIfNeeded): (WebCore::ImageBuffer::copyImage const): (WebCore::ImageBuffer::sinkIntoNativeImage): (WebCore::ImageBuffer::copyNativeImage const): (WebCore::ImageBuffer::draw): * platform/graphics/win/ImageDecoderDirect2D.cpp: (WebCore::ImageDecoderDirect2D::createFrameImageAtIndex): * platform/graphics/win/ImageDirect2D.cpp: (WebCore::BitmapImage::drawFrameMatchingSourceSize): * platform/graphics/win/NativeImageDirect2D.cpp: (WebCore::imagingFactory): (WebCore::nativeImageSize): (WebCore::nativeImageHasAlpha): (WebCore::nativeImageSinglePixelSolidColor): (WebCore::drawNativeImage): (WebCore::clearNativeImageSubimages): * platform/graphics/win/PathDirect2D.cpp: (WebCore::Path::strokeContains const): * platform/graphics/win/PatternDirect2D.cpp: (WebCore::Pattern::createPlatformPattern const): * platform/win/PasteboardWin.cpp: (WebCore::Pasteboard::read): * rendering/RenderElement.cpp: (WebCore::RenderElement::shouldRespectImageOrientation const): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::adjustTiledBackingCoverage): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::nativeImage): Source/WebCore/PAL: * pal/PlatformFTW.cmake: Canonical link: https://commits.webkit.org/213964@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247841 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-07-25 22:02:00 +00:00
platform/graphics/win/TransformationMatrixDirect2D.cpp
platform/graphics/win/TransformationMatrixWin.cpp
platform/network/win/CurlSSLHandleWin.cpp
Use IWICBitmap (rather than ID2D1Bitmap) for NativeImagePtr on FTW https://bugs.webkit.org/show_bug.cgi?id=200093 Reviewed by Dean Jackson. Source/WebCore: When I wrote the original Direct2D code, I did not realize that the backing memory for the ID2D1Bitmap was inaccessible since it is effectively a representation of GPU memory. There is no API to access or modify the pixels. Instead, MSDN documentation indicates that we should be using IWICBitmap objects, which are converted to ID2D1Bitmap objects when things are ready to be rendered. This makes it possible to use the TextureMapper backend to do efficient compositing and tile drawing, since the data backing the bitmap can now be accessed and manipulated, allowing us to support filters and other effects. * PlatformFTW.cmake: * platform/MIMETypeRegistry.cpp: (WebCore::supportedImageMIMETypesForEncoding): * platform/graphics/ANGLEWebKitBridge.h: * platform/graphics/GraphicsContext.h: * platform/graphics/ImageBuffer.h: * platform/graphics/NativeImage.h: * platform/graphics/OpenGLShims.h: * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas): * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp: (WebCore::GraphicsContext3D::GraphicsContext3D): (WebCore::GraphicsContext3D::platformLayer const): * platform/graphics/texmap/BitmapTexture.cpp: (WebCore::BitmapTexture::updateContents): * platform/graphics/texmap/BitmapTextureGL.cpp: (WebCore::BitmapTextureGL::updateContents): * platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp: (WebCore::GraphicsContext3D::~GraphicsContext3D): * platform/graphics/win/GraphicsContextDirect2D.cpp: (WebCore::GraphicsContext::GraphicsContext): (WebCore::GraphicsContext::platformInit): (WebCore::GraphicsContextPlatformPrivate::setAlpha): (WebCore::GraphicsContext::drawNativeImage): (WebCore::GraphicsContext::drawDeviceBitmap): (WebCore::GraphicsContext::releaseWindowsContext): (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate): (WebCore::GraphicsContextPlatformPrivate::beginDraw): (WebCore::GraphicsContextPlatformPrivate::endDraw): (WebCore::GraphicsContext::drawPattern): (WebCore::GraphicsContext::clipPath): * platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h: * platform/graphics/win/ImageBufferDataDirect2D.cpp: (WebCore::ImageBufferData::getData const): (WebCore::ImageBufferData::putData): * platform/graphics/win/ImageBufferDataDirect2D.h: (): Deleted. * platform/graphics/win/ImageBufferDirect2D.cpp: (WebCore::ImageBuffer::createCompatibleBuffer): (WebCore::ImageBuffer::ImageBuffer): (WebCore::createCroppedImageIfNecessary): (WebCore::createBitmapImageAfterScalingIfNeeded): (WebCore::ImageBuffer::copyImage const): (WebCore::ImageBuffer::sinkIntoNativeImage): (WebCore::ImageBuffer::copyNativeImage const): (WebCore::ImageBuffer::draw): * platform/graphics/win/ImageDecoderDirect2D.cpp: (WebCore::ImageDecoderDirect2D::createFrameImageAtIndex): * platform/graphics/win/ImageDirect2D.cpp: (WebCore::BitmapImage::drawFrameMatchingSourceSize): * platform/graphics/win/NativeImageDirect2D.cpp: (WebCore::imagingFactory): (WebCore::nativeImageSize): (WebCore::nativeImageHasAlpha): (WebCore::nativeImageSinglePixelSolidColor): (WebCore::drawNativeImage): (WebCore::clearNativeImageSubimages): * platform/graphics/win/PathDirect2D.cpp: (WebCore::Path::strokeContains const): * platform/graphics/win/PatternDirect2D.cpp: (WebCore::Pattern::createPlatformPattern const): * platform/win/PasteboardWin.cpp: (WebCore::Pasteboard::read): * rendering/RenderElement.cpp: (WebCore::RenderElement::shouldRespectImageOrientation const): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::adjustTiledBackingCoverage): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::nativeImage): Source/WebCore/PAL: * pal/PlatformFTW.cmake: Canonical link: https://commits.webkit.org/213964@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247841 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-07-25 22:02:00 +00:00
platform/network/win/DownloadBundleWin.cpp
platform/network/win/NetworkStateNotifierWin.cpp
Use IWICBitmap (rather than ID2D1Bitmap) for NativeImagePtr on FTW https://bugs.webkit.org/show_bug.cgi?id=200093 Reviewed by Dean Jackson. Source/WebCore: When I wrote the original Direct2D code, I did not realize that the backing memory for the ID2D1Bitmap was inaccessible since it is effectively a representation of GPU memory. There is no API to access or modify the pixels. Instead, MSDN documentation indicates that we should be using IWICBitmap objects, which are converted to ID2D1Bitmap objects when things are ready to be rendered. This makes it possible to use the TextureMapper backend to do efficient compositing and tile drawing, since the data backing the bitmap can now be accessed and manipulated, allowing us to support filters and other effects. * PlatformFTW.cmake: * platform/MIMETypeRegistry.cpp: (WebCore::supportedImageMIMETypesForEncoding): * platform/graphics/ANGLEWebKitBridge.h: * platform/graphics/GraphicsContext.h: * platform/graphics/ImageBuffer.h: * platform/graphics/NativeImage.h: * platform/graphics/OpenGLShims.h: * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas): * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp: (WebCore::GraphicsContext3D::GraphicsContext3D): (WebCore::GraphicsContext3D::platformLayer const): * platform/graphics/texmap/BitmapTexture.cpp: (WebCore::BitmapTexture::updateContents): * platform/graphics/texmap/BitmapTextureGL.cpp: (WebCore::BitmapTextureGL::updateContents): * platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp: (WebCore::GraphicsContext3D::~GraphicsContext3D): * platform/graphics/win/GraphicsContextDirect2D.cpp: (WebCore::GraphicsContext::GraphicsContext): (WebCore::GraphicsContext::platformInit): (WebCore::GraphicsContextPlatformPrivate::setAlpha): (WebCore::GraphicsContext::drawNativeImage): (WebCore::GraphicsContext::drawDeviceBitmap): (WebCore::GraphicsContext::releaseWindowsContext): (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate): (WebCore::GraphicsContextPlatformPrivate::beginDraw): (WebCore::GraphicsContextPlatformPrivate::endDraw): (WebCore::GraphicsContext::drawPattern): (WebCore::GraphicsContext::clipPath): * platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h: * platform/graphics/win/ImageBufferDataDirect2D.cpp: (WebCore::ImageBufferData::getData const): (WebCore::ImageBufferData::putData): * platform/graphics/win/ImageBufferDataDirect2D.h: (): Deleted. * platform/graphics/win/ImageBufferDirect2D.cpp: (WebCore::ImageBuffer::createCompatibleBuffer): (WebCore::ImageBuffer::ImageBuffer): (WebCore::createCroppedImageIfNecessary): (WebCore::createBitmapImageAfterScalingIfNeeded): (WebCore::ImageBuffer::copyImage const): (WebCore::ImageBuffer::sinkIntoNativeImage): (WebCore::ImageBuffer::copyNativeImage const): (WebCore::ImageBuffer::draw): * platform/graphics/win/ImageDecoderDirect2D.cpp: (WebCore::ImageDecoderDirect2D::createFrameImageAtIndex): * platform/graphics/win/ImageDirect2D.cpp: (WebCore::BitmapImage::drawFrameMatchingSourceSize): * platform/graphics/win/NativeImageDirect2D.cpp: (WebCore::imagingFactory): (WebCore::nativeImageSize): (WebCore::nativeImageHasAlpha): (WebCore::nativeImageSinglePixelSolidColor): (WebCore::drawNativeImage): (WebCore::clearNativeImageSubimages): * platform/graphics/win/PathDirect2D.cpp: (WebCore::Path::strokeContains const): * platform/graphics/win/PatternDirect2D.cpp: (WebCore::Pattern::createPlatformPattern const): * platform/win/PasteboardWin.cpp: (WebCore::Pasteboard::read): * rendering/RenderElement.cpp: (WebCore::RenderElement::shouldRespectImageOrientation const): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::adjustTiledBackingCoverage): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::nativeImage): Source/WebCore/PAL: * pal/PlatformFTW.cmake: Canonical link: https://commits.webkit.org/213964@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247841 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-07-25 22:02:00 +00:00
platform/text/Hyphenation.cpp
platform/text/win/LocaleWin.cpp
Use IWICBitmap (rather than ID2D1Bitmap) for NativeImagePtr on FTW https://bugs.webkit.org/show_bug.cgi?id=200093 Reviewed by Dean Jackson. Source/WebCore: When I wrote the original Direct2D code, I did not realize that the backing memory for the ID2D1Bitmap was inaccessible since it is effectively a representation of GPU memory. There is no API to access or modify the pixels. Instead, MSDN documentation indicates that we should be using IWICBitmap objects, which are converted to ID2D1Bitmap objects when things are ready to be rendered. This makes it possible to use the TextureMapper backend to do efficient compositing and tile drawing, since the data backing the bitmap can now be accessed and manipulated, allowing us to support filters and other effects. * PlatformFTW.cmake: * platform/MIMETypeRegistry.cpp: (WebCore::supportedImageMIMETypesForEncoding): * platform/graphics/ANGLEWebKitBridge.h: * platform/graphics/GraphicsContext.h: * platform/graphics/ImageBuffer.h: * platform/graphics/NativeImage.h: * platform/graphics/OpenGLShims.h: * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas): * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp: (WebCore::GraphicsContext3D::GraphicsContext3D): (WebCore::GraphicsContext3D::platformLayer const): * platform/graphics/texmap/BitmapTexture.cpp: (WebCore::BitmapTexture::updateContents): * platform/graphics/texmap/BitmapTextureGL.cpp: (WebCore::BitmapTextureGL::updateContents): * platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp: (WebCore::GraphicsContext3D::~GraphicsContext3D): * platform/graphics/win/GraphicsContextDirect2D.cpp: (WebCore::GraphicsContext::GraphicsContext): (WebCore::GraphicsContext::platformInit): (WebCore::GraphicsContextPlatformPrivate::setAlpha): (WebCore::GraphicsContext::drawNativeImage): (WebCore::GraphicsContext::drawDeviceBitmap): (WebCore::GraphicsContext::releaseWindowsContext): (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate): (WebCore::GraphicsContextPlatformPrivate::beginDraw): (WebCore::GraphicsContextPlatformPrivate::endDraw): (WebCore::GraphicsContext::drawPattern): (WebCore::GraphicsContext::clipPath): * platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h: * platform/graphics/win/ImageBufferDataDirect2D.cpp: (WebCore::ImageBufferData::getData const): (WebCore::ImageBufferData::putData): * platform/graphics/win/ImageBufferDataDirect2D.h: (): Deleted. * platform/graphics/win/ImageBufferDirect2D.cpp: (WebCore::ImageBuffer::createCompatibleBuffer): (WebCore::ImageBuffer::ImageBuffer): (WebCore::createCroppedImageIfNecessary): (WebCore::createBitmapImageAfterScalingIfNeeded): (WebCore::ImageBuffer::copyImage const): (WebCore::ImageBuffer::sinkIntoNativeImage): (WebCore::ImageBuffer::copyNativeImage const): (WebCore::ImageBuffer::draw): * platform/graphics/win/ImageDecoderDirect2D.cpp: (WebCore::ImageDecoderDirect2D::createFrameImageAtIndex): * platform/graphics/win/ImageDirect2D.cpp: (WebCore::BitmapImage::drawFrameMatchingSourceSize): * platform/graphics/win/NativeImageDirect2D.cpp: (WebCore::imagingFactory): (WebCore::nativeImageSize): (WebCore::nativeImageHasAlpha): (WebCore::nativeImageSinglePixelSolidColor): (WebCore::drawNativeImage): (WebCore::clearNativeImageSubimages): * platform/graphics/win/PathDirect2D.cpp: (WebCore::Path::strokeContains const): * platform/graphics/win/PatternDirect2D.cpp: (WebCore::Pattern::createPlatformPattern const): * platform/win/PasteboardWin.cpp: (WebCore::Pasteboard::read): * rendering/RenderElement.cpp: (WebCore::RenderElement::shouldRespectImageOrientation const): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::adjustTiledBackingCoverage): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::nativeImage): Source/WebCore/PAL: * pal/PlatformFTW.cmake: Canonical link: https://commits.webkit.org/213964@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247841 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-07-25 22:02:00 +00:00
platform/win/BString.cpp
platform/win/BitmapInfo.cpp
platform/win/ClipboardUtilitiesWin.cpp
platform/win/CursorWin.cpp
platform/win/DefWndProcWindowClass.cpp
platform/win/DelayLoadedModulesEnumerator.cpp
Use IWICBitmap (rather than ID2D1Bitmap) for NativeImagePtr on FTW https://bugs.webkit.org/show_bug.cgi?id=200093 Reviewed by Dean Jackson. Source/WebCore: When I wrote the original Direct2D code, I did not realize that the backing memory for the ID2D1Bitmap was inaccessible since it is effectively a representation of GPU memory. There is no API to access or modify the pixels. Instead, MSDN documentation indicates that we should be using IWICBitmap objects, which are converted to ID2D1Bitmap objects when things are ready to be rendered. This makes it possible to use the TextureMapper backend to do efficient compositing and tile drawing, since the data backing the bitmap can now be accessed and manipulated, allowing us to support filters and other effects. * PlatformFTW.cmake: * platform/MIMETypeRegistry.cpp: (WebCore::supportedImageMIMETypesForEncoding): * platform/graphics/ANGLEWebKitBridge.h: * platform/graphics/GraphicsContext.h: * platform/graphics/ImageBuffer.h: * platform/graphics/NativeImage.h: * platform/graphics/OpenGLShims.h: * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas): * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp: (WebCore::GraphicsContext3D::GraphicsContext3D): (WebCore::GraphicsContext3D::platformLayer const): * platform/graphics/texmap/BitmapTexture.cpp: (WebCore::BitmapTexture::updateContents): * platform/graphics/texmap/BitmapTextureGL.cpp: (WebCore::BitmapTextureGL::updateContents): * platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp: (WebCore::GraphicsContext3D::~GraphicsContext3D): * platform/graphics/win/GraphicsContextDirect2D.cpp: (WebCore::GraphicsContext::GraphicsContext): (WebCore::GraphicsContext::platformInit): (WebCore::GraphicsContextPlatformPrivate::setAlpha): (WebCore::GraphicsContext::drawNativeImage): (WebCore::GraphicsContext::drawDeviceBitmap): (WebCore::GraphicsContext::releaseWindowsContext): (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate): (WebCore::GraphicsContextPlatformPrivate::beginDraw): (WebCore::GraphicsContextPlatformPrivate::endDraw): (WebCore::GraphicsContext::drawPattern): (WebCore::GraphicsContext::clipPath): * platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h: * platform/graphics/win/ImageBufferDataDirect2D.cpp: (WebCore::ImageBufferData::getData const): (WebCore::ImageBufferData::putData): * platform/graphics/win/ImageBufferDataDirect2D.h: (): Deleted. * platform/graphics/win/ImageBufferDirect2D.cpp: (WebCore::ImageBuffer::createCompatibleBuffer): (WebCore::ImageBuffer::ImageBuffer): (WebCore::createCroppedImageIfNecessary): (WebCore::createBitmapImageAfterScalingIfNeeded): (WebCore::ImageBuffer::copyImage const): (WebCore::ImageBuffer::sinkIntoNativeImage): (WebCore::ImageBuffer::copyNativeImage const): (WebCore::ImageBuffer::draw): * platform/graphics/win/ImageDecoderDirect2D.cpp: (WebCore::ImageDecoderDirect2D::createFrameImageAtIndex): * platform/graphics/win/ImageDirect2D.cpp: (WebCore::BitmapImage::drawFrameMatchingSourceSize): * platform/graphics/win/NativeImageDirect2D.cpp: (WebCore::imagingFactory): (WebCore::nativeImageSize): (WebCore::nativeImageHasAlpha): (WebCore::nativeImageSinglePixelSolidColor): (WebCore::drawNativeImage): (WebCore::clearNativeImageSubimages): * platform/graphics/win/PathDirect2D.cpp: (WebCore::Path::strokeContains const): * platform/graphics/win/PatternDirect2D.cpp: (WebCore::Pattern::createPlatformPattern const): * platform/win/PasteboardWin.cpp: (WebCore::Pasteboard::read): * rendering/RenderElement.cpp: (WebCore::RenderElement::shouldRespectImageOrientation const): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::adjustTiledBackingCoverage): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::nativeImage): Source/WebCore/PAL: * pal/PlatformFTW.cmake: Canonical link: https://commits.webkit.org/213964@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247841 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-07-25 22:02:00 +00:00
platform/win/DragDataWin.cpp
platform/win/DragImageDirect2D.cpp
Use IWICBitmap (rather than ID2D1Bitmap) for NativeImagePtr on FTW https://bugs.webkit.org/show_bug.cgi?id=200093 Reviewed by Dean Jackson. Source/WebCore: When I wrote the original Direct2D code, I did not realize that the backing memory for the ID2D1Bitmap was inaccessible since it is effectively a representation of GPU memory. There is no API to access or modify the pixels. Instead, MSDN documentation indicates that we should be using IWICBitmap objects, which are converted to ID2D1Bitmap objects when things are ready to be rendered. This makes it possible to use the TextureMapper backend to do efficient compositing and tile drawing, since the data backing the bitmap can now be accessed and manipulated, allowing us to support filters and other effects. * PlatformFTW.cmake: * platform/MIMETypeRegistry.cpp: (WebCore::supportedImageMIMETypesForEncoding): * platform/graphics/ANGLEWebKitBridge.h: * platform/graphics/GraphicsContext.h: * platform/graphics/ImageBuffer.h: * platform/graphics/NativeImage.h: * platform/graphics/OpenGLShims.h: * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas): * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp: (WebCore::GraphicsContext3D::GraphicsContext3D): (WebCore::GraphicsContext3D::platformLayer const): * platform/graphics/texmap/BitmapTexture.cpp: (WebCore::BitmapTexture::updateContents): * platform/graphics/texmap/BitmapTextureGL.cpp: (WebCore::BitmapTextureGL::updateContents): * platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp: (WebCore::GraphicsContext3D::~GraphicsContext3D): * platform/graphics/win/GraphicsContextDirect2D.cpp: (WebCore::GraphicsContext::GraphicsContext): (WebCore::GraphicsContext::platformInit): (WebCore::GraphicsContextPlatformPrivate::setAlpha): (WebCore::GraphicsContext::drawNativeImage): (WebCore::GraphicsContext::drawDeviceBitmap): (WebCore::GraphicsContext::releaseWindowsContext): (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate): (WebCore::GraphicsContextPlatformPrivate::beginDraw): (WebCore::GraphicsContextPlatformPrivate::endDraw): (WebCore::GraphicsContext::drawPattern): (WebCore::GraphicsContext::clipPath): * platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h: * platform/graphics/win/ImageBufferDataDirect2D.cpp: (WebCore::ImageBufferData::getData const): (WebCore::ImageBufferData::putData): * platform/graphics/win/ImageBufferDataDirect2D.h: (): Deleted. * platform/graphics/win/ImageBufferDirect2D.cpp: (WebCore::ImageBuffer::createCompatibleBuffer): (WebCore::ImageBuffer::ImageBuffer): (WebCore::createCroppedImageIfNecessary): (WebCore::createBitmapImageAfterScalingIfNeeded): (WebCore::ImageBuffer::copyImage const): (WebCore::ImageBuffer::sinkIntoNativeImage): (WebCore::ImageBuffer::copyNativeImage const): (WebCore::ImageBuffer::draw): * platform/graphics/win/ImageDecoderDirect2D.cpp: (WebCore::ImageDecoderDirect2D::createFrameImageAtIndex): * platform/graphics/win/ImageDirect2D.cpp: (WebCore::BitmapImage::drawFrameMatchingSourceSize): * platform/graphics/win/NativeImageDirect2D.cpp: (WebCore::imagingFactory): (WebCore::nativeImageSize): (WebCore::nativeImageHasAlpha): (WebCore::nativeImageSinglePixelSolidColor): (WebCore::drawNativeImage): (WebCore::clearNativeImageSubimages): * platform/graphics/win/PathDirect2D.cpp: (WebCore::Path::strokeContains const): * platform/graphics/win/PatternDirect2D.cpp: (WebCore::Pattern::createPlatformPattern const): * platform/win/PasteboardWin.cpp: (WebCore::Pasteboard::read): * rendering/RenderElement.cpp: (WebCore::RenderElement::shouldRespectImageOrientation const): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::adjustTiledBackingCoverage): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::nativeImage): Source/WebCore/PAL: * pal/PlatformFTW.cmake: Canonical link: https://commits.webkit.org/213964@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247841 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-07-25 22:02:00 +00:00
platform/win/DragImageWin.cpp
platform/win/GDIObjectCounter.cpp
platform/win/GDIUtilities.cpp
platform/win/ImportedFunctionsEnumerator.cpp
platform/win/ImportedModulesEnumerator.cpp
Use IWICBitmap (rather than ID2D1Bitmap) for NativeImagePtr on FTW https://bugs.webkit.org/show_bug.cgi?id=200093 Reviewed by Dean Jackson. Source/WebCore: When I wrote the original Direct2D code, I did not realize that the backing memory for the ID2D1Bitmap was inaccessible since it is effectively a representation of GPU memory. There is no API to access or modify the pixels. Instead, MSDN documentation indicates that we should be using IWICBitmap objects, which are converted to ID2D1Bitmap objects when things are ready to be rendered. This makes it possible to use the TextureMapper backend to do efficient compositing and tile drawing, since the data backing the bitmap can now be accessed and manipulated, allowing us to support filters and other effects. * PlatformFTW.cmake: * platform/MIMETypeRegistry.cpp: (WebCore::supportedImageMIMETypesForEncoding): * platform/graphics/ANGLEWebKitBridge.h: * platform/graphics/GraphicsContext.h: * platform/graphics/ImageBuffer.h: * platform/graphics/NativeImage.h: * platform/graphics/OpenGLShims.h: * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas): * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp: (WebCore::GraphicsContext3D::GraphicsContext3D): (WebCore::GraphicsContext3D::platformLayer const): * platform/graphics/texmap/BitmapTexture.cpp: (WebCore::BitmapTexture::updateContents): * platform/graphics/texmap/BitmapTextureGL.cpp: (WebCore::BitmapTextureGL::updateContents): * platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp: (WebCore::GraphicsContext3D::~GraphicsContext3D): * platform/graphics/win/GraphicsContextDirect2D.cpp: (WebCore::GraphicsContext::GraphicsContext): (WebCore::GraphicsContext::platformInit): (WebCore::GraphicsContextPlatformPrivate::setAlpha): (WebCore::GraphicsContext::drawNativeImage): (WebCore::GraphicsContext::drawDeviceBitmap): (WebCore::GraphicsContext::releaseWindowsContext): (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate): (WebCore::GraphicsContextPlatformPrivate::beginDraw): (WebCore::GraphicsContextPlatformPrivate::endDraw): (WebCore::GraphicsContext::drawPattern): (WebCore::GraphicsContext::clipPath): * platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h: * platform/graphics/win/ImageBufferDataDirect2D.cpp: (WebCore::ImageBufferData::getData const): (WebCore::ImageBufferData::putData): * platform/graphics/win/ImageBufferDataDirect2D.h: (): Deleted. * platform/graphics/win/ImageBufferDirect2D.cpp: (WebCore::ImageBuffer::createCompatibleBuffer): (WebCore::ImageBuffer::ImageBuffer): (WebCore::createCroppedImageIfNecessary): (WebCore::createBitmapImageAfterScalingIfNeeded): (WebCore::ImageBuffer::copyImage const): (WebCore::ImageBuffer::sinkIntoNativeImage): (WebCore::ImageBuffer::copyNativeImage const): (WebCore::ImageBuffer::draw): * platform/graphics/win/ImageDecoderDirect2D.cpp: (WebCore::ImageDecoderDirect2D::createFrameImageAtIndex): * platform/graphics/win/ImageDirect2D.cpp: (WebCore::BitmapImage::drawFrameMatchingSourceSize): * platform/graphics/win/NativeImageDirect2D.cpp: (WebCore::imagingFactory): (WebCore::nativeImageSize): (WebCore::nativeImageHasAlpha): (WebCore::nativeImageSinglePixelSolidColor): (WebCore::drawNativeImage): (WebCore::clearNativeImageSubimages): * platform/graphics/win/PathDirect2D.cpp: (WebCore::Path::strokeContains const): * platform/graphics/win/PatternDirect2D.cpp: (WebCore::Pattern::createPlatformPattern const): * platform/win/PasteboardWin.cpp: (WebCore::Pasteboard::read): * rendering/RenderElement.cpp: (WebCore::RenderElement::shouldRespectImageOrientation const): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::adjustTiledBackingCoverage): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::nativeImage): Source/WebCore/PAL: * pal/PlatformFTW.cmake: Canonical link: https://commits.webkit.org/213964@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247841 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-07-25 22:02:00 +00:00
platform/win/KeyEventWin.cpp
platform/win/LocalizedStringsWin.cpp
platform/win/LoggingWin.cpp
platform/win/MIMETypeRegistryWin.cpp
platform/win/MainThreadSharedTimerWin.cpp
platform/win/PEImage.cpp
Use IWICBitmap (rather than ID2D1Bitmap) for NativeImagePtr on FTW https://bugs.webkit.org/show_bug.cgi?id=200093 Reviewed by Dean Jackson. Source/WebCore: When I wrote the original Direct2D code, I did not realize that the backing memory for the ID2D1Bitmap was inaccessible since it is effectively a representation of GPU memory. There is no API to access or modify the pixels. Instead, MSDN documentation indicates that we should be using IWICBitmap objects, which are converted to ID2D1Bitmap objects when things are ready to be rendered. This makes it possible to use the TextureMapper backend to do efficient compositing and tile drawing, since the data backing the bitmap can now be accessed and manipulated, allowing us to support filters and other effects. * PlatformFTW.cmake: * platform/MIMETypeRegistry.cpp: (WebCore::supportedImageMIMETypesForEncoding): * platform/graphics/ANGLEWebKitBridge.h: * platform/graphics/GraphicsContext.h: * platform/graphics/ImageBuffer.h: * platform/graphics/NativeImage.h: * platform/graphics/OpenGLShims.h: * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas): * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp: (WebCore::GraphicsContext3D::GraphicsContext3D): (WebCore::GraphicsContext3D::platformLayer const): * platform/graphics/texmap/BitmapTexture.cpp: (WebCore::BitmapTexture::updateContents): * platform/graphics/texmap/BitmapTextureGL.cpp: (WebCore::BitmapTextureGL::updateContents): * platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp: (WebCore::GraphicsContext3D::~GraphicsContext3D): * platform/graphics/win/GraphicsContextDirect2D.cpp: (WebCore::GraphicsContext::GraphicsContext): (WebCore::GraphicsContext::platformInit): (WebCore::GraphicsContextPlatformPrivate::setAlpha): (WebCore::GraphicsContext::drawNativeImage): (WebCore::GraphicsContext::drawDeviceBitmap): (WebCore::GraphicsContext::releaseWindowsContext): (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate): (WebCore::GraphicsContextPlatformPrivate::beginDraw): (WebCore::GraphicsContextPlatformPrivate::endDraw): (WebCore::GraphicsContext::drawPattern): (WebCore::GraphicsContext::clipPath): * platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h: * platform/graphics/win/ImageBufferDataDirect2D.cpp: (WebCore::ImageBufferData::getData const): (WebCore::ImageBufferData::putData): * platform/graphics/win/ImageBufferDataDirect2D.h: (): Deleted. * platform/graphics/win/ImageBufferDirect2D.cpp: (WebCore::ImageBuffer::createCompatibleBuffer): (WebCore::ImageBuffer::ImageBuffer): (WebCore::createCroppedImageIfNecessary): (WebCore::createBitmapImageAfterScalingIfNeeded): (WebCore::ImageBuffer::copyImage const): (WebCore::ImageBuffer::sinkIntoNativeImage): (WebCore::ImageBuffer::copyNativeImage const): (WebCore::ImageBuffer::draw): * platform/graphics/win/ImageDecoderDirect2D.cpp: (WebCore::ImageDecoderDirect2D::createFrameImageAtIndex): * platform/graphics/win/ImageDirect2D.cpp: (WebCore::BitmapImage::drawFrameMatchingSourceSize): * platform/graphics/win/NativeImageDirect2D.cpp: (WebCore::imagingFactory): (WebCore::nativeImageSize): (WebCore::nativeImageHasAlpha): (WebCore::nativeImageSinglePixelSolidColor): (WebCore::drawNativeImage): (WebCore::clearNativeImageSubimages): * platform/graphics/win/PathDirect2D.cpp: (WebCore::Path::strokeContains const): * platform/graphics/win/PatternDirect2D.cpp: (WebCore::Pattern::createPlatformPattern const): * platform/win/PasteboardWin.cpp: (WebCore::Pasteboard::read): * rendering/RenderElement.cpp: (WebCore::RenderElement::shouldRespectImageOrientation const): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::adjustTiledBackingCoverage): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::nativeImage): Source/WebCore/PAL: * pal/PlatformFTW.cmake: Canonical link: https://commits.webkit.org/213964@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247841 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-07-25 22:02:00 +00:00
platform/win/PasteboardWin.cpp
platform/win/PlatformMouseEventWin.cpp
platform/win/PlatformScreenWin.cpp
platform/win/PopupMenuWin.cpp
platform/win/SSLKeyGeneratorWin.cpp
platform/win/ScrollbarThemeWin.cpp
platform/win/SearchPopupMenuDB.cpp
platform/win/SearchPopupMenuWin.cpp
platform/win/SharedBufferWin.cpp
platform/win/StructuredExceptionHandlerSuppressor.cpp
platform/win/SystemInfo.cpp
platform/win/UserAgentWin.cpp
platform/win/WCDataObject.cpp
platform/win/WebCoreBundleWin.cpp
platform/win/WebCoreInstanceHandle.cpp
platform/win/WebCoreTextRenderer.cpp
platform/win/WheelEventWin.cpp
platform/win/WidgetWin.cpp
platform/win/WindowMessageBroadcaster.cpp
rendering/RenderThemeWin.cpp
)
[FTW] Support web fonts https://bugs.webkit.org/show_bug.cgi?id=200771 <rdar://problem/54350291> Reviewed by Dean Jackson. The current code path for handling web fonts uses 'AddFontMemResourceEx'. Unfortunately, this only updates the font caches used by GDI, and is not exposed to DirectWrite. This patch does the following: 1. Moves some code into a new DirectWriteUtilities file, similar to how Direct2D is handled, so we can share code in more places. 2. After adding the font to GDI, it adds the font information to the DirectWrite font cache. 3. Add logic to check the overall system DirectWrite fonts, as well as the custom font cache used for downloaded fonts. * PlatformFTW.cmake: Add DirectWriteUtilities.cpp * css/CSSFontFaceSource.cpp: * loader/cache/CachedFont.cpp: * loader/cache/CachedSVGFont.cpp: * platform/graphics/Font.cpp: * platform/graphics/Font.h: * platform/graphics/FontCache.cpp: * platform/graphics/FontPlatformData.cpp: * platform/graphics/FontPlatformData.h: * platform/graphics/opentype/OpenTypeUtilities.cpp: (WebCore::renameAndActivateFont): * platform/graphics/win/DirectWriteUtilities.cpp: Added. * platform/graphics/win/DirectWriteUtilities.h: Added. * platform/graphics/win/FontCacheWin.cpp: (WebCore::createGDIFont): * platform/graphics/win/FontCascadeDirect2D.cpp: * platform/graphics/win/FontCustomPlatformData.cpp: (WebCore::FontCustomPlatformData::fontPlatformData): * platform/graphics/win/FontPlatformDataDirect2D.cpp: (WebCore::FontPlatformData::platformDataInit): (WebCore::FontPlatformData::FontPlatformData): (WebCore::FontPlatformData::createFallbackFont): * platform/graphics/win/FontPlatformDataWin.cpp: * platform/graphics/win/GlyphPageTreeNodeDirect2D.cpp: (WebCore::GlyphPage::fill): * platform/graphics/win/GraphicsContextDirect2D.cpp: * platform/graphics/win/SimpleFontDataDirect2D.cpp: (WebCore::Font::systemDWriteFactory): Deleted. (WebCore::Font::systemDWriteGdiInterop): Deleted. * platform/graphics/win/SimpleFontDataWin.cpp: Canonical link: https://commits.webkit.org/214523@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248748 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-08-15 21:49:01 +00:00
if (USE_CF)
list(APPEND WebCore_PRIVATE_INCLUDE_DIRECTORIES
"${WEBCORE_DIR}/loader/archive/cf"
"${WEBCORE_DIR}/platform/cf"
"${WEBCORE_DIR}/platform/cf/win"
)
list(APPEND WebCore_SOURCES
editing/SmartReplaceCF.cpp
loader/archive/cf/LegacyWebArchive.cpp
platform/cf/KeyedDecoderCF.cpp
platform/cf/KeyedEncoderCF.cpp
platform/cf/SharedBufferCF.cpp
platform/cf/win/CertificateCFWin.cpp
platform/text/cf/HyphenationCF.cpp
)
list(APPEND WebCore_PRIVATE_FRAMEWORK_HEADERS
loader/archive/cf/LegacyWebArchive.h
platform/cf/win/CertificateCFWin.h
)
list(APPEND WebCore_LIBRARIES ${COREFOUNDATION_LIBRARY})
list(APPEND WebCoreTestSupport_LIBRARIES ${COREFOUNDATION_LIBRARY})
else ()
list(APPEND WebCore_SOURCES
platform/text/Hyphenation.cpp
)
endif ()
Use IWICBitmap (rather than ID2D1Bitmap) for NativeImagePtr on FTW https://bugs.webkit.org/show_bug.cgi?id=200093 Reviewed by Dean Jackson. Source/WebCore: When I wrote the original Direct2D code, I did not realize that the backing memory for the ID2D1Bitmap was inaccessible since it is effectively a representation of GPU memory. There is no API to access or modify the pixels. Instead, MSDN documentation indicates that we should be using IWICBitmap objects, which are converted to ID2D1Bitmap objects when things are ready to be rendered. This makes it possible to use the TextureMapper backend to do efficient compositing and tile drawing, since the data backing the bitmap can now be accessed and manipulated, allowing us to support filters and other effects. * PlatformFTW.cmake: * platform/MIMETypeRegistry.cpp: (WebCore::supportedImageMIMETypesForEncoding): * platform/graphics/ANGLEWebKitBridge.h: * platform/graphics/GraphicsContext.h: * platform/graphics/ImageBuffer.h: * platform/graphics/NativeImage.h: * platform/graphics/OpenGLShims.h: * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas): * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp: (WebCore::GraphicsContext3D::GraphicsContext3D): (WebCore::GraphicsContext3D::platformLayer const): * platform/graphics/texmap/BitmapTexture.cpp: (WebCore::BitmapTexture::updateContents): * platform/graphics/texmap/BitmapTextureGL.cpp: (WebCore::BitmapTextureGL::updateContents): * platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp: (WebCore::GraphicsContext3D::~GraphicsContext3D): * platform/graphics/win/GraphicsContextDirect2D.cpp: (WebCore::GraphicsContext::GraphicsContext): (WebCore::GraphicsContext::platformInit): (WebCore::GraphicsContextPlatformPrivate::setAlpha): (WebCore::GraphicsContext::drawNativeImage): (WebCore::GraphicsContext::drawDeviceBitmap): (WebCore::GraphicsContext::releaseWindowsContext): (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate): (WebCore::GraphicsContextPlatformPrivate::beginDraw): (WebCore::GraphicsContextPlatformPrivate::endDraw): (WebCore::GraphicsContext::drawPattern): (WebCore::GraphicsContext::clipPath): * platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h: * platform/graphics/win/ImageBufferDataDirect2D.cpp: (WebCore::ImageBufferData::getData const): (WebCore::ImageBufferData::putData): * platform/graphics/win/ImageBufferDataDirect2D.h: (): Deleted. * platform/graphics/win/ImageBufferDirect2D.cpp: (WebCore::ImageBuffer::createCompatibleBuffer): (WebCore::ImageBuffer::ImageBuffer): (WebCore::createCroppedImageIfNecessary): (WebCore::createBitmapImageAfterScalingIfNeeded): (WebCore::ImageBuffer::copyImage const): (WebCore::ImageBuffer::sinkIntoNativeImage): (WebCore::ImageBuffer::copyNativeImage const): (WebCore::ImageBuffer::draw): * platform/graphics/win/ImageDecoderDirect2D.cpp: (WebCore::ImageDecoderDirect2D::createFrameImageAtIndex): * platform/graphics/win/ImageDirect2D.cpp: (WebCore::BitmapImage::drawFrameMatchingSourceSize): * platform/graphics/win/NativeImageDirect2D.cpp: (WebCore::imagingFactory): (WebCore::nativeImageSize): (WebCore::nativeImageHasAlpha): (WebCore::nativeImageSinglePixelSolidColor): (WebCore::drawNativeImage): (WebCore::clearNativeImageSubimages): * platform/graphics/win/PathDirect2D.cpp: (WebCore::Path::strokeContains const): * platform/graphics/win/PatternDirect2D.cpp: (WebCore::Pattern::createPlatformPattern const): * platform/win/PasteboardWin.cpp: (WebCore::Pasteboard::read): * rendering/RenderElement.cpp: (WebCore::RenderElement::shouldRespectImageOrientation const): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::adjustTiledBackingCoverage): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::nativeImage): Source/WebCore/PAL: * pal/PlatformFTW.cmake: Canonical link: https://commits.webkit.org/213964@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247841 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-07-25 22:02:00 +00:00
list(APPEND WebCore_PRIVATE_FRAMEWORK_HEADERS
accessibility/win/AccessibilityObjectWrapperWin.h
page/win/FrameWin.h
[FTW] Refactor Direct2D code to follow Cairo's model to support modern WebKit https://bugs.webkit.org/show_bug.cgi?id=200270 Reviewed by Dean Jackson. Refactor the Direct2D code in WebCore so that the core routines can be shared between GraphicsContext and GraphicsContextImpl. Implement PlatformContext, BackingStoreBackend, and GraphicsContextImpl for the Direct2D engine. This patch effectively just moves code around. * PlatformFTW.cmake: * platform/graphics/GraphicsContext.h: * platform/graphics/GraphicsContextImpl.h: * platform/graphics/ImageSource.cpp: * platform/graphics/Pattern.h: * platform/graphics/displaylists/DisplayListRecorder.cpp: * platform/graphics/displaylists/DisplayListRecorder.h: * platform/graphics/win/BackingStoreBackendDirect2D.h: Added. * platform/graphics/win/BackingStoreBackendDirect2DImpl.cpp: Added. * platform/graphics/win/BackingStoreBackendDirect2DImpl.h: Added. * platform/graphics/win/Direct2DOperations.cpp: Added. * platform/graphics/win/Direct2DOperations.h: Added. * platform/graphics/win/Direct2DUtilities.cpp: Added. * platform/graphics/win/Direct2DUtilities.h: Added. * platform/graphics/win/FontCascadeDirect2D.cpp: * platform/graphics/win/GradientDirect2D.cpp: * platform/graphics/win/GraphicsContextDirect2D.cpp: * platform/graphics/win/GraphicsContextImplDirect2D.cpp: Added. * platform/graphics/win/GraphicsContextImplDirect2D.h: Added. * platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h: * platform/graphics/win/ImageBufferDataDirect2D.h: * platform/graphics/win/ImageBufferDirect2D.cpp: * platform/graphics/win/NativeImageDirect2D.cpp: * platform/graphics/win/PathDirect2D.cpp: * platform/graphics/win/PatternDirect2D.cpp: * platform/graphics/win/PlatformContextDirect2D.cpp: Added. * platform/graphics/win/PlatformContextDirect2D.h: Added. * platform/win/DragImageWin.cpp: * svg/graphics/SVGImage.cpp: Canonical link: https://commits.webkit.org/214068@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248020 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-07-30 22:36:14 +00:00
platform/graphics/win/BackingStoreBackendDirect2D.h
platform/graphics/win/BackingStoreBackendDirect2DImpl.h
Use IWICBitmap (rather than ID2D1Bitmap) for NativeImagePtr on FTW https://bugs.webkit.org/show_bug.cgi?id=200093 Reviewed by Dean Jackson. Source/WebCore: When I wrote the original Direct2D code, I did not realize that the backing memory for the ID2D1Bitmap was inaccessible since it is effectively a representation of GPU memory. There is no API to access or modify the pixels. Instead, MSDN documentation indicates that we should be using IWICBitmap objects, which are converted to ID2D1Bitmap objects when things are ready to be rendered. This makes it possible to use the TextureMapper backend to do efficient compositing and tile drawing, since the data backing the bitmap can now be accessed and manipulated, allowing us to support filters and other effects. * PlatformFTW.cmake: * platform/MIMETypeRegistry.cpp: (WebCore::supportedImageMIMETypesForEncoding): * platform/graphics/ANGLEWebKitBridge.h: * platform/graphics/GraphicsContext.h: * platform/graphics/ImageBuffer.h: * platform/graphics/NativeImage.h: * platform/graphics/OpenGLShims.h: * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas): * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp: (WebCore::GraphicsContext3D::GraphicsContext3D): (WebCore::GraphicsContext3D::platformLayer const): * platform/graphics/texmap/BitmapTexture.cpp: (WebCore::BitmapTexture::updateContents): * platform/graphics/texmap/BitmapTextureGL.cpp: (WebCore::BitmapTextureGL::updateContents): * platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp: (WebCore::GraphicsContext3D::~GraphicsContext3D): * platform/graphics/win/GraphicsContextDirect2D.cpp: (WebCore::GraphicsContext::GraphicsContext): (WebCore::GraphicsContext::platformInit): (WebCore::GraphicsContextPlatformPrivate::setAlpha): (WebCore::GraphicsContext::drawNativeImage): (WebCore::GraphicsContext::drawDeviceBitmap): (WebCore::GraphicsContext::releaseWindowsContext): (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate): (WebCore::GraphicsContextPlatformPrivate::beginDraw): (WebCore::GraphicsContextPlatformPrivate::endDraw): (WebCore::GraphicsContext::drawPattern): (WebCore::GraphicsContext::clipPath): * platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h: * platform/graphics/win/ImageBufferDataDirect2D.cpp: (WebCore::ImageBufferData::getData const): (WebCore::ImageBufferData::putData): * platform/graphics/win/ImageBufferDataDirect2D.h: (): Deleted. * platform/graphics/win/ImageBufferDirect2D.cpp: (WebCore::ImageBuffer::createCompatibleBuffer): (WebCore::ImageBuffer::ImageBuffer): (WebCore::createCroppedImageIfNecessary): (WebCore::createBitmapImageAfterScalingIfNeeded): (WebCore::ImageBuffer::copyImage const): (WebCore::ImageBuffer::sinkIntoNativeImage): (WebCore::ImageBuffer::copyNativeImage const): (WebCore::ImageBuffer::draw): * platform/graphics/win/ImageDecoderDirect2D.cpp: (WebCore::ImageDecoderDirect2D::createFrameImageAtIndex): * platform/graphics/win/ImageDirect2D.cpp: (WebCore::BitmapImage::drawFrameMatchingSourceSize): * platform/graphics/win/NativeImageDirect2D.cpp: (WebCore::imagingFactory): (WebCore::nativeImageSize): (WebCore::nativeImageHasAlpha): (WebCore::nativeImageSinglePixelSolidColor): (WebCore::drawNativeImage): (WebCore::clearNativeImageSubimages): * platform/graphics/win/PathDirect2D.cpp: (WebCore::Path::strokeContains const): * platform/graphics/win/PatternDirect2D.cpp: (WebCore::Pattern::createPlatformPattern const): * platform/win/PasteboardWin.cpp: (WebCore::Pasteboard::read): * rendering/RenderElement.cpp: (WebCore::RenderElement::shouldRespectImageOrientation const): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::adjustTiledBackingCoverage): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::nativeImage): Source/WebCore/PAL: * pal/PlatformFTW.cmake: Canonical link: https://commits.webkit.org/213964@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247841 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-07-25 22:02:00 +00:00
platform/graphics/win/DIBPixelData.h
[FTW] Refactor Direct2D code to follow Cairo's model to support modern WebKit https://bugs.webkit.org/show_bug.cgi?id=200270 Reviewed by Dean Jackson. Refactor the Direct2D code in WebCore so that the core routines can be shared between GraphicsContext and GraphicsContextImpl. Implement PlatformContext, BackingStoreBackend, and GraphicsContextImpl for the Direct2D engine. This patch effectively just moves code around. * PlatformFTW.cmake: * platform/graphics/GraphicsContext.h: * platform/graphics/GraphicsContextImpl.h: * platform/graphics/ImageSource.cpp: * platform/graphics/Pattern.h: * platform/graphics/displaylists/DisplayListRecorder.cpp: * platform/graphics/displaylists/DisplayListRecorder.h: * platform/graphics/win/BackingStoreBackendDirect2D.h: Added. * platform/graphics/win/BackingStoreBackendDirect2DImpl.cpp: Added. * platform/graphics/win/BackingStoreBackendDirect2DImpl.h: Added. * platform/graphics/win/Direct2DOperations.cpp: Added. * platform/graphics/win/Direct2DOperations.h: Added. * platform/graphics/win/Direct2DUtilities.cpp: Added. * platform/graphics/win/Direct2DUtilities.h: Added. * platform/graphics/win/FontCascadeDirect2D.cpp: * platform/graphics/win/GradientDirect2D.cpp: * platform/graphics/win/GraphicsContextDirect2D.cpp: * platform/graphics/win/GraphicsContextImplDirect2D.cpp: Added. * platform/graphics/win/GraphicsContextImplDirect2D.h: Added. * platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h: * platform/graphics/win/ImageBufferDataDirect2D.h: * platform/graphics/win/ImageBufferDirect2D.cpp: * platform/graphics/win/NativeImageDirect2D.cpp: * platform/graphics/win/PathDirect2D.cpp: * platform/graphics/win/PatternDirect2D.cpp: * platform/graphics/win/PlatformContextDirect2D.cpp: Added. * platform/graphics/win/PlatformContextDirect2D.h: Added. * platform/win/DragImageWin.cpp: * svg/graphics/SVGImage.cpp: Canonical link: https://commits.webkit.org/214068@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248020 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-07-30 22:36:14 +00:00
platform/graphics/win/Direct2DOperations.h
platform/graphics/win/Direct2DUtilities.h
[FTW] Support web fonts https://bugs.webkit.org/show_bug.cgi?id=200771 <rdar://problem/54350291> Reviewed by Dean Jackson. The current code path for handling web fonts uses 'AddFontMemResourceEx'. Unfortunately, this only updates the font caches used by GDI, and is not exposed to DirectWrite. This patch does the following: 1. Moves some code into a new DirectWriteUtilities file, similar to how Direct2D is handled, so we can share code in more places. 2. After adding the font to GDI, it adds the font information to the DirectWrite font cache. 3. Add logic to check the overall system DirectWrite fonts, as well as the custom font cache used for downloaded fonts. * PlatformFTW.cmake: Add DirectWriteUtilities.cpp * css/CSSFontFaceSource.cpp: * loader/cache/CachedFont.cpp: * loader/cache/CachedSVGFont.cpp: * platform/graphics/Font.cpp: * platform/graphics/Font.h: * platform/graphics/FontCache.cpp: * platform/graphics/FontPlatformData.cpp: * platform/graphics/FontPlatformData.h: * platform/graphics/opentype/OpenTypeUtilities.cpp: (WebCore::renameAndActivateFont): * platform/graphics/win/DirectWriteUtilities.cpp: Added. * platform/graphics/win/DirectWriteUtilities.h: Added. * platform/graphics/win/FontCacheWin.cpp: (WebCore::createGDIFont): * platform/graphics/win/FontCascadeDirect2D.cpp: * platform/graphics/win/FontCustomPlatformData.cpp: (WebCore::FontCustomPlatformData::fontPlatformData): * platform/graphics/win/FontPlatformDataDirect2D.cpp: (WebCore::FontPlatformData::platformDataInit): (WebCore::FontPlatformData::FontPlatformData): (WebCore::FontPlatformData::createFallbackFont): * platform/graphics/win/FontPlatformDataWin.cpp: * platform/graphics/win/GlyphPageTreeNodeDirect2D.cpp: (WebCore::GlyphPage::fill): * platform/graphics/win/GraphicsContextDirect2D.cpp: * platform/graphics/win/SimpleFontDataDirect2D.cpp: (WebCore::Font::systemDWriteFactory): Deleted. (WebCore::Font::systemDWriteGdiInterop): Deleted. * platform/graphics/win/SimpleFontDataWin.cpp: Canonical link: https://commits.webkit.org/214523@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248748 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-08-15 21:49:01 +00:00
platform/graphics/win/DirectWriteUtilities.h
Use IWICBitmap (rather than ID2D1Bitmap) for NativeImagePtr on FTW https://bugs.webkit.org/show_bug.cgi?id=200093 Reviewed by Dean Jackson. Source/WebCore: When I wrote the original Direct2D code, I did not realize that the backing memory for the ID2D1Bitmap was inaccessible since it is effectively a representation of GPU memory. There is no API to access or modify the pixels. Instead, MSDN documentation indicates that we should be using IWICBitmap objects, which are converted to ID2D1Bitmap objects when things are ready to be rendered. This makes it possible to use the TextureMapper backend to do efficient compositing and tile drawing, since the data backing the bitmap can now be accessed and manipulated, allowing us to support filters and other effects. * PlatformFTW.cmake: * platform/MIMETypeRegistry.cpp: (WebCore::supportedImageMIMETypesForEncoding): * platform/graphics/ANGLEWebKitBridge.h: * platform/graphics/GraphicsContext.h: * platform/graphics/ImageBuffer.h: * platform/graphics/NativeImage.h: * platform/graphics/OpenGLShims.h: * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas): * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp: (WebCore::GraphicsContext3D::GraphicsContext3D): (WebCore::GraphicsContext3D::platformLayer const): * platform/graphics/texmap/BitmapTexture.cpp: (WebCore::BitmapTexture::updateContents): * platform/graphics/texmap/BitmapTextureGL.cpp: (WebCore::BitmapTextureGL::updateContents): * platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp: (WebCore::GraphicsContext3D::~GraphicsContext3D): * platform/graphics/win/GraphicsContextDirect2D.cpp: (WebCore::GraphicsContext::GraphicsContext): (WebCore::GraphicsContext::platformInit): (WebCore::GraphicsContextPlatformPrivate::setAlpha): (WebCore::GraphicsContext::drawNativeImage): (WebCore::GraphicsContext::drawDeviceBitmap): (WebCore::GraphicsContext::releaseWindowsContext): (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate): (WebCore::GraphicsContextPlatformPrivate::beginDraw): (WebCore::GraphicsContextPlatformPrivate::endDraw): (WebCore::GraphicsContext::drawPattern): (WebCore::GraphicsContext::clipPath): * platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h: * platform/graphics/win/ImageBufferDataDirect2D.cpp: (WebCore::ImageBufferData::getData const): (WebCore::ImageBufferData::putData): * platform/graphics/win/ImageBufferDataDirect2D.h: (): Deleted. * platform/graphics/win/ImageBufferDirect2D.cpp: (WebCore::ImageBuffer::createCompatibleBuffer): (WebCore::ImageBuffer::ImageBuffer): (WebCore::createCroppedImageIfNecessary): (WebCore::createBitmapImageAfterScalingIfNeeded): (WebCore::ImageBuffer::copyImage const): (WebCore::ImageBuffer::sinkIntoNativeImage): (WebCore::ImageBuffer::copyNativeImage const): (WebCore::ImageBuffer::draw): * platform/graphics/win/ImageDecoderDirect2D.cpp: (WebCore::ImageDecoderDirect2D::createFrameImageAtIndex): * platform/graphics/win/ImageDirect2D.cpp: (WebCore::BitmapImage::drawFrameMatchingSourceSize): * platform/graphics/win/NativeImageDirect2D.cpp: (WebCore::imagingFactory): (WebCore::nativeImageSize): (WebCore::nativeImageHasAlpha): (WebCore::nativeImageSinglePixelSolidColor): (WebCore::drawNativeImage): (WebCore::clearNativeImageSubimages): * platform/graphics/win/PathDirect2D.cpp: (WebCore::Path::strokeContains const): * platform/graphics/win/PatternDirect2D.cpp: (WebCore::Pattern::createPlatformPattern const): * platform/win/PasteboardWin.cpp: (WebCore::Pasteboard::read): * rendering/RenderElement.cpp: (WebCore::RenderElement::shouldRespectImageOrientation const): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::adjustTiledBackingCoverage): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::nativeImage): Source/WebCore/PAL: * pal/PlatformFTW.cmake: Canonical link: https://commits.webkit.org/213964@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247841 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-07-25 22:02:00 +00:00
platform/graphics/win/FullScreenController.h
platform/graphics/win/FullScreenControllerClient.h
Virtualize GraphicsContext https://bugs.webkit.org/show_bug.cgi?id=226170 Reviewed by Simon Fraser. Source/WebCore: No new tests, just a refactoring. In preparation for future patches which introduce new kinds of GraphicsContexts, virtualize GraphicsContext, moving platform implementations into subclasses GraphicsContext{CG,Cairo,Direct2D}, NullGraphicsContext, DisplayList::Recorder, and Nicosia::CairoOperationRecorder. GraphicsContextImpl dissolves away; platform contexts that were unnecessarily implemented both as `GraphicsContext` and as a subclass of GraphicsContextImpl (GraphicsContextImplCairo and GraphicsContextImplDirect2D) are folded into their GraphicsContext subclass. `paintingDisabled()` is no longer relevant in GraphicsContext implementations, so we no longer have to check it everywhere; NullGraphicsContext overrides everything with an empty implementation. We keep `paintingDisabled()` for use in code outside of GraphicsContext, where it just distinguishes between NullGraphicsContext and the others. Also, a few bits of cleanup to make this easier: - Legacy shadow radius behavior becomes a parameter to setShadow instead of a separate method. - canvasClip(), which hasn't done anything different than clip() since Skia, is removed. - GraphicsContext gains renderingMode() in place of isAcceleratedContext(). - Subclasses override updateState() to respond to GraphicsContext state changes, as was already done for GraphicsContextImpl, to keep subclassing simple. - builderState(), which was unused, is removed. - drawPath() is introduced on all platforms, with a default implementation that just fills and strokes. * Headers.cmake: * PlatformFTW.cmake: * PlatformWin.cmake: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * display/css/DisplayBoxDecorationPainter.cpp: (WebCore::Display::BoxDecorationPainter::paintBoxShadow const): * html/canvas/CanvasRenderingContext2DBase.cpp: (WebCore::CanvasRenderingContext2DBase::isAccelerated const): (WebCore::CanvasRenderingContext2DBase::clipInternal): (WebCore::CanvasRenderingContext2DBase::clearRect): (WebCore::CanvasRenderingContext2DBase::applyShadow): (WebCore::CanvasRenderingContext2DBase::createPattern): (WebCore::CanvasRenderingContext2DBase::drawTextUnchecked): * page/FrameView.cpp: (WebCore::FrameView::traverseForPaintInvalidation): (WebCore::FrameView::adjustPageHeightDeprecated): * page/FrameView.h: * page/win/FrameCGWin.cpp: (WebCore::imageFromRect): * page/win/FrameGdiWin.cpp: (WebCore::imageFromRect): * platform/Cairo.cmake: * platform/SourcesCairo.txt: * platform/cocoa/DragImageCocoa.mm: (WebCore::createDragImageForLink): * platform/graphics/FontCascade.cpp: (WebCore::FontCascade::displayListForTextRun const): * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContextState::GraphicsContextState): (WebCore::GraphicsContextStateChange::accumulate): (WebCore::GraphicsContextStateChange::apply const): (WebCore::GraphicsContextStateChange::dump const): (WebCore::GraphicsContext::~GraphicsContext): (WebCore::GraphicsContext::save): (WebCore::GraphicsContext::restore): (WebCore::GraphicsContext::drawRaisedEllipse): (WebCore::GraphicsContext::setStrokeColor): (WebCore::GraphicsContext::setShadow): (WebCore::GraphicsContext::clearShadow): (WebCore::GraphicsContext::setFillColor): (WebCore::GraphicsContext::setStrokePattern): (WebCore::GraphicsContext::setFillPattern): (WebCore::GraphicsContext::setStrokeGradient): (WebCore::GraphicsContext::setFillGradient): (WebCore::GraphicsContext::beginTransparencyLayer): (WebCore::GraphicsContext::endTransparencyLayer): (WebCore::GraphicsContext::drawText): (WebCore::GraphicsContext::drawGlyphs): (WebCore::GraphicsContext::drawEmphasisMarks): (WebCore::GraphicsContext::drawBidiText): (WebCore::GraphicsContext::drawImage): (WebCore::GraphicsContext::drawTiledImage): (WebCore::GraphicsContext::drawImageBuffer): (WebCore::GraphicsContext::drawConsumingImageBuffer): (WebCore::GraphicsContext::clipRoundedRect): (WebCore::GraphicsContext::clipOutRoundedRect): (WebCore::GraphicsContext::clipToDrawingCommands): (WebCore::GraphicsContext::clipToImageBuffer): (WebCore::GraphicsContext::clipBounds const): (WebCore::GraphicsContext::fillRect): (WebCore::GraphicsContext::fillRoundedRect): (WebCore::GraphicsContext::fillRectWithRoundedHole): (WebCore::GraphicsContext::setCompositeOperation): (WebCore::GraphicsContext::drawPath): (WebCore::GraphicsContext::drawLineForText): (WebCore::GraphicsContext::paintFrameForMedia): (WebCore::NullGraphicsContext::drawConsumingImageBuffer): (WebCore::GraphicsContext::GraphicsContext): Deleted. (WebCore::GraphicsContext::hasPlatformContext const): Deleted. (WebCore::GraphicsContext::setStrokeThickness): Deleted. (WebCore::GraphicsContext::setStrokeStyle): Deleted. (WebCore::GraphicsContext::setLegacyShadow): Deleted. (WebCore::GraphicsContext::setShadowsIgnoreTransforms): Deleted. (WebCore::GraphicsContext::setShouldAntialias): Deleted. (WebCore::GraphicsContext::setShouldSmoothFonts): Deleted. (WebCore::GraphicsContext::setShouldSubpixelQuantizeFonts): Deleted. (WebCore::GraphicsContext::setImageInterpolationQuality): Deleted. (WebCore::GraphicsContext::setFillRule): Deleted. (WebCore::GraphicsContext::drawNativeImage): Deleted. (WebCore::GraphicsContext::drawPattern): Deleted. (WebCore::GraphicsContext::setTextDrawingMode): Deleted. (WebCore::GraphicsContext::setAlpha): Deleted. (WebCore::GraphicsContext::setDrawLuminanceMask): Deleted. (WebCore::GraphicsContext::setUseDarkAppearance): Deleted. (WebCore::GraphicsContext::setPlatformTextDrawingMode): Deleted. (WebCore::GraphicsContext::setPlatformStrokeStyle): Deleted. (WebCore::GraphicsContext::setPlatformShouldSmoothFonts): Deleted. (WebCore::GraphicsContext::isAcceleratedContext const): Deleted. (WebCore::GraphicsContext::platformApplyDeviceScaleFactor): Deleted. (WebCore::GraphicsContext::applyDeviceScaleFactor): Deleted. (WebCore::GraphicsContext::fillEllipse): Deleted. (WebCore::GraphicsContext::strokeEllipse): Deleted. (WebCore::GraphicsContext::platformFillEllipse): Deleted. (WebCore::GraphicsContext::platformStrokeEllipse): Deleted. (WebCore::GraphicsContext::builderState): Deleted. (WebCore::GraphicsContext::supportsInternalLinks const): Deleted. (WebCore::GraphicsContext::setDestinationForRect): Deleted. (WebCore::GraphicsContext::addDestinationAtPoint): Deleted. * platform/graphics/GraphicsContext.h: (WebCore::GraphicsContext::hasPlatformContext const): (WebCore::GraphicsContext::platformContext const): (WebCore::GraphicsContext::paintingDisabled const): (WebCore::GraphicsContext::performingPaintInvalidation const): (WebCore::GraphicsContext::invalidatingControlTints const): (WebCore::GraphicsContext::invalidatingImagesWithAsyncDecodes const): (WebCore::GraphicsContext::detectingContentfulPaint const): (WebCore::GraphicsContext::setStrokeThickness): (WebCore::GraphicsContext::setStrokeStyle): (WebCore::GraphicsContext::setStrokeGradient): (WebCore::GraphicsContext::setFillRule): (WebCore::GraphicsContext::setShadowsIgnoreTransforms): (WebCore::GraphicsContext::setShouldAntialias): (WebCore::GraphicsContext::setShouldSmoothFonts): (WebCore::GraphicsContext::setShouldSubpixelQuantizeFonts): (WebCore::GraphicsContext::setImageInterpolationQuality): (WebCore::GraphicsContext::imageInterpolationQuality const): (WebCore::GraphicsContext::setAlpha): (WebCore::GraphicsContext::alpha const): (WebCore::GraphicsContext::compositeOperation const): (WebCore::GraphicsContext::blendModeOperation const): (WebCore::GraphicsContext::setDrawLuminanceMask): (WebCore::GraphicsContext::drawLuminanceMask const): (WebCore::GraphicsContext::setTextDrawingMode): (WebCore::GraphicsContext::textDrawingMode const): (WebCore::GraphicsContext::hasVisibleShadow const): (WebCore::GraphicsContext::hasShadow const): (WebCore::GraphicsContext::hasBlurredShadow const): (WebCore::GraphicsContext::setUseDarkAppearance): (WebCore::GraphicsContext::useDarkAppearance const): (WebCore::GraphicsContext::state const): (WebCore::GraphicsContext::renderingMode const): (WebCore::GraphicsContext::fillEllipse): (WebCore::GraphicsContext::strokeEllipse): (WebCore::GraphicsContext::drawNativeImage): (WebCore::GraphicsContext::drawImage): (WebCore::GraphicsContext::drawTiledImage): (WebCore::GraphicsContext::drawImageBuffer): (WebCore::GraphicsContext::drawConsumingImageBuffer): (WebCore::GraphicsContext::drawPattern): (WebCore::GraphicsContext::isInTransparencyLayer const): (WebCore::GraphicsContext::scale): (WebCore::GraphicsContext::applyDeviceScaleFactor): (WebCore::GraphicsContext::setURLForRect): (WebCore::GraphicsContext::setDestinationForRect): (WebCore::GraphicsContext::addDestinationAtPoint): (WebCore::GraphicsContext::supportsInternalLinks const): (WebCore::GraphicsContext::setContentfulPaintDetected): (WebCore::GraphicsContext::contenfulPaintDetected const): (WebCore::GraphicsContext::deprecatedPrivateContext const): (WebCore::GraphicsContext::supportsTransparencyLayers const): (WebCore::GraphicsContext::impl): Deleted. * platform/graphics/GraphicsContextImpl.cpp: Removed. * platform/graphics/GraphicsContextImpl.h: Removed. * platform/graphics/Image.cpp: (WebCore::Image::drawTiled): * platform/graphics/Image.h: * platform/graphics/ShadowBlur.cpp: (WebCore::ShadowBlur::ShadowBlur): * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::recursiveCommitChanges): * platform/graphics/ca/win/PlatformCALayerWin.cpp: (PlatformCALayerWin::drawTextAtPoint const): * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp: (PlatformCALayerWinInternal::displayCallback): (PlatformCALayerWinInternal::drawRepaintCounters): * platform/graphics/ca/win/WebTiledBackingLayerWin.cpp: (WebTiledBackingLayerWin::displayCallback): * platform/graphics/cairo/GraphicsContextCairo.cpp: (WebCore::GraphicsContextCairo::GraphicsContextCairo): (WebCore::GraphicsContextCairo::~GraphicsContextCairo): (WebCore::GraphicsContextCairo::hasPlatformContext const): (WebCore::GraphicsContextCairo::getCTM const): (WebCore::GraphicsContextCairo::platformContext const): (WebCore::GraphicsContextCairo::save): (WebCore::GraphicsContextCairo::restore): (WebCore::GraphicsContextCairo::drawRect): (WebCore::GraphicsContextCairo::drawNativeImage): (WebCore::GraphicsContextCairo::drawLine): (WebCore::GraphicsContextCairo::drawEllipse): (WebCore::GraphicsContextCairo::fillPath): (WebCore::GraphicsContextCairo::strokePath): (WebCore::GraphicsContextCairo::fillRect): (WebCore::GraphicsContextCairo::clip): (WebCore::GraphicsContextCairo::clipPath): (WebCore::GraphicsContextCairo::clipBounds const): (WebCore::GraphicsContextCairo::clipToImageBuffer): (WebCore::GraphicsContextCairo::drawFocusRing): (WebCore::GraphicsContextCairo::drawLinesForText): (WebCore::GraphicsContextCairo::drawDotsForDocumentMarker): (WebCore::GraphicsContextCairo::roundToDevicePixels): (WebCore::GraphicsContextCairo::translate): (WebCore::GraphicsContextCairo::updateState): (WebCore::GraphicsContextCairo::concatCTM): (WebCore::GraphicsContextCairo::setCTM): (WebCore::GraphicsContextCairo::beginTransparencyLayer): (WebCore::GraphicsContextCairo::endTransparencyLayer): (WebCore::GraphicsContextCairo::clearRect): (WebCore::GraphicsContextCairo::strokeRect): (WebCore::GraphicsContextCairo::setLineCap): (WebCore::GraphicsContextCairo::setLineDash): (WebCore::GraphicsContextCairo::setLineJoin): (WebCore::GraphicsContextCairo::setMiterLimit): (WebCore::GraphicsContextCairo::clipOut): (WebCore::GraphicsContextCairo::rotate): (WebCore::GraphicsContextCairo::scale): (WebCore::GraphicsContextCairo::fillRoundedRectImpl): (WebCore::GraphicsContextCairo::fillRectWithRoundedHole): (WebCore::GraphicsContextCairo::drawPattern): (WebCore::GraphicsContextCairo::renderingMode const): (WebCore::GraphicsContextCairo::drawGlyphs): (WebCore::GraphicsContext::platformInit): Deleted. (WebCore::GraphicsContext::platformDestroy): Deleted. (WebCore::GraphicsContext::getCTM const): Deleted. (WebCore::GraphicsContext::platformContext const): Deleted. (WebCore::GraphicsContext::savePlatformState): Deleted. (WebCore::GraphicsContext::restorePlatformState): Deleted. (WebCore::GraphicsContext::drawRect): Deleted. (WebCore::GraphicsContext::drawPlatformImage): Deleted. (WebCore::GraphicsContext::drawLine): Deleted. (WebCore::GraphicsContext::drawEllipse): Deleted. (WebCore::GraphicsContext::fillPath): Deleted. (WebCore::GraphicsContext::strokePath): Deleted. (WebCore::GraphicsContext::fillRect): Deleted. (WebCore::GraphicsContext::clip): Deleted. (WebCore::GraphicsContext::clipPath): Deleted. (WebCore::GraphicsContext::clipBounds const): Deleted. (WebCore::GraphicsContext::drawFocusRing): Deleted. (WebCore::GraphicsContext::drawLineForText): Deleted. (WebCore::GraphicsContext::drawLinesForText): Deleted. (WebCore::GraphicsContext::drawDotsForDocumentMarker): Deleted. (WebCore::GraphicsContext::roundToDevicePixels): Deleted. (WebCore::GraphicsContext::translate): Deleted. (WebCore::GraphicsContext::setPlatformFillColor): Deleted. (WebCore::GraphicsContext::setPlatformStrokeColor): Deleted. (WebCore::GraphicsContext::setPlatformStrokeThickness): Deleted. (WebCore::GraphicsContext::setPlatformStrokeStyle): Deleted. (WebCore::GraphicsContext::setURLForRect): Deleted. (WebCore::GraphicsContext::concatCTM): Deleted. (WebCore::GraphicsContext::setCTM): Deleted. (WebCore::GraphicsContext::setPlatformShadow): Deleted. (WebCore::GraphicsContext::clearPlatformShadow): Deleted. (WebCore::GraphicsContext::beginPlatformTransparencyLayer): Deleted. (WebCore::GraphicsContext::endPlatformTransparencyLayer): Deleted. (WebCore::GraphicsContext::supportsTransparencyLayers): Deleted. (WebCore::GraphicsContext::clearRect): Deleted. (WebCore::GraphicsContext::strokeRect): Deleted. (WebCore::GraphicsContext::setLineCap): Deleted. (WebCore::GraphicsContext::setLineDash): Deleted. (WebCore::GraphicsContext::setLineJoin): Deleted. (WebCore::GraphicsContext::setMiterLimit): Deleted. (WebCore::GraphicsContext::setPlatformAlpha): Deleted. (WebCore::GraphicsContext::setPlatformCompositeOperation): Deleted. (WebCore::GraphicsContext::canvasClip): Deleted. (WebCore::GraphicsContext::clipOut): Deleted. (WebCore::GraphicsContext::rotate): Deleted. (WebCore::GraphicsContext::scale): Deleted. (WebCore::GraphicsContext::platformFillRoundedRect): Deleted. (WebCore::GraphicsContext::fillRectWithRoundedHole): Deleted. (WebCore::GraphicsContext::drawPlatformPattern): Deleted. (WebCore::GraphicsContext::setPlatformShouldAntialias): Deleted. (WebCore::GraphicsContext::setPlatformImageInterpolationQuality): Deleted. (WebCore::GraphicsContext::isAcceleratedContext const): Deleted. * platform/graphics/cairo/GraphicsContextImplCairo.cpp: Removed. * platform/graphics/cairo/GraphicsContextImplCairo.h: Removed. * platform/graphics/cairo/ImageBufferCairoBackend.cpp: * platform/graphics/cairo/ImageBufferCairoSurfaceBackend.cpp: (WebCore::ImageBufferCairoSurfaceBackend::ImageBufferCairoSurfaceBackend): * platform/graphics/cairo/PathCairo.cpp: (WebCore::Path::strokeBoundingRect const): (WebCore::Path::strokeContains const): * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::coreInterpolationQuality): (WebCore::cgInterpolationQuality): (WebCore::cgTextDrawingMode): (WebCore::GraphicsContextCG::GraphicsContextCG): (WebCore::GraphicsContextCG::~GraphicsContextCG): (WebCore::GraphicsContextCG::hasPlatformContext const): (WebCore::GraphicsContextCG::platformContext const): (WebCore::GraphicsContextCG::save): (WebCore::GraphicsContextCG::restore): (WebCore::GraphicsContextCG::drawNativeImage): (WebCore::drawPatternCallback): (WebCore::GraphicsContextCG::drawPattern): (WebCore::GraphicsContextCG::drawRect): (WebCore::GraphicsContextCG::drawLine): (WebCore::GraphicsContextCG::drawEllipse): (WebCore::GraphicsContextCG::applyStrokePattern): (WebCore::GraphicsContextCG::applyFillPattern): (WebCore::GraphicsContextCG::drawPath): (WebCore::GraphicsContextCG::fillPath): (WebCore::GraphicsContextCG::strokePath): (WebCore::GraphicsContextCG::fillRect): (WebCore::GraphicsContextCG::fillRoundedRectImpl): (WebCore::GraphicsContextCG::fillRectWithRoundedHole): (WebCore::GraphicsContextCG::clip): (WebCore::GraphicsContextCG::clipOut): (WebCore::GraphicsContextCG::clipPath): (WebCore::GraphicsContextCG::clipBounds const): (WebCore::GraphicsContextCG::beginTransparencyLayer): (WebCore::GraphicsContextCG::endTransparencyLayer): (WebCore::applyShadowOffsetWorkaroundIfNeeded): (WebCore::setCGShadow): (WebCore::GraphicsContextCG::updateState): (WebCore::GraphicsContextCG::setMiterLimit): (WebCore::GraphicsContextCG::clearRect): (WebCore::GraphicsContextCG::strokeRect): (WebCore::GraphicsContextCG::setLineCap): (WebCore::GraphicsContextCG::setLineDash): (WebCore::GraphicsContextCG::setLineJoin): (WebCore::GraphicsContextCG::scale): (WebCore::GraphicsContextCG::rotate): (WebCore::GraphicsContextCG::translate): (WebCore::GraphicsContextCG::concatCTM): (WebCore::GraphicsContextCG::setCTM): (WebCore::GraphicsContextCG::getCTM const): (WebCore::GraphicsContextCG::roundToDevicePixels): (WebCore::GraphicsContextCG::drawLinesForText): (WebCore::GraphicsContextCG::setURLForRect): (WebCore::GraphicsContextCG::setIsCALayerContext): (WebCore::GraphicsContextCG::isCALayerContext const): (WebCore::GraphicsContextCG::setIsAcceleratedContext): (WebCore::GraphicsContextCG::renderingMode const): (WebCore::GraphicsContextCG::applyDeviceScaleFactor): (WebCore::GraphicsContextCG::fillEllipse): (WebCore::GraphicsContextCG::strokeEllipse): (WebCore::GraphicsContextCG::supportsInternalLinks const): (WebCore::GraphicsContextCG::setDestinationForRect): (WebCore::GraphicsContextCG::addDestinationAtPoint): (WebCore::setCGStrokeColor): Deleted. (WebCore::convertInterpolationQuality): Deleted. (WebCore::GraphicsContext::platformInit): Deleted. (WebCore::GraphicsContext::platformDestroy): Deleted. (WebCore::GraphicsContext::platformContext const): Deleted. (WebCore::GraphicsContext::savePlatformState): Deleted. (WebCore::GraphicsContext::restorePlatformState): Deleted. (WebCore::GraphicsContext::drawPlatformImage): Deleted. (WebCore::GraphicsContext::drawPlatformPattern): Deleted. (WebCore::GraphicsContext::drawRect): Deleted. (WebCore::GraphicsContext::drawLine): Deleted. (WebCore::GraphicsContext::drawEllipse): Deleted. (WebCore::GraphicsContext::applyStrokePattern): Deleted. (WebCore::GraphicsContext::applyFillPattern): Deleted. (WebCore::GraphicsContext::drawPath): Deleted. (WebCore::GraphicsContext::fillPath): Deleted. (WebCore::GraphicsContext::strokePath): Deleted. (WebCore::GraphicsContext::fillRect): Deleted. (WebCore::GraphicsContext::platformFillRoundedRect): Deleted. (WebCore::GraphicsContext::fillRectWithRoundedHole): Deleted. (WebCore::GraphicsContext::clip): Deleted. (WebCore::GraphicsContext::clipOut): Deleted. (WebCore::GraphicsContext::clipPath): Deleted. (WebCore::GraphicsContext::clipBounds const): Deleted. (WebCore::GraphicsContext::beginPlatformTransparencyLayer): Deleted. (WebCore::GraphicsContext::endPlatformTransparencyLayer): Deleted. (WebCore::GraphicsContext::supportsTransparencyLayers): Deleted. (WebCore::GraphicsContext::setPlatformShadow): Deleted. (WebCore::GraphicsContext::clearPlatformShadow): Deleted. (WebCore::GraphicsContext::setMiterLimit): Deleted. (WebCore::GraphicsContext::clearRect): Deleted. (WebCore::GraphicsContext::strokeRect): Deleted. (WebCore::GraphicsContext::setLineCap): Deleted. (WebCore::GraphicsContext::setLineDash): Deleted. (WebCore::GraphicsContext::setLineJoin): Deleted. (WebCore::GraphicsContext::canvasClip): Deleted. (WebCore::GraphicsContext::scale): Deleted. (WebCore::GraphicsContext::rotate): Deleted. (WebCore::GraphicsContext::translate): Deleted. (WebCore::GraphicsContext::concatCTM): Deleted. (WebCore::GraphicsContext::setCTM): Deleted. (WebCore::GraphicsContext::getCTM const): Deleted. (WebCore::GraphicsContext::roundToDevicePixels): Deleted. (WebCore::GraphicsContext::drawLineForText): Deleted. (WebCore::GraphicsContext::drawLinesForText): Deleted. (WebCore::GraphicsContext::setURLForRect): Deleted. (WebCore::GraphicsContext::setPlatformImageInterpolationQuality): Deleted. (WebCore::GraphicsContext::setIsCALayerContext): Deleted. (WebCore::GraphicsContext::isCALayerContext const): Deleted. (WebCore::GraphicsContext::setIsAcceleratedContext): Deleted. (WebCore::GraphicsContext::isAcceleratedContext const): Deleted. (WebCore::GraphicsContext::setPlatformTextDrawingMode): Deleted. (WebCore::GraphicsContext::setPlatformStrokeColor): Deleted. (WebCore::GraphicsContext::setPlatformStrokeThickness): Deleted. (WebCore::GraphicsContext::setPlatformFillColor): Deleted. (WebCore::GraphicsContext::setPlatformShouldAntialias): Deleted. (WebCore::GraphicsContext::setPlatformShouldSmoothFonts): Deleted. (WebCore::GraphicsContext::setPlatformAlpha): Deleted. (WebCore::GraphicsContext::setPlatformCompositeOperation): Deleted. (WebCore::GraphicsContext::platformApplyDeviceScaleFactor): Deleted. (WebCore::GraphicsContext::platformFillEllipse): Deleted. (WebCore::GraphicsContext::platformStrokeEllipse): Deleted. (WebCore::GraphicsContext::supportsInternalLinks const): Deleted. (WebCore::GraphicsContext::setDestinationForRect): Deleted. (WebCore::GraphicsContext::addDestinationAtPoint): Deleted. * platform/graphics/cg/GraphicsContextCG.h: * platform/graphics/cg/ImageBufferCGBitmapBackend.cpp: (WebCore::ImageBufferCGBitmapBackend::create): * platform/graphics/cg/PathCG.cpp: (WebCore::Path::strokeContains const): (WebCore::Path::strokeBoundingRect const): * platform/graphics/cg/PatternCG.cpp: (WebCore::patternCallback): * platform/graphics/cocoa/FontCascadeCocoa.mm: * platform/graphics/cocoa/GraphicsContextCocoa.mm: (WebCore::GraphicsContextCG::drawFocusRing): (WebCore::drawFocusRingToContextAtTime): (WebCore::GraphicsContextCG::drawDotsForDocumentMarker): (WebCore::GraphicsContext::drawFocusRing): Deleted. (WebCore::GraphicsContext::drawDotsForDocumentMarker): Deleted. * platform/graphics/cocoa/IOSurface.mm: (WebCore::IOSurface::ensureGraphicsContext): * platform/graphics/displaylists/DisplayListDrawGlyphsRecorder.h: * platform/graphics/displaylists/DisplayListDrawGlyphsRecorderCoreText.cpp: (WebCore::DisplayList::DrawGlyphsRecorder::createInternalContext): (WebCore::DisplayList::DrawGlyphsRecorder::populateInternalContext): (WebCore::DisplayList::DrawGlyphsRecorder::recordDrawGlyphs): * platform/graphics/displaylists/DisplayListDrawingContext.cpp: (WebCore::DisplayList::DrawingContext::DrawingContext): (WebCore::DisplayList::DrawingContext::recorder): Deleted. * platform/graphics/displaylists/DisplayListDrawingContext.h: (WebCore::DisplayList::DrawingContext::recorder): * platform/graphics/displaylists/DisplayListItems.cpp: (WebCore::DisplayList::DrawPath::apply const): * platform/graphics/displaylists/DisplayListItems.h: (WebCore::DisplayList::SetState::encode const): (WebCore::DisplayList::SetState::decode): * platform/graphics/displaylists/DisplayListRecorder.cpp: (WebCore::DisplayList::Recorder::Recorder): (WebCore::DisplayList::Recorder::drawImageBuffer): (WebCore::DisplayList::Recorder::getCTM const): (WebCore::DisplayList::Recorder::drawLinesForText): (WebCore::DisplayList::Recorder::drawFocusRing): (WebCore::DisplayList::Recorder::clipBounds const): (WebCore::DisplayList::Recorder::clipToDrawingCommands): (WebCore::DisplayList::Recorder::paintFrameForMedia): (WebCore::DisplayList::Recorder::extentFromLocalBounds const): (WebCore::DisplayList::Recorder::clearShadow): Deleted. (WebCore::DisplayList::Recorder::getCTM): Deleted. (WebCore::DisplayList::Recorder::clipBounds): Deleted. (WebCore::DisplayList::Recorder::canPaintFrameForMedia const): Deleted. * platform/graphics/displaylists/DisplayListRecorder.h: (WebCore::DisplayList::Recorder::append): * platform/graphics/mac/ColorMac.mm: (WebCore::makeSimpleColorFromNSColor): * platform/graphics/mac/WebLayer.mm: (-[WebLayer drawInContext:]): (-[WebSimpleLayer drawInContext:]): * platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp: (Nicosia::CairoOperationRecorder::CairoOperationRecorder): (Nicosia::CairoOperationRecorder::fillRect): (Nicosia::CairoOperationRecorder::fillRoundedRect): (Nicosia::CairoOperationRecorder::fillRectWithRoundedHole): (Nicosia::CairoOperationRecorder::fillPath): (Nicosia::CairoOperationRecorder::fillEllipse): (Nicosia::CairoOperationRecorder::strokeRect): (Nicosia::CairoOperationRecorder::strokePath): (Nicosia::CairoOperationRecorder::strokeEllipse): (Nicosia::CairoOperationRecorder::drawGlyphs): (Nicosia::CairoOperationRecorder::drawNativeImage): (Nicosia::CairoOperationRecorder::drawRect): (Nicosia::CairoOperationRecorder::drawLine): (Nicosia::CairoOperationRecorder::drawLinesForText): (Nicosia::CairoOperationRecorder::drawEllipse): (Nicosia::CairoOperationRecorder::getCTM const): (Nicosia::CairoOperationRecorder::clipBounds const): (Nicosia::CairoOperationRecorder::clipToDrawingCommands): (Nicosia::CairoOperationRecorder::paintFrameForMedia): (Nicosia::CairoOperationRecorder::clearShadow): Deleted. (Nicosia::CairoOperationRecorder::drawPath): Deleted. (Nicosia::CairoOperationRecorder::getCTM): Deleted. (Nicosia::CairoOperationRecorder::clipBounds): Deleted. * platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.h: * platform/graphics/nicosia/cairo/NicosiaPaintingContextCairo.cpp: (Nicosia::PaintingContextCairo::ForPainting::ForPainting): (Nicosia::PaintingContextCairo::ForRecording::ForRecording): * platform/graphics/win/GraphicsContextCGWin.cpp: (WebCore::GraphicsContextCG::GraphicsContextCG): (WebCore::GraphicsContext::releaseWindowsContext): (WebCore::GraphicsContext::drawWindowsBitmap): (WebCore::GraphicsContextCG::drawFocusRing): (WebCore::GraphicsContextCG::drawDotsForDocumentMarker): (WebCore::GraphicsContextCG::deprecatedPrivateContext const): (WebCore::GraphicsContext::GraphicsContext): Deleted. (WebCore::GraphicsContext::platformInit): Deleted. (WebCore::GraphicsContext::drawFocusRing): Deleted. (WebCore::GraphicsContext::drawDotsForDocumentMarker): Deleted. * platform/graphics/win/GraphicsContextCairoWin.cpp: (WebCore::GraphicsContextCairo::GraphicsContextCairo): (WebCore::GraphicsContext::releaseWindowsContext): (WebCore::GraphicsContextCairo::deprecatedPrivateContext const): (WebCore::GraphicsContext::GraphicsContext): Deleted. (WebCore::GraphicsContext::platformInit): Deleted. * platform/graphics/win/GraphicsContextDirect2D.cpp: (WebCore::GraphicsContextDirect2D::GraphicsContextDirect2D): (WebCore::GraphicsContextDirect2D::systemFactory): (WebCore::GraphicsContextDirect2D::defaultRenderTarget): (WebCore::GraphicsContextDirect2D::platformInit): (WebCore::GraphicsContextDirect2D::~GraphicsContextDirect2D): (WebCore::GraphicsContextDirect2D::platformContext const): (WebCore::GraphicsContextDirect2D::save): (WebCore::GraphicsContextDirect2D::restore): (WebCore::GraphicsContextDirect2D::drawNativeImage): (WebCore::GraphicsContextDirect2D::releaseWindowsContext): (WebCore::GraphicsContextDirect2D::drawWindowsBitmap): (WebCore::GraphicsContextDirect2D::drawFocusRing): (WebCore::GraphicsContextDirect2D::drawDotsForDocumentMarker): (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): (WebCore::GraphicsContextDirect2D::brushWithColor): (WebCore::GraphicsContextDirect2D::colorWithGlobalAlpha const): (WebCore::GraphicsContextDirect2D::solidStrokeBrush const): (WebCore::GraphicsContextDirect2D::solidFillBrush const): (WebCore::GraphicsContextDirect2D::patternStrokeBrush const): (WebCore::GraphicsContextDirect2D::patternFillBrush const): (WebCore::GraphicsContextDirect2D::beginDraw): (WebCore::GraphicsContextDirect2D::endDraw): (WebCore::GraphicsContextDirect2D::flush): (WebCore::GraphicsContextDirect2D::drawPattern): (WebCore::GraphicsContextDirect2D::drawRect): (WebCore::GraphicsContextDirect2D::strokeStyle const): (WebCore::GraphicsContextDirect2D::drawLine): (WebCore::GraphicsContextDirect2D::drawEllipse): (WebCore::GraphicsContextDirect2D::applyStrokePattern): (WebCore::GraphicsContextDirect2D::applyFillPattern): (WebCore::GraphicsContextDirect2D::drawPath): (WebCore::GraphicsContextDirect2D::fillPath): (WebCore::GraphicsContextDirect2D::strokePath): (WebCore::GraphicsContextDirect2D::fillRect): (WebCore::GraphicsContextDirect2D::fillRoundedRectImpl): (WebCore::GraphicsContextDirect2D::fillRectWithRoundedHole): (WebCore::GraphicsContextDirect2D::clip): (WebCore::GraphicsContextDirect2D::clipOut): (WebCore::GraphicsContextDirect2D::clipPath): (WebCore::GraphicsContextDirect2D::clipBounds const): (WebCore::GraphicsContextDirect2D::beginTransparencyLayer): (WebCore::GraphicsContextDirect2D::endTransparencyLayer): (WebCore::GraphicsContextDirect2D::supportsTransparencyLayers): (WebCore::GraphicsContextDirect2D::updateState): (WebCore::GraphicsContextDirect2D::setMiterLimit): (WebCore::GraphicsContextDirect2D::clearRect): (WebCore::GraphicsContextDirect2D::strokeRect): (WebCore::GraphicsContextDirect2D::setLineCap): (WebCore::GraphicsContextDirect2D::setLineDash): (WebCore::GraphicsContextDirect2D::setLineJoin): (WebCore::GraphicsContextDirect2D::scale): (WebCore::GraphicsContextDirect2D::rotate): (WebCore::GraphicsContextDirect2D::translate): (WebCore::GraphicsContextDirect2D::concatCTM): (WebCore::GraphicsContextDirect2D::setCTM): (WebCore::GraphicsContextDirect2D::getCTM const): (WebCore::GraphicsContextDirect2D::roundToDevicePixels): (WebCore::GraphicsContextDirect2D::drawLinesForText): (WebCore::GraphicsContextDirect2D::setURLForRect): (WebCore::GraphicsContextDirect2D::setIsCALayerContext): (WebCore::GraphicsContextDirect2D::isCALayerContext const): (WebCore::GraphicsContextDirect2D::setIsAcceleratedContext): (WebCore::GraphicsContextDirect2D::isAcceleratedContext const): (WebCore::GraphicsContextDirect2D::applyDeviceScaleFactor): (WebCore::GraphicsContextDirect2D::fillEllipse): (WebCore::GraphicsContextDirect2D::strokeEllipse): (WebCore::GraphicsContextDirect2D::drawGlyphs): (WebCore::GraphicsContextDirect2D::clipToDrawingCommands): (WebCore::GraphicsContextDirect2D::clipToImageBuffer): (WebCore::GraphicsContextDirect2D::paintFrameForMedia): (WebCore::GraphicsContext::GraphicsContext): Deleted. (WebCore::GraphicsContext::systemFactory): Deleted. (WebCore::GraphicsContext::defaultRenderTarget): Deleted. (WebCore::GraphicsContext::platformInit): Deleted. (WebCore::GraphicsContext::platformDestroy): Deleted. (WebCore::GraphicsContext::platformContext const): Deleted. (WebCore::GraphicsContext::savePlatformState): Deleted. (WebCore::GraphicsContext::restorePlatformState): Deleted. (WebCore::GraphicsContext::drawPlatformImage): Deleted. (WebCore::GraphicsContext::releaseWindowsContext): Deleted. (WebCore::GraphicsContext::drawWindowsBitmap): Deleted. (WebCore::GraphicsContext::drawFocusRing): Deleted. (WebCore::GraphicsContext::drawDotsForDocumentMarker): Deleted. (WebCore::GraphicsContext::brushWithColor): Deleted. (WebCore::GraphicsContext::colorWithGlobalAlpha const): Deleted. (WebCore::GraphicsContext::solidStrokeBrush const): Deleted. (WebCore::GraphicsContext::solidFillBrush const): Deleted. (WebCore::GraphicsContext::patternStrokeBrush const): Deleted. (WebCore::GraphicsContext::patternFillBrush const): Deleted. (WebCore::GraphicsContext::beginDraw): Deleted. (WebCore::GraphicsContext::endDraw): Deleted. (WebCore::GraphicsContext::flush): Deleted. (WebCore::GraphicsContext::drawPlatformPattern): Deleted. (WebCore::GraphicsContext::drawRect): Deleted. (WebCore::GraphicsContext::platformStrokeStyle const): Deleted. (WebCore::GraphicsContext::drawLine): Deleted. (WebCore::GraphicsContext::drawEllipse): Deleted. (WebCore::GraphicsContext::applyStrokePattern): Deleted. (WebCore::GraphicsContext::applyFillPattern): Deleted. (WebCore::GraphicsContext::drawPath): Deleted. (WebCore::GraphicsContext::fillPath): Deleted. (WebCore::GraphicsContext::strokePath): Deleted. (WebCore::GraphicsContext::fillRect): Deleted. (WebCore::GraphicsContext::platformFillRoundedRect): Deleted. (WebCore::GraphicsContext::fillRectWithRoundedHole): Deleted. (WebCore::GraphicsContext::clip): Deleted. (WebCore::GraphicsContext::clipOut): Deleted. (WebCore::GraphicsContext::clipPath): Deleted. (WebCore::GraphicsContext::clipBounds const): Deleted. (WebCore::GraphicsContext::beginPlatformTransparencyLayer): Deleted. (WebCore::GraphicsContext::endPlatformTransparencyLayer): Deleted. (WebCore::GraphicsContext::supportsTransparencyLayers): Deleted. (WebCore::GraphicsContext::setPlatformShadow): Deleted. (WebCore::GraphicsContext::clearPlatformShadow): Deleted. (WebCore::GraphicsContext::setPlatformStrokeStyle): Deleted. (WebCore::GraphicsContext::setMiterLimit): Deleted. (WebCore::GraphicsContext::clearRect): Deleted. (WebCore::GraphicsContext::strokeRect): Deleted. (WebCore::GraphicsContext::setLineCap): Deleted. (WebCore::GraphicsContext::setLineDash): Deleted. (WebCore::GraphicsContext::setLineJoin): Deleted. (WebCore::GraphicsContext::canvasClip): Deleted. (WebCore::GraphicsContext::scale): Deleted. (WebCore::GraphicsContext::rotate): Deleted. (WebCore::GraphicsContext::translate): Deleted. (WebCore::GraphicsContext::concatCTM): Deleted. (WebCore::GraphicsContext::setCTM): Deleted. (WebCore::GraphicsContext::getCTM const): Deleted. (WebCore::GraphicsContext::roundToDevicePixels): Deleted. (WebCore::GraphicsContext::drawLineForText): Deleted. (WebCore::GraphicsContext::drawLinesForText): Deleted. (WebCore::GraphicsContext::setURLForRect): Deleted. (WebCore::GraphicsContext::setPlatformImageInterpolationQuality): Deleted. (WebCore::GraphicsContext::setIsCALayerContext): Deleted. (WebCore::GraphicsContext::isCALayerContext const): Deleted. (WebCore::GraphicsContext::setIsAcceleratedContext): Deleted. (WebCore::GraphicsContext::isAcceleratedContext const): Deleted. (WebCore::GraphicsContext::setPlatformTextDrawingMode): Deleted. (WebCore::GraphicsContext::setPlatformStrokeColor): Deleted. (WebCore::GraphicsContext::setPlatformStrokeThickness): Deleted. (WebCore::GraphicsContext::setPlatformFillColor): Deleted. (WebCore::GraphicsContext::setPlatformShouldAntialias): Deleted. (WebCore::GraphicsContext::setPlatformShouldSmoothFonts): Deleted. (WebCore::GraphicsContext::setPlatformAlpha): Deleted. (WebCore::GraphicsContext::setPlatformCompositeOperation): Deleted. (WebCore::GraphicsContext::platformApplyDeviceScaleFactor): Deleted. (WebCore::GraphicsContext::platformFillEllipse): Deleted. (WebCore::GraphicsContext::platformStrokeEllipse): Deleted. * platform/graphics/win/GraphicsContextImplDirect2D.cpp: Removed. * platform/graphics/win/GraphicsContextImplDirect2D.h: Removed. * platform/graphics/win/GraphicsContextWin.cpp: (WebCore::GraphicsContext::setShouldIncludeChildWindows): (WebCore::GraphicsContext::shouldIncludeChildWindows const): (WebCore::GraphicsContext::createWindowsBitmap): (WebCore::GraphicsContext::getWindowsContext): (WebCore::GraphicsContext::hdc const): * platform/graphics/win/ImageBufferDirect2DBackend.cpp: (WebCore::ImageBufferDirect2DBackend::create): * platform/graphics/win/ImageCGWin.cpp: (WebCore::BitmapImage::getHBITMAPOfSize): * platform/graphics/win/ImageCairoWin.cpp: (WebCore::BitmapImage::getHBITMAPOfSize): * platform/graphics/win/PathDirect2D.cpp: (WebCore::Path::strokeContains const): (WebCore::Path::strokeBoundingRect const): * platform/ios/DragImageIOS.mm: (WebCore::createDragImageFromImage): (WebCore::createDragImageForLink): (WebCore::createDragImageForSelection): (WebCore::createDragImageForRange): (WebCore::createDragImageForColor): * platform/mediastream/cocoa/AudioMediaStreamTrackRendererCocoa.cpp: * platform/win/DragImageWin.cpp: (WebCore::createDragImageForLink): * platform/win/PopupMenuWin.cpp: (WebCore::PopupMenuWin::paint): * rendering/ContentfulPaintChecker.cpp: (WebCore::ContentfulPaintChecker::qualifiesForContentfulPaint): * rendering/RenderBoxModelObject.cpp: (WebCore::applyBoxShadowForBackground): (WebCore::RenderBoxModelObject::paintBoxShadow): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateEventRegion): Source/WebKit: * Shared/cairo/ShareableBitmapCairo.cpp: (WebKit::ShareableBitmap::createGraphicsContext): * Shared/cg/ShareableBitmapCG.cpp: (WebKit::ShareableBitmap::createGraphicsContext): * Shared/win/ShareableBitmapDirect2D.cpp: (WebKit::ShareableBitmap::createGraphicsContext): * UIProcess/cairo/BackingStoreCairo.cpp: (WebKit::BackingStore::incorporateUpdate): * UIProcess/mac/WKPrintingView.mm: (-[WKPrintingView _drawPreview:]): * UIProcess/win/BackingStoreDirect2D.cpp: * UIProcess/win/WebPopupMenuProxyWin.cpp: (WebKit::WebPopupMenuProxyWin::paint): * WebProcess/Plugins/PDF/PDFPlugin.mm: (WebKit::PDFPlugin::paintControlForLayerInContext): * WebProcess/WebPage/Cocoa/WebPageCocoa.mm: (WebKit::WebPage::pdfSnapshotAtSize): * WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::drawPagesToPDFImpl): * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp: (WebKit::WebPrintOperationGtk::renderPage): Source/WebKitLegacy/mac: * Misc/WebCoreStatistics.mm: (-[WebFrame printToCGContext:pageWidth:pageHeight:]): * Misc/WebKitNSStringExtras.mm: (-[NSString _web_drawAtPoint:font:textColor:]): * WebInspector/WebNodeHighlightView.mm: (-[WebNodeHighlightView drawRect:]): * WebView/WebFrame.mm: (-[WebFrame _drawRect:contentsOnly:]): Source/WebKitLegacy/win: * FullscreenVideoController.cpp: (FullscreenVideoController::draw): * WebFrame.cpp: (WebFrame::paintDocumentRectToContext): (WebFrame::paintScrollViewRectToContextAtPoint): (WebFrame::spoolPages): * WebNodeHighlight.cpp: (WebNodeHighlight::update): * WebView.cpp: (WebView::paintWithDirect2D): (WebView::paintIntoBackingStore): Tools: * TestWebKitAPI/Tests/WebCore/cg/DisplayListTestsCG.cpp: (TestWebKitAPI::TEST): Canonical link: https://commits.webkit.org/238144@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@278062 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-05-26 00:01:28 +00:00
platform/graphics/win/GraphicsContextWin.h
[FTW] Refactor Direct2D code to follow Cairo's model to support modern WebKit https://bugs.webkit.org/show_bug.cgi?id=200270 Reviewed by Dean Jackson. Refactor the Direct2D code in WebCore so that the core routines can be shared between GraphicsContext and GraphicsContextImpl. Implement PlatformContext, BackingStoreBackend, and GraphicsContextImpl for the Direct2D engine. This patch effectively just moves code around. * PlatformFTW.cmake: * platform/graphics/GraphicsContext.h: * platform/graphics/GraphicsContextImpl.h: * platform/graphics/ImageSource.cpp: * platform/graphics/Pattern.h: * platform/graphics/displaylists/DisplayListRecorder.cpp: * platform/graphics/displaylists/DisplayListRecorder.h: * platform/graphics/win/BackingStoreBackendDirect2D.h: Added. * platform/graphics/win/BackingStoreBackendDirect2DImpl.cpp: Added. * platform/graphics/win/BackingStoreBackendDirect2DImpl.h: Added. * platform/graphics/win/Direct2DOperations.cpp: Added. * platform/graphics/win/Direct2DOperations.h: Added. * platform/graphics/win/Direct2DUtilities.cpp: Added. * platform/graphics/win/Direct2DUtilities.h: Added. * platform/graphics/win/FontCascadeDirect2D.cpp: * platform/graphics/win/GradientDirect2D.cpp: * platform/graphics/win/GraphicsContextDirect2D.cpp: * platform/graphics/win/GraphicsContextImplDirect2D.cpp: Added. * platform/graphics/win/GraphicsContextImplDirect2D.h: Added. * platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h: * platform/graphics/win/ImageBufferDataDirect2D.h: * platform/graphics/win/ImageBufferDirect2D.cpp: * platform/graphics/win/NativeImageDirect2D.cpp: * platform/graphics/win/PathDirect2D.cpp: * platform/graphics/win/PatternDirect2D.cpp: * platform/graphics/win/PlatformContextDirect2D.cpp: Added. * platform/graphics/win/PlatformContextDirect2D.h: Added. * platform/win/DragImageWin.cpp: * svg/graphics/SVGImage.cpp: Canonical link: https://commits.webkit.org/214068@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248020 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-07-30 22:36:14 +00:00
platform/graphics/win/ImageDecoderDirect2D.h
Use IWICBitmap (rather than ID2D1Bitmap) for NativeImagePtr on FTW https://bugs.webkit.org/show_bug.cgi?id=200093 Reviewed by Dean Jackson. Source/WebCore: When I wrote the original Direct2D code, I did not realize that the backing memory for the ID2D1Bitmap was inaccessible since it is effectively a representation of GPU memory. There is no API to access or modify the pixels. Instead, MSDN documentation indicates that we should be using IWICBitmap objects, which are converted to ID2D1Bitmap objects when things are ready to be rendered. This makes it possible to use the TextureMapper backend to do efficient compositing and tile drawing, since the data backing the bitmap can now be accessed and manipulated, allowing us to support filters and other effects. * PlatformFTW.cmake: * platform/MIMETypeRegistry.cpp: (WebCore::supportedImageMIMETypesForEncoding): * platform/graphics/ANGLEWebKitBridge.h: * platform/graphics/GraphicsContext.h: * platform/graphics/ImageBuffer.h: * platform/graphics/NativeImage.h: * platform/graphics/OpenGLShims.h: * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas): * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp: (WebCore::GraphicsContext3D::GraphicsContext3D): (WebCore::GraphicsContext3D::platformLayer const): * platform/graphics/texmap/BitmapTexture.cpp: (WebCore::BitmapTexture::updateContents): * platform/graphics/texmap/BitmapTextureGL.cpp: (WebCore::BitmapTextureGL::updateContents): * platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp: (WebCore::GraphicsContext3D::~GraphicsContext3D): * platform/graphics/win/GraphicsContextDirect2D.cpp: (WebCore::GraphicsContext::GraphicsContext): (WebCore::GraphicsContext::platformInit): (WebCore::GraphicsContextPlatformPrivate::setAlpha): (WebCore::GraphicsContext::drawNativeImage): (WebCore::GraphicsContext::drawDeviceBitmap): (WebCore::GraphicsContext::releaseWindowsContext): (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate): (WebCore::GraphicsContextPlatformPrivate::beginDraw): (WebCore::GraphicsContextPlatformPrivate::endDraw): (WebCore::GraphicsContext::drawPattern): (WebCore::GraphicsContext::clipPath): * platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h: * platform/graphics/win/ImageBufferDataDirect2D.cpp: (WebCore::ImageBufferData::getData const): (WebCore::ImageBufferData::putData): * platform/graphics/win/ImageBufferDataDirect2D.h: (): Deleted. * platform/graphics/win/ImageBufferDirect2D.cpp: (WebCore::ImageBuffer::createCompatibleBuffer): (WebCore::ImageBuffer::ImageBuffer): (WebCore::createCroppedImageIfNecessary): (WebCore::createBitmapImageAfterScalingIfNeeded): (WebCore::ImageBuffer::copyImage const): (WebCore::ImageBuffer::sinkIntoNativeImage): (WebCore::ImageBuffer::copyNativeImage const): (WebCore::ImageBuffer::draw): * platform/graphics/win/ImageDecoderDirect2D.cpp: (WebCore::ImageDecoderDirect2D::createFrameImageAtIndex): * platform/graphics/win/ImageDirect2D.cpp: (WebCore::BitmapImage::drawFrameMatchingSourceSize): * platform/graphics/win/NativeImageDirect2D.cpp: (WebCore::imagingFactory): (WebCore::nativeImageSize): (WebCore::nativeImageHasAlpha): (WebCore::nativeImageSinglePixelSolidColor): (WebCore::drawNativeImage): (WebCore::clearNativeImageSubimages): * platform/graphics/win/PathDirect2D.cpp: (WebCore::Path::strokeContains const): * platform/graphics/win/PatternDirect2D.cpp: (WebCore::Pattern::createPlatformPattern const): * platform/win/PasteboardWin.cpp: (WebCore::Pasteboard::read): * rendering/RenderElement.cpp: (WebCore::RenderElement::shouldRespectImageOrientation const): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::adjustTiledBackingCoverage): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::nativeImage): Source/WebCore/PAL: * pal/PlatformFTW.cmake: Canonical link: https://commits.webkit.org/213964@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247841 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-07-25 22:02:00 +00:00
platform/graphics/win/LocalWindowsContext.h
platform/graphics/win/MediaPlayerPrivateFullscreenWindow.h
[FTW] Refactor Direct2D code to follow Cairo's model to support modern WebKit https://bugs.webkit.org/show_bug.cgi?id=200270 Reviewed by Dean Jackson. Refactor the Direct2D code in WebCore so that the core routines can be shared between GraphicsContext and GraphicsContextImpl. Implement PlatformContext, BackingStoreBackend, and GraphicsContextImpl for the Direct2D engine. This patch effectively just moves code around. * PlatformFTW.cmake: * platform/graphics/GraphicsContext.h: * platform/graphics/GraphicsContextImpl.h: * platform/graphics/ImageSource.cpp: * platform/graphics/Pattern.h: * platform/graphics/displaylists/DisplayListRecorder.cpp: * platform/graphics/displaylists/DisplayListRecorder.h: * platform/graphics/win/BackingStoreBackendDirect2D.h: Added. * platform/graphics/win/BackingStoreBackendDirect2DImpl.cpp: Added. * platform/graphics/win/BackingStoreBackendDirect2DImpl.h: Added. * platform/graphics/win/Direct2DOperations.cpp: Added. * platform/graphics/win/Direct2DOperations.h: Added. * platform/graphics/win/Direct2DUtilities.cpp: Added. * platform/graphics/win/Direct2DUtilities.h: Added. * platform/graphics/win/FontCascadeDirect2D.cpp: * platform/graphics/win/GradientDirect2D.cpp: * platform/graphics/win/GraphicsContextDirect2D.cpp: * platform/graphics/win/GraphicsContextImplDirect2D.cpp: Added. * platform/graphics/win/GraphicsContextImplDirect2D.h: Added. * platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h: * platform/graphics/win/ImageBufferDataDirect2D.h: * platform/graphics/win/ImageBufferDirect2D.cpp: * platform/graphics/win/NativeImageDirect2D.cpp: * platform/graphics/win/PathDirect2D.cpp: * platform/graphics/win/PatternDirect2D.cpp: * platform/graphics/win/PlatformContextDirect2D.cpp: Added. * platform/graphics/win/PlatformContextDirect2D.h: Added. * platform/win/DragImageWin.cpp: * svg/graphics/SVGImage.cpp: Canonical link: https://commits.webkit.org/214068@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248020 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-07-30 22:36:14 +00:00
platform/graphics/win/PlatformContextDirect2D.h
Use IWICBitmap (rather than ID2D1Bitmap) for NativeImagePtr on FTW https://bugs.webkit.org/show_bug.cgi?id=200093 Reviewed by Dean Jackson. Source/WebCore: When I wrote the original Direct2D code, I did not realize that the backing memory for the ID2D1Bitmap was inaccessible since it is effectively a representation of GPU memory. There is no API to access or modify the pixels. Instead, MSDN documentation indicates that we should be using IWICBitmap objects, which are converted to ID2D1Bitmap objects when things are ready to be rendered. This makes it possible to use the TextureMapper backend to do efficient compositing and tile drawing, since the data backing the bitmap can now be accessed and manipulated, allowing us to support filters and other effects. * PlatformFTW.cmake: * platform/MIMETypeRegistry.cpp: (WebCore::supportedImageMIMETypesForEncoding): * platform/graphics/ANGLEWebKitBridge.h: * platform/graphics/GraphicsContext.h: * platform/graphics/ImageBuffer.h: * platform/graphics/NativeImage.h: * platform/graphics/OpenGLShims.h: * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas): * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp: (WebCore::GraphicsContext3D::GraphicsContext3D): (WebCore::GraphicsContext3D::platformLayer const): * platform/graphics/texmap/BitmapTexture.cpp: (WebCore::BitmapTexture::updateContents): * platform/graphics/texmap/BitmapTextureGL.cpp: (WebCore::BitmapTextureGL::updateContents): * platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp: (WebCore::GraphicsContext3D::~GraphicsContext3D): * platform/graphics/win/GraphicsContextDirect2D.cpp: (WebCore::GraphicsContext::GraphicsContext): (WebCore::GraphicsContext::platformInit): (WebCore::GraphicsContextPlatformPrivate::setAlpha): (WebCore::GraphicsContext::drawNativeImage): (WebCore::GraphicsContext::drawDeviceBitmap): (WebCore::GraphicsContext::releaseWindowsContext): (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate): (WebCore::GraphicsContextPlatformPrivate::beginDraw): (WebCore::GraphicsContextPlatformPrivate::endDraw): (WebCore::GraphicsContext::drawPattern): (WebCore::GraphicsContext::clipPath): * platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h: * platform/graphics/win/ImageBufferDataDirect2D.cpp: (WebCore::ImageBufferData::getData const): (WebCore::ImageBufferData::putData): * platform/graphics/win/ImageBufferDataDirect2D.h: (): Deleted. * platform/graphics/win/ImageBufferDirect2D.cpp: (WebCore::ImageBuffer::createCompatibleBuffer): (WebCore::ImageBuffer::ImageBuffer): (WebCore::createCroppedImageIfNecessary): (WebCore::createBitmapImageAfterScalingIfNeeded): (WebCore::ImageBuffer::copyImage const): (WebCore::ImageBuffer::sinkIntoNativeImage): (WebCore::ImageBuffer::copyNativeImage const): (WebCore::ImageBuffer::draw): * platform/graphics/win/ImageDecoderDirect2D.cpp: (WebCore::ImageDecoderDirect2D::createFrameImageAtIndex): * platform/graphics/win/ImageDirect2D.cpp: (WebCore::BitmapImage::drawFrameMatchingSourceSize): * platform/graphics/win/NativeImageDirect2D.cpp: (WebCore::imagingFactory): (WebCore::nativeImageSize): (WebCore::nativeImageHasAlpha): (WebCore::nativeImageSinglePixelSolidColor): (WebCore::drawNativeImage): (WebCore::clearNativeImageSubimages): * platform/graphics/win/PathDirect2D.cpp: (WebCore::Path::strokeContains const): * platform/graphics/win/PatternDirect2D.cpp: (WebCore::Pattern::createPlatformPattern const): * platform/win/PasteboardWin.cpp: (WebCore::Pasteboard::read): * rendering/RenderElement.cpp: (WebCore::RenderElement::shouldRespectImageOrientation const): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::adjustTiledBackingCoverage): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::nativeImage): Source/WebCore/PAL: * pal/PlatformFTW.cmake: Canonical link: https://commits.webkit.org/213964@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247841 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-07-25 22:02:00 +00:00
platform/graphics/win/SharedGDIObject.h
platform/win/BString.h
platform/win/BitmapInfo.h
platform/win/COMPtr.h
platform/win/DefWndProcWindowClass.h
platform/win/GDIObjectCounter.h
platform/win/GDIUtilities.h
platform/win/HWndDC.h
platform/win/PopupMenuWin.h
platform/win/ScrollbarThemeWin.h
platform/win/SearchPopupMenuDB.h
platform/win/SearchPopupMenuWin.h
platform/win/SystemInfo.h
platform/win/WCDataObject.h
platform/win/WebCoreBundleWin.h
platform/win/WebCoreInstanceHandle.h
platform/win/WebCoreTextRenderer.h
platform/win/WindowMessageBroadcaster.h
platform/win/WindowMessageListener.h
platform/win/WindowsTouch.h
)
list(APPEND WebCore_USER_AGENT_STYLE_SHEETS
${WEBCORE_DIR}/css/themeWin.css
${WEBCORE_DIR}/css/themeWinQuirks.css
)
list(APPEND WebCore_LIBRARIES
${DirectX_LIBRARIES}
comctl32
crypt32
iphlpapi
rpcrt4
shlwapi
usp10
version
winmm
ws2_32
)
list(APPEND WebCoreTestSupport_LIBRARIES
shlwapi
)
[FTW] Support web fonts https://bugs.webkit.org/show_bug.cgi?id=200771 <rdar://problem/54350291> Reviewed by Dean Jackson. The current code path for handling web fonts uses 'AddFontMemResourceEx'. Unfortunately, this only updates the font caches used by GDI, and is not exposed to DirectWrite. This patch does the following: 1. Moves some code into a new DirectWriteUtilities file, similar to how Direct2D is handled, so we can share code in more places. 2. After adding the font to GDI, it adds the font information to the DirectWrite font cache. 3. Add logic to check the overall system DirectWrite fonts, as well as the custom font cache used for downloaded fonts. * PlatformFTW.cmake: Add DirectWriteUtilities.cpp * css/CSSFontFaceSource.cpp: * loader/cache/CachedFont.cpp: * loader/cache/CachedSVGFont.cpp: * platform/graphics/Font.cpp: * platform/graphics/Font.h: * platform/graphics/FontCache.cpp: * platform/graphics/FontPlatformData.cpp: * platform/graphics/FontPlatformData.h: * platform/graphics/opentype/OpenTypeUtilities.cpp: (WebCore::renameAndActivateFont): * platform/graphics/win/DirectWriteUtilities.cpp: Added. * platform/graphics/win/DirectWriteUtilities.h: Added. * platform/graphics/win/FontCacheWin.cpp: (WebCore::createGDIFont): * platform/graphics/win/FontCascadeDirect2D.cpp: * platform/graphics/win/FontCustomPlatformData.cpp: (WebCore::FontCustomPlatformData::fontPlatformData): * platform/graphics/win/FontPlatformDataDirect2D.cpp: (WebCore::FontPlatformData::platformDataInit): (WebCore::FontPlatformData::FontPlatformData): (WebCore::FontPlatformData::createFallbackFont): * platform/graphics/win/FontPlatformDataWin.cpp: * platform/graphics/win/GlyphPageTreeNodeDirect2D.cpp: (WebCore::GlyphPage::fill): * platform/graphics/win/GraphicsContextDirect2D.cpp: * platform/graphics/win/SimpleFontDataDirect2D.cpp: (WebCore::Font::systemDWriteFactory): Deleted. (WebCore::Font::systemDWriteGdiInterop): Deleted. * platform/graphics/win/SimpleFontDataWin.cpp: Canonical link: https://commits.webkit.org/214523@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248748 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-08-15 21:49:01 +00:00
make_directory(${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/en.lproj)
file(COPY
"${WEBCORE_DIR}/en.lproj/Localizable.strings"
"${WEBCORE_DIR}/en.lproj/mediaControlsLocalizedStrings.js"
DESTINATION
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/en.lproj
)
Use IWICBitmap (rather than ID2D1Bitmap) for NativeImagePtr on FTW https://bugs.webkit.org/show_bug.cgi?id=200093 Reviewed by Dean Jackson. Source/WebCore: When I wrote the original Direct2D code, I did not realize that the backing memory for the ID2D1Bitmap was inaccessible since it is effectively a representation of GPU memory. There is no API to access or modify the pixels. Instead, MSDN documentation indicates that we should be using IWICBitmap objects, which are converted to ID2D1Bitmap objects when things are ready to be rendered. This makes it possible to use the TextureMapper backend to do efficient compositing and tile drawing, since the data backing the bitmap can now be accessed and manipulated, allowing us to support filters and other effects. * PlatformFTW.cmake: * platform/MIMETypeRegistry.cpp: (WebCore::supportedImageMIMETypesForEncoding): * platform/graphics/ANGLEWebKitBridge.h: * platform/graphics/GraphicsContext.h: * platform/graphics/ImageBuffer.h: * platform/graphics/NativeImage.h: * platform/graphics/OpenGLShims.h: * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas): * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp: (WebCore::GraphicsContext3D::GraphicsContext3D): (WebCore::GraphicsContext3D::platformLayer const): * platform/graphics/texmap/BitmapTexture.cpp: (WebCore::BitmapTexture::updateContents): * platform/graphics/texmap/BitmapTextureGL.cpp: (WebCore::BitmapTextureGL::updateContents): * platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp: (WebCore::GraphicsContext3D::~GraphicsContext3D): * platform/graphics/win/GraphicsContextDirect2D.cpp: (WebCore::GraphicsContext::GraphicsContext): (WebCore::GraphicsContext::platformInit): (WebCore::GraphicsContextPlatformPrivate::setAlpha): (WebCore::GraphicsContext::drawNativeImage): (WebCore::GraphicsContext::drawDeviceBitmap): (WebCore::GraphicsContext::releaseWindowsContext): (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate): (WebCore::GraphicsContextPlatformPrivate::beginDraw): (WebCore::GraphicsContextPlatformPrivate::endDraw): (WebCore::GraphicsContext::drawPattern): (WebCore::GraphicsContext::clipPath): * platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h: * platform/graphics/win/ImageBufferDataDirect2D.cpp: (WebCore::ImageBufferData::getData const): (WebCore::ImageBufferData::putData): * platform/graphics/win/ImageBufferDataDirect2D.h: (): Deleted. * platform/graphics/win/ImageBufferDirect2D.cpp: (WebCore::ImageBuffer::createCompatibleBuffer): (WebCore::ImageBuffer::ImageBuffer): (WebCore::createCroppedImageIfNecessary): (WebCore::createBitmapImageAfterScalingIfNeeded): (WebCore::ImageBuffer::copyImage const): (WebCore::ImageBuffer::sinkIntoNativeImage): (WebCore::ImageBuffer::copyNativeImage const): (WebCore::ImageBuffer::draw): * platform/graphics/win/ImageDecoderDirect2D.cpp: (WebCore::ImageDecoderDirect2D::createFrameImageAtIndex): * platform/graphics/win/ImageDirect2D.cpp: (WebCore::BitmapImage::drawFrameMatchingSourceSize): * platform/graphics/win/NativeImageDirect2D.cpp: (WebCore::imagingFactory): (WebCore::nativeImageSize): (WebCore::nativeImageHasAlpha): (WebCore::nativeImageSinglePixelSolidColor): (WebCore::drawNativeImage): (WebCore::clearNativeImageSubimages): * platform/graphics/win/PathDirect2D.cpp: (WebCore::Path::strokeContains const): * platform/graphics/win/PatternDirect2D.cpp: (WebCore::Pattern::createPlatformPattern const): * platform/win/PasteboardWin.cpp: (WebCore::Pasteboard::read): * rendering/RenderElement.cpp: (WebCore::RenderElement::shouldRespectImageOrientation const): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::adjustTiledBackingCoverage): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::nativeImage): Source/WebCore/PAL: * pal/PlatformFTW.cmake: Canonical link: https://commits.webkit.org/213964@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247841 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-07-25 22:02:00 +00:00
file(COPY
"${WEBCORE_DIR}/Modules/mediacontrols/mediaControlsApple.css"
"${WEBCORE_DIR}/Modules/mediacontrols/mediaControlsApple.js"
DESTINATION
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources
)
set(WebCore_OUTPUT_NAME WebCore${DEBUG_SUFFIX})