WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
For EWS
bug-231484-20211010163454.patch (text/plain), 96.77 KB, created by
Wenson Hsieh
on 2021-10-10 16:34:55 PDT
(
hide
)
Description:
For EWS
Filename:
MIME Type:
Creator:
Wenson Hsieh
Created:
2021-10-10 16:34:55 PDT
Size:
96.77 KB
patch
obsolete
>Subversion Revision: 283867 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index e795a415369fb324a08b8ecf1d4b00fd0e72c986..6925e15567c2d47e9a4f5eaf06f7fdd8454cbb1e 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,19 @@ >+2021-10-10 Wenson Hsieh <wenson_hsieh@apple.com> >+ >+ Introduce RemoteDisplayListRecorderProxy and RemoteDisplayListRecorder >+ https://bugs.webkit.org/show_bug.cgi?id=231484 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ See WebKit ChangeLog for more details. >+ >+ * platform/graphics/GraphicsContext.h: >+ * platform/graphics/ImageBuffer.h: >+ * platform/graphics/displaylists/DisplayListItems.h: >+ >+ Add default constructors for a couple of display list items so that they can be encoded as IPC arguments using >+ SimpleArgumentCoder. >+ > 2021-10-08 Devin Rousso <drousso@apple.com> > > [GPU Process] support rendering Apple Pay logos >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index c199ff96ebe70a5c4219a6f7ad84961d75c093cf..5bb8de6d46b1ba0d4d642e04a6fa6b46b2d1ce2f 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,215 @@ >+2021-10-10 Wenson Hsieh <wenson_hsieh@apple.com> >+ >+ Introduce RemoteDisplayListRecorderProxy and RemoteDisplayListRecorder >+ https://bugs.webkit.org/show_bug.cgi?id=231484 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Introduce two new classes that house most of the logic for propagating display list items from the web content >+ process to the GPU process. RemoteDisplayListRecorderProxy is a subclass of DisplayList::Recorder that records >+ each item by sending it to the GPU process through a stream connection, which will be added to >+ RemoteRenderingBackendProxy in a subsequent patch. The RemoteDisplayListRecorderProxy will be managed by >+ RemoteImageBufferProxy in the web process. RemoteDisplayListRecorder acts as the streaming IPC destination in >+ the GPU process, and handles the incoming display list items by applying them to the platform graphics context. >+ >+ For most of these display list items, we can propagate them to the GPU process by sending each display list >+ item's constructor arguments as separate IPC arguments. In a future patch, we should add support for encoding >+ the following display list items in the same way: >+ >+ - SetInlineFillColor >+ - SetInlineStrokeColor >+ - SetState >+ - SetLineDash >+ - DrawGlyphs >+ - DrawLinesForText >+ - FillRectWithGradient >+ >+ For now, the above display list items are encoded and decoded as whole items. While there's no practical >+ disadvantage to implementing it this way, it would be nice to make it consistent. >+ >+ * CMakeLists.txt: >+ * DerivedSources-input.xcfilelist: >+ * DerivedSources-output.xcfilelist: >+ * DerivedSources.make: >+ * GPUProcess/graphics/RemoteDisplayListRecorder.cpp: Added. >+ (WebKit::RemoteDisplayListRecorder::RemoteDisplayListRecorder): >+ (WebKit::RemoteDisplayListRecorder::resourceCache): >+ (WebKit::RemoteDisplayListRecorder::drawingContext): >+ (WebKit::RemoteDisplayListRecorder::startListeningForIPC): >+ (WebKit::RemoteDisplayListRecorder::stopListeningForIPC): >+ (WebKit::RemoteDisplayListRecorder::save): >+ (WebKit::RemoteDisplayListRecorder::restore): >+ (WebKit::RemoteDisplayListRecorder::translate): >+ (WebKit::RemoteDisplayListRecorder::rotate): >+ (WebKit::RemoteDisplayListRecorder::scale): >+ (WebKit::RemoteDisplayListRecorder::setCTM): >+ (WebKit::RemoteDisplayListRecorder::concatenateCTM): >+ (WebKit::RemoteDisplayListRecorder::setInlineFillColor): >+ (WebKit::RemoteDisplayListRecorder::setInlineStrokeColor): >+ (WebKit::RemoteDisplayListRecorder::setStrokeThickness): >+ (WebKit::RemoteDisplayListRecorder::setState): >+ (WebKit::RemoteDisplayListRecorder::setLineCap): >+ (WebKit::RemoteDisplayListRecorder::setLineDash): >+ (WebKit::RemoteDisplayListRecorder::setLineJoin): >+ (WebKit::RemoteDisplayListRecorder::setMiterLimit): >+ (WebKit::RemoteDisplayListRecorder::clearShadow): >+ (WebKit::RemoteDisplayListRecorder::clip): >+ (WebKit::RemoteDisplayListRecorder::clipOut): >+ (WebKit::RemoteDisplayListRecorder::clipToImageBuffer): >+ (WebKit::RemoteDisplayListRecorder::clipOutToPath): >+ (WebKit::RemoteDisplayListRecorder::clipPath): >+ (WebKit::RemoteDisplayListRecorder::beginClipToDrawingCommands): >+ (WebKit::RemoteDisplayListRecorder::endClipToDrawingCommands): >+ (WebKit::RemoteDisplayListRecorder::drawGlyphs): >+ (WebKit::RemoteDisplayListRecorder::drawImageBuffer): >+ (WebKit::RemoteDisplayListRecorder::drawNativeImage): >+ (WebKit::RemoteDisplayListRecorder::drawPattern): >+ (WebKit::RemoteDisplayListRecorder::beginTransparencyLayer): >+ (WebKit::RemoteDisplayListRecorder::endTransparencyLayer): >+ (WebKit::RemoteDisplayListRecorder::drawRect): >+ (WebKit::RemoteDisplayListRecorder::drawLine): >+ (WebKit::RemoteDisplayListRecorder::drawLinesForText): >+ (WebKit::RemoteDisplayListRecorder::drawDotsForDocumentMarker): >+ (WebKit::RemoteDisplayListRecorder::drawEllipse): >+ (WebKit::RemoteDisplayListRecorder::drawPath): >+ (WebKit::RemoteDisplayListRecorder::drawFocusRingPath): >+ (WebKit::RemoteDisplayListRecorder::drawFocusRingRects): >+ (WebKit::RemoteDisplayListRecorder::fillRect): >+ (WebKit::RemoteDisplayListRecorder::fillRectWithColor): >+ (WebKit::RemoteDisplayListRecorder::fillRectWithGradient): >+ (WebKit::RemoteDisplayListRecorder::fillCompositedRect): >+ (WebKit::RemoteDisplayListRecorder::fillRoundedRect): >+ (WebKit::RemoteDisplayListRecorder::fillRectWithRoundedHole): >+ (WebKit::RemoteDisplayListRecorder::fillLine): >+ (WebKit::RemoteDisplayListRecorder::fillArc): >+ (WebKit::RemoteDisplayListRecorder::fillQuadCurve): >+ (WebKit::RemoteDisplayListRecorder::fillBezierCurve): >+ (WebKit::RemoteDisplayListRecorder::fillPath): >+ (WebKit::RemoteDisplayListRecorder::fillEllipse): >+ (WebKit::RemoteDisplayListRecorder::getPixelBuffer): >+ (WebKit::RemoteDisplayListRecorder::putPixelBuffer): >+ (WebKit::RemoteDisplayListRecorder::paintFrameForMedia): >+ (WebKit::RemoteDisplayListRecorder::strokeRect): >+ (WebKit::RemoteDisplayListRecorder::strokeLine): >+ (WebKit::RemoteDisplayListRecorder::strokeArc): >+ (WebKit::RemoteDisplayListRecorder::strokeQuadCurve): >+ (WebKit::RemoteDisplayListRecorder::strokeBezierCurve): >+ (WebKit::RemoteDisplayListRecorder::strokePath): >+ (WebKit::RemoteDisplayListRecorder::strokeEllipse): >+ (WebKit::RemoteDisplayListRecorder::clearRect): >+ (WebKit::RemoteDisplayListRecorder::applyStrokePattern): >+ (WebKit::RemoteDisplayListRecorder::applyFillPattern): >+ (WebKit::RemoteDisplayListRecorder::applyDeviceScaleFactor): >+ (WebKit::RemoteDisplayListRecorder::flushContext): >+ * GPUProcess/graphics/RemoteDisplayListRecorder.h: Added. >+ (WebKit::RemoteDisplayListRecorder::create): >+ (WebKit::RemoteDisplayListRecorder::handleItem): >+ * GPUProcess/graphics/RemoteDisplayListRecorder.messages.in: Added. >+ * GPUProcess/graphics/RemoteRenderingBackend.cpp: >+ (WebKit::RemoteRenderingBackend::performWithMediaPlayerOnMainThread): >+ * GPUProcess/graphics/RemoteRenderingBackend.h: >+ >+ Add helper methods to RemoteRenderingBackend that are called from RemoteDisplayListRecorder. >+ >+ * Scripts/webkit/messages.py: >+ (headers_for_type): >+ * Shared/WebCoreArgumentCoders.cpp: >+ * Shared/WebCoreArgumentCoders.h: >+ >+ Make it possible to encode and decode SetInlineFillColor and SetInlineStrokeColor using simple argument coder. >+ >+ * Sources.txt: >+ * WebKit.xcodeproj/project.pbxproj: >+ * WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp: Added. >+ (WebKit::RemoteDisplayListRecorderProxy::RemoteDisplayListRecorderProxy): >+ (WebKit::m_renderingBackend): >+ (WebKit::RemoteDisplayListRecorderProxy::getPixelBuffer): >+ (WebKit::RemoteDisplayListRecorderProxy::putPixelBuffer): >+ (WebKit::RemoteDisplayListRecorderProxy::canDrawImageBuffer const): >+ (WebKit::RemoteDisplayListRecorderProxy::renderingMode const): >+ (WebKit::RemoteDisplayListRecorderProxy::recordSave): >+ (WebKit::RemoteDisplayListRecorderProxy::recordRestore): >+ (WebKit::RemoteDisplayListRecorderProxy::recordTranslate): >+ (WebKit::RemoteDisplayListRecorderProxy::recordRotate): >+ (WebKit::RemoteDisplayListRecorderProxy::recordScale): >+ (WebKit::RemoteDisplayListRecorderProxy::recordSetCTM): >+ (WebKit::RemoteDisplayListRecorderProxy::recordConcatenateCTM): >+ (WebKit::RemoteDisplayListRecorderProxy::recordSetInlineFillColor): >+ (WebKit::RemoteDisplayListRecorderProxy::recordSetInlineStrokeColor): >+ (WebKit::RemoteDisplayListRecorderProxy::recordSetStrokeThickness): >+ (WebKit::RemoteDisplayListRecorderProxy::recordSetState): >+ (WebKit::RemoteDisplayListRecorderProxy::recordSetLineCap): >+ (WebKit::RemoteDisplayListRecorderProxy::recordSetLineDash): >+ (WebKit::RemoteDisplayListRecorderProxy::recordSetLineJoin): >+ (WebKit::RemoteDisplayListRecorderProxy::recordSetMiterLimit): >+ (WebKit::RemoteDisplayListRecorderProxy::recordClearShadow): >+ (WebKit::RemoteDisplayListRecorderProxy::recordClip): >+ (WebKit::RemoteDisplayListRecorderProxy::recordClipOut): >+ (WebKit::RemoteDisplayListRecorderProxy::recordClipToImageBuffer): >+ (WebKit::RemoteDisplayListRecorderProxy::recordClipOutToPath): >+ (WebKit::RemoteDisplayListRecorderProxy::recordClipPath): >+ (WebKit::RemoteDisplayListRecorderProxy::recordBeginClipToDrawingCommands): >+ (WebKit::RemoteDisplayListRecorderProxy::recordEndClipToDrawingCommands): >+ (WebKit::RemoteDisplayListRecorderProxy::recordDrawGlyphs): >+ (WebKit::RemoteDisplayListRecorderProxy::recordDrawImageBuffer): >+ (WebKit::RemoteDisplayListRecorderProxy::recordDrawNativeImage): >+ (WebKit::RemoteDisplayListRecorderProxy::recordDrawPattern): >+ (WebKit::RemoteDisplayListRecorderProxy::recordBeginTransparencyLayer): >+ (WebKit::RemoteDisplayListRecorderProxy::recordEndTransparencyLayer): >+ (WebKit::RemoteDisplayListRecorderProxy::recordDrawRect): >+ (WebKit::RemoteDisplayListRecorderProxy::recordDrawLine): >+ (WebKit::RemoteDisplayListRecorderProxy::recordDrawLinesForText): >+ (WebKit::RemoteDisplayListRecorderProxy::recordDrawDotsForDocumentMarker): >+ (WebKit::RemoteDisplayListRecorderProxy::recordDrawEllipse): >+ (WebKit::RemoteDisplayListRecorderProxy::recordDrawPath): >+ (WebKit::RemoteDisplayListRecorderProxy::recordDrawFocusRingPath): >+ (WebKit::RemoteDisplayListRecorderProxy::recordDrawFocusRingRects): >+ (WebKit::RemoteDisplayListRecorderProxy::recordFillRect): >+ (WebKit::RemoteDisplayListRecorderProxy::recordFillRectWithColor): >+ (WebKit::RemoteDisplayListRecorderProxy::recordFillRectWithGradient): >+ (WebKit::RemoteDisplayListRecorderProxy::recordFillCompositedRect): >+ (WebKit::RemoteDisplayListRecorderProxy::recordFillRoundedRect): >+ (WebKit::RemoteDisplayListRecorderProxy::recordFillRectWithRoundedHole): >+ (WebKit::RemoteDisplayListRecorderProxy::recordFillLine): >+ (WebKit::RemoteDisplayListRecorderProxy::recordFillArc): >+ (WebKit::RemoteDisplayListRecorderProxy::recordFillQuadCurve): >+ (WebKit::RemoteDisplayListRecorderProxy::recordFillBezierCurve): >+ (WebKit::RemoteDisplayListRecorderProxy::recordFillPath): >+ (WebKit::RemoteDisplayListRecorderProxy::recordFillEllipse): >+ (WebKit::RemoteDisplayListRecorderProxy::recordGetPixelBuffer): >+ (WebKit::RemoteDisplayListRecorderProxy::recordPutPixelBuffer): >+ (WebKit::RemoteDisplayListRecorderProxy::recordPaintFrameForMedia): >+ (WebKit::RemoteDisplayListRecorderProxy::recordStrokeRect): >+ (WebKit::RemoteDisplayListRecorderProxy::recordStrokeLine): >+ (WebKit::RemoteDisplayListRecorderProxy::recordStrokeArc): >+ (WebKit::RemoteDisplayListRecorderProxy::recordStrokeQuadCurve): >+ (WebKit::RemoteDisplayListRecorderProxy::recordStrokeBezierCurve): >+ (WebKit::RemoteDisplayListRecorderProxy::recordStrokePath): >+ (WebKit::RemoteDisplayListRecorderProxy::recordStrokeEllipse): >+ (WebKit::RemoteDisplayListRecorderProxy::recordClearRect): >+ (WebKit::RemoteDisplayListRecorderProxy::recordApplyStrokePattern): >+ (WebKit::RemoteDisplayListRecorderProxy::recordApplyFillPattern): >+ (WebKit::RemoteDisplayListRecorderProxy::recordApplyDeviceScaleFactor): >+ (WebKit::RemoteDisplayListRecorderProxy::recordResourceUse): >+ (WebKit::RemoteDisplayListRecorderProxy::flushContext): >+ (WebKit::RemoteDisplayListRecorderProxy::createNestedContext): >+ * WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h: Added. >+ (WebKit::RemoteDisplayListRecorderProxy::~RemoteDisplayListRecorderProxy): >+ (WebKit::RemoteDisplayListRecorderProxy::resetNeedsFlush): >+ (WebKit::RemoteDisplayListRecorderProxy::needsFlush const): >+ (WebKit::RemoteDisplayListRecorderProxy::send): >+ (WebKit::RemoteDisplayListRecorderProxy::recordDrawPattern): >+ * WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp: >+ (WebKit::RemoteRenderingBackendProxy::recordNativeImageUse): >+ (WebKit::RemoteRenderingBackendProxy::recordFontUse): >+ (WebKit::RemoteRenderingBackendProxy::recordImageBufferUse): >+ (WebKit::RemoteRenderingBackendProxy::isCached const): >+ >+ Add helper methods to RemoteRenderingBackendProxy that are called from RemoteDisplayListRecorderProxy. >+ >+ * WebProcess/GPU/graphics/RemoteRenderingBackendProxy.h: >+ (WebKit::RemoteRenderingBackendProxy::sendToStream): >+ > 2021-10-08 BJ Burg <bburg@apple.com> > > [Cocoa] Web Inspector: provide a way for _WKInspectorExtension clients to be notified when the inspected page navigates >diff --git a/Source/WebCore/platform/graphics/GraphicsContext.h b/Source/WebCore/platform/graphics/GraphicsContext.h >index d6e25677bef715ba49cf041e14c9ec801c5c97c3..83087ce6904c5bd12197a49a68d115ea8a5ffcd7 100644 >--- a/Source/WebCore/platform/graphics/GraphicsContext.h >+++ b/Source/WebCore/platform/graphics/GraphicsContext.h >@@ -430,7 +430,7 @@ public: > WEBCORE_EXPORT ImageDrawResult drawImage(Image&, const FloatRect& destination, const ImagePaintingOptions& = { ImageOrientation::FromImage }); > WEBCORE_EXPORT virtual ImageDrawResult drawImage(Image&, const FloatRect& destination, const FloatRect& source, const ImagePaintingOptions& = { ImageOrientation::FromImage }); > >- virtual ImageDrawResult drawImageForCanvas(Image&, const FloatRect& destination, const FloatRect& source, const ImagePaintingOptions&, DestinationColorSpace canvasColorSpace); >+ WEBCORE_EXPORT virtual ImageDrawResult drawImageForCanvas(Image&, const FloatRect& destination, const FloatRect& source, const ImagePaintingOptions&, DestinationColorSpace canvasColorSpace); > > WEBCORE_EXPORT virtual ImageDrawResult drawTiledImage(Image&, const FloatRect& destination, const FloatPoint& source, const FloatSize& tileSize, const FloatSize& spacing, const ImagePaintingOptions& = { }); > WEBCORE_EXPORT virtual ImageDrawResult drawTiledImage(Image&, const FloatRect& destination, const FloatRect& source, const FloatSize& tileScaleFactor, Image::TileRule, Image::TileRule, const ImagePaintingOptions& = { }); >diff --git a/Source/WebCore/platform/graphics/ImageBuffer.h b/Source/WebCore/platform/graphics/ImageBuffer.h >index 1397801b4d8e0ffcd69467ca14220d0053cf15ee..8160ddf0a19c330dce5d32163ada8236e5a41449 100644 >--- a/Source/WebCore/platform/graphics/ImageBuffer.h >+++ b/Source/WebCore/platform/graphics/ImageBuffer.h >@@ -50,7 +50,7 @@ public: > > // Create an image buffer compatible with the context, with suitable resolution for drawing into the buffer and then into this context. > static RefPtr<ImageBuffer> createCompatibleBuffer(const FloatSize&, const GraphicsContext&); >- static RefPtr<ImageBuffer> createCompatibleBuffer(const FloatSize&, const DestinationColorSpace&, const GraphicsContext&); >+ WEBCORE_EXPORT static RefPtr<ImageBuffer> createCompatibleBuffer(const FloatSize&, const DestinationColorSpace&, const GraphicsContext&); > static RefPtr<ImageBuffer> createCompatibleBuffer(const FloatSize&, float resolutionScale, const DestinationColorSpace&, const GraphicsContext&); > > // These functions are used when clamping the ImageBuffer which is created for filter, masker or clipper. >diff --git a/Source/WebCore/platform/graphics/displaylists/DisplayListItems.h b/Source/WebCore/platform/graphics/displaylists/DisplayListItems.h >index 011b41d9b1b5397033fc90f6dd2bbe0b5f0fbd2e..11feccc00c130f3a14f33d95846c1822592d156f 100644 >--- a/Source/WebCore/platform/graphics/displaylists/DisplayListItems.h >+++ b/Source/WebCore/platform/graphics/displaylists/DisplayListItems.h >@@ -188,6 +188,7 @@ public: > static constexpr bool isInlineItem = true; > static constexpr bool isDrawingItem = false; > >+ SetInlineFillColor() = default; > SetInlineFillColor(SRGBA<uint8_t> colorData) > : m_colorData(colorData) > { >@@ -206,6 +207,7 @@ public: > static constexpr bool isInlineItem = true; > static constexpr bool isDrawingItem = false; > >+ SetInlineStrokeColor() = default; > SetInlineStrokeColor(SRGBA<uint8_t> colorData) > : m_colorData(colorData) > { >diff --git a/Source/WebKit/CMakeLists.txt b/Source/WebKit/CMakeLists.txt >index 31521830f3aa7728827108ddefe1bdde7f91d314..813cb95e9258e9553b9adf903272255d68b3efcd 100644 >--- a/Source/WebKit/CMakeLists.txt >+++ b/Source/WebKit/CMakeLists.txt >@@ -127,6 +127,7 @@ set(WebKit_MESSAGES_IN_FILES > GPUProcess/GPUConnectionToWebProcess > GPUProcess/GPUProcess > >+ GPUProcess/graphics/RemoteDisplayListRecorder > GPUProcess/graphics/RemoteGraphicsContextGL > GPUProcess/graphics/RemoteRenderingBackend > >diff --git a/Source/WebKit/DerivedSources-input.xcfilelist b/Source/WebKit/DerivedSources-input.xcfilelist >index 74ffa352e9de00cb866f902c6eabdeaada69cf86..edffa6618cb44fd413d786a6093030d382858078 100644 >--- a/Source/WebKit/DerivedSources-input.xcfilelist >+++ b/Source/WebKit/DerivedSources-input.xcfilelist >@@ -20,6 +20,8 @@ $(JAVASCRIPTCORE_PRIVATE_HEADERS_DIR)/models.py > $(JAVASCRIPTCORE_PRIVATE_HEADERS_DIR)/xxd.pl > $(PROJECT_DIR)/GPUProcess/GPUConnectionToWebProcess.messages.in > $(PROJECT_DIR)/GPUProcess/GPUProcess.messages.in >+$(PROJECT_DIR)/GPUProcess/graphics/RemoteDisplayListRecorder.messages.in >+$(PROJECT_DIR)/GPUProcess/graphics/RemoteGraphicsContext.messages.in > $(PROJECT_DIR)/GPUProcess/graphics/RemoteGraphicsContextGL.messages.in > $(PROJECT_DIR)/GPUProcess/graphics/RemoteRenderingBackend.messages.in > $(PROJECT_DIR)/GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in >diff --git a/Source/WebKit/DerivedSources-output.xcfilelist b/Source/WebKit/DerivedSources-output.xcfilelist >index f4f8ac257d155e1fe6f6167ae43c9ce575a1ebe9..a169b8845364912af727c5aad801fcc534b9e71e 100644 >--- a/Source/WebKit/DerivedSources-output.xcfilelist >+++ b/Source/WebKit/DerivedSources-output.xcfilelist >@@ -203,12 +203,18 @@ $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/RemoteCDMProxyMessagesReplies.h > $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/RemoteCaptureSampleManagerMessageReceiver.cpp > $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/RemoteCaptureSampleManagerMessages.h > $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/RemoteCaptureSampleManagerMessagesReplies.h >+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/RemoteDisplayListRecorderMessageReceiver.cpp >+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/RemoteDisplayListRecorderMessages.h >+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/RemoteDisplayListRecorderMessagesReplies.h > $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/RemoteGraphicsContextGLMessageReceiver.cpp > $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/RemoteGraphicsContextGLMessages.h > $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/RemoteGraphicsContextGLMessagesReplies.h > $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/RemoteGraphicsContextGLProxyMessageReceiver.cpp > $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/RemoteGraphicsContextGLProxyMessages.h > $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/RemoteGraphicsContextGLProxyMessagesReplies.h >+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/RemoteGraphicsContextMessageReceiver.cpp >+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/RemoteGraphicsContextMessages.h >+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/RemoteGraphicsContextMessagesReplies.h > $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/RemoteImageDecoderAVFManagerMessageReceiver.cpp > $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/RemoteImageDecoderAVFManagerMessages.h > $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/RemoteImageDecoderAVFManagerMessagesReplies.h >diff --git a/Source/WebKit/DerivedSources.make b/Source/WebKit/DerivedSources.make >index c314746c2ce805ffdb990291db867b29fd2bea12..d9f4679824a672bc83b43e3600bea942f0e016ed 100644 >--- a/Source/WebKit/DerivedSources.make >+++ b/Source/WebKit/DerivedSources.make >@@ -247,6 +247,7 @@ MESSAGE_RECEIVERS = \ > PluginProcess/PluginControllerProxy \ > PluginProcess/PluginProcess \ > GPUProcess/GPUConnectionToWebProcess \ >+ GPUProcess/graphics/RemoteDisplayListRecorder \ > GPUProcess/graphics/RemoteRenderingBackend \ > GPUProcess/graphics/RemoteGraphicsContextGL \ > GPUProcess/webrtc/LibWebRTCCodecsProxy \ >diff --git a/Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.cpp b/Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..9b3ede0b7537f63474592efd122a7f4b31f769bd >--- /dev/null >+++ b/Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.cpp >@@ -0,0 +1,461 @@ >+/* >+ * Copyright (C) 2021 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+#include "RemoteDisplayListRecorder.h" >+ >+#include "RemoteDisplayListRecorderMessages.h" >+ >+namespace WebKit { >+using namespace WebCore; >+ >+RemoteDisplayListRecorder::RemoteDisplayListRecorder(ImageBuffer& imageBuffer, QualifiedRenderingResourceIdentifier imageBufferIdentifier, RemoteRenderingBackend& renderingBackend) >+ : m_imageBuffer(imageBuffer) >+ , m_imageBufferIdentifier(imageBufferIdentifier) >+ , m_renderingBackend(renderingBackend) >+{ >+} >+ >+RemoteResourceCache& RemoteDisplayListRecorder::resourceCache() >+{ >+ return m_renderingBackend->remoteResourceCache(); >+} >+ >+GraphicsContext& RemoteDisplayListRecorder::drawingContext() >+{ >+ return m_maskImageBuffer ? m_maskImageBuffer->context() : m_imageBuffer->context(); >+} >+ >+void RemoteDisplayListRecorder::startListeningForIPC() >+{ >+ ASSERT(!m_isListeningForIPC); >+ m_isListeningForIPC = true; >+ // FIXME: Not implemented yet. >+} >+ >+void RemoteDisplayListRecorder::stopListeningForIPC() >+{ >+ if (!m_isListeningForIPC) >+ return; >+ >+ // FIXME: Not implemented yet. >+ m_isListeningForIPC = false; >+} >+ >+void RemoteDisplayListRecorder::save() >+{ >+ handleItem(DisplayList::Save()); >+} >+ >+void RemoteDisplayListRecorder::restore() >+{ >+ handleItem(DisplayList::Restore()); >+} >+ >+void RemoteDisplayListRecorder::translate(float x, float y) >+{ >+ handleItem(DisplayList::Translate(x, y)); >+} >+ >+void RemoteDisplayListRecorder::rotate(float angle) >+{ >+ handleItem(DisplayList::Rotate(angle)); >+} >+ >+void RemoteDisplayListRecorder::scale(const FloatSize& scale) >+{ >+ handleItem(DisplayList::Scale(scale)); >+} >+ >+void RemoteDisplayListRecorder::setCTM(const AffineTransform& ctm) >+{ >+ handleItem(DisplayList::SetCTM(ctm)); >+} >+ >+void RemoteDisplayListRecorder::concatenateCTM(const AffineTransform& ctm) >+{ >+ handleItem(DisplayList::ConcatenateCTM(ctm)); >+} >+ >+void RemoteDisplayListRecorder::setInlineFillColor(DisplayList::SetInlineFillColor&& item) >+{ >+ handleItem(WTFMove(item)); >+} >+ >+void RemoteDisplayListRecorder::setInlineStrokeColor(DisplayList::SetInlineStrokeColor&& item) >+{ >+ handleItem(WTFMove(item)); >+} >+ >+void RemoteDisplayListRecorder::setStrokeThickness(float thickness) >+{ >+ handleItem(DisplayList::SetStrokeThickness(thickness)); >+} >+ >+void RemoteDisplayListRecorder::setState(DisplayList::SetState&& item) >+{ >+ auto strokePatternImageIdentifier = item.strokePatternImageIdentifier(); >+ RefPtr<NativeImage> strokePatternImage; >+ if (strokePatternImageIdentifier) >+ strokePatternImage = resourceCache().cachedNativeImage(strokePatternImageIdentifier); >+ >+ auto fillPatternImageIdentifier = item.fillPatternImageIdentifier(); >+ RefPtr<NativeImage> fillPatternImage; >+ if (fillPatternImageIdentifier) >+ fillPatternImage = resourceCache().cachedNativeImage(fillPatternImageIdentifier); >+ >+ handleItem(WTFMove(item), strokePatternImage.get(), fillPatternImage.get()); >+ >+ if (strokePatternImage) >+ resourceCache().recordResourceUse(strokePatternImageIdentifier); >+ >+ if (fillPatternImage) >+ resourceCache().recordResourceUse(fillPatternImageIdentifier); >+} >+ >+void RemoteDisplayListRecorder::setLineCap(LineCap lineCap) >+{ >+ handleItem(DisplayList::SetLineCap(lineCap)); >+} >+ >+void RemoteDisplayListRecorder::setLineDash(DisplayList::SetLineDash&& item) >+{ >+ handleItem(WTFMove(item)); >+} >+ >+void RemoteDisplayListRecorder::setLineJoin(LineJoin lineJoin) >+{ >+ handleItem(DisplayList::SetLineJoin(lineJoin)); >+} >+ >+void RemoteDisplayListRecorder::setMiterLimit(float limit) >+{ >+ handleItem(DisplayList::SetMiterLimit(limit)); >+} >+ >+void RemoteDisplayListRecorder::clearShadow() >+{ >+ handleItem(DisplayList::ClearShadow()); >+} >+ >+void RemoteDisplayListRecorder::clip(const FloatRect& rect) >+{ >+ handleItem(DisplayList::Clip(rect)); >+} >+ >+void RemoteDisplayListRecorder::clipOut(const FloatRect& rect) >+{ >+ handleItem(DisplayList::ClipOut(rect)); >+} >+ >+void RemoteDisplayListRecorder::clipToImageBuffer(WebCore::RenderingResourceIdentifier imageBufferIdentifier, const WebCore::FloatRect& destinationRect) >+{ >+ RefPtr imageBuffer = resourceCache().cachedImageBuffer(imageBufferIdentifier); >+ if (!imageBuffer) { >+ ASSERT_NOT_REACHED(); >+ return; >+ } >+ >+ handleItem(DisplayList::ClipToImageBuffer(imageBufferIdentifier, destinationRect), *imageBuffer); >+ resourceCache().recordResourceUse(imageBufferIdentifier); >+} >+ >+void RemoteDisplayListRecorder::clipOutToPath(const Path& path) >+{ >+ handleItem(DisplayList::ClipOutToPath(path)); >+} >+ >+void RemoteDisplayListRecorder::clipPath(const Path& path, WindRule rule) >+{ >+ handleItem(DisplayList::ClipPath(path, rule)); >+} >+ >+void RemoteDisplayListRecorder::beginClipToDrawingCommands(const FloatRect& destination, const DestinationColorSpace& colorSpace) >+{ >+ m_maskImageBuffer = ImageBuffer::createCompatibleBuffer(destination.size(), colorSpace, drawingContext()); >+} >+ >+void RemoteDisplayListRecorder::endClipToDrawingCommands(const FloatRect& destination) >+{ >+ auto maskImageBuffer = std::exchange(m_maskImageBuffer, { }); >+ if (!maskImageBuffer) { >+ ASSERT_NOT_REACHED(); >+ return; >+ } >+ >+ drawingContext().clipToImageBuffer(*maskImageBuffer, destination); >+} >+ >+void RemoteDisplayListRecorder::drawGlyphs(DisplayList::DrawGlyphs&& item) >+{ >+ auto fontIdentifier = item.fontIdentifier(); >+ RefPtr font = resourceCache().cachedFont(fontIdentifier); >+ if (!font) { >+ ASSERT_NOT_REACHED(); >+ return; >+ } >+ >+ handleItem(WTFMove(item), *font); >+ resourceCache().recordResourceUse(fontIdentifier); >+} >+ >+void RemoteDisplayListRecorder::drawImageBuffer(RenderingResourceIdentifier imageBufferIdentifier, const FloatRect& destinationRect, const FloatRect& srcRect, const ImagePaintingOptions& options) >+{ >+ RefPtr imageBuffer = resourceCache().cachedImageBuffer(imageBufferIdentifier); >+ if (!imageBuffer) { >+ ASSERT_NOT_REACHED(); >+ return; >+ } >+ >+ handleItem(DisplayList::DrawImageBuffer(imageBufferIdentifier, destinationRect, srcRect, options), *imageBuffer); >+ resourceCache().recordResourceUse(imageBufferIdentifier); >+} >+ >+void RemoteDisplayListRecorder::drawNativeImage(RenderingResourceIdentifier imageIdentifier, const FloatSize& imageSize, const FloatRect& destRect, const FloatRect& srcRect, const ImagePaintingOptions& options) >+{ >+ RefPtr image = resourceCache().cachedNativeImage(imageIdentifier); >+ if (!image) { >+ ASSERT_NOT_REACHED(); >+ return; >+ } >+ >+ handleItem(DisplayList::DrawNativeImage(imageIdentifier, imageSize, destRect, srcRect, options), *image); >+ resourceCache().recordResourceUse(imageIdentifier); >+} >+ >+void RemoteDisplayListRecorder::drawPattern(RenderingResourceIdentifier imageIdentifier, const FloatSize& imageSize, const FloatRect& destRect, const FloatRect& tileRect, const AffineTransform& transform, const FloatPoint& phase, const FloatSize& spacing, const ImagePaintingOptions& options) >+{ >+ RefPtr image = resourceCache().cachedNativeImage(imageIdentifier); >+ if (!image) { >+ ASSERT_NOT_REACHED(); >+ return; >+ } >+ >+ handleItem(DisplayList::DrawPattern(imageIdentifier, imageSize, destRect, tileRect, transform, phase, spacing, options), *image); >+ resourceCache().recordResourceUse(imageIdentifier); >+} >+ >+void RemoteDisplayListRecorder::beginTransparencyLayer(float opacity) >+{ >+ handleItem(DisplayList::BeginTransparencyLayer(opacity)); >+} >+ >+void RemoteDisplayListRecorder::endTransparencyLayer() >+{ >+ handleItem(DisplayList::EndTransparencyLayer()); >+} >+ >+void RemoteDisplayListRecorder::drawRect(const FloatRect& rect, float borderThickness) >+{ >+ handleItem(DisplayList::DrawRect(rect, borderThickness)); >+} >+ >+void RemoteDisplayListRecorder::drawLine(const FloatPoint& point1, const FloatPoint& point2) >+{ >+ handleItem(DisplayList::DrawLine(point1, point2)); >+} >+ >+void RemoteDisplayListRecorder::drawLinesForText(DisplayList::DrawLinesForText&& item) >+{ >+ handleItem(WTFMove(item)); >+} >+ >+void RemoteDisplayListRecorder::drawDotsForDocumentMarker(const FloatRect& rect, const DocumentMarkerLineStyle& style) >+{ >+ handleItem(DisplayList::DrawDotsForDocumentMarker(rect, style)); >+} >+ >+void RemoteDisplayListRecorder::drawEllipse(const FloatRect& rect) >+{ >+ handleItem(DisplayList::DrawEllipse(rect)); >+} >+ >+void RemoteDisplayListRecorder::drawPath(const Path& path) >+{ >+ handleItem(DisplayList::DrawPath(path)); >+} >+ >+void RemoteDisplayListRecorder::drawFocusRingPath(const Path& path, float width, float offset, const Color& color) >+{ >+ handleItem(DisplayList::DrawFocusRingPath(path, width, offset, color)); >+} >+ >+void RemoteDisplayListRecorder::drawFocusRingRects(const Vector<FloatRect>& rects, float width, float offset, const Color& color) >+{ >+ handleItem(DisplayList::DrawFocusRingRects(rects, width, offset, color)); >+} >+ >+void RemoteDisplayListRecorder::fillRect(const FloatRect& rect) >+{ >+ handleItem(DisplayList::FillRect(rect)); >+} >+ >+void RemoteDisplayListRecorder::fillRectWithColor(const FloatRect& rect, const Color& color) >+{ >+ handleItem(DisplayList::FillRectWithColor(rect, color)); >+} >+ >+void RemoteDisplayListRecorder::fillRectWithGradient(DisplayList::FillRectWithGradient&& item) >+{ >+ handleItem(WTFMove(item)); >+} >+ >+void RemoteDisplayListRecorder::fillCompositedRect(const FloatRect& rect, const Color& color, CompositeOperator op, BlendMode blendMode) >+{ >+ handleItem(DisplayList::FillCompositedRect(rect, color, op, blendMode)); >+} >+ >+void RemoteDisplayListRecorder::fillRoundedRect(const FloatRoundedRect& rect, const Color& color, BlendMode blendMode) >+{ >+ handleItem(DisplayList::FillRoundedRect(rect, color, blendMode)); >+} >+ >+void RemoteDisplayListRecorder::fillRectWithRoundedHole(const FloatRect& rect, const FloatRoundedRect& roundedHoleRect, const Color& color) >+{ >+ handleItem(DisplayList::FillRectWithRoundedHole(rect, roundedHoleRect, color)); >+} >+ >+#if ENABLE(INLINE_PATH_DATA) >+ >+void RemoteDisplayListRecorder::fillLine(const LineData& data) >+{ >+ handleItem(DisplayList::FillLine(data)); >+} >+ >+void RemoteDisplayListRecorder::fillArc(const ArcData& data) >+{ >+ handleItem(DisplayList::FillArc(data)); >+} >+ >+void RemoteDisplayListRecorder::fillQuadCurve(const QuadCurveData& data) >+{ >+ handleItem(DisplayList::FillQuadCurve(data)); >+} >+ >+void RemoteDisplayListRecorder::fillBezierCurve(const BezierCurveData& data) >+{ >+ handleItem(DisplayList::FillBezierCurve(data)); >+} >+ >+#endif // ENABLE(INLINE_PATH_DATA) >+ >+void RemoteDisplayListRecorder::fillPath(const Path& path) >+{ >+ handleItem(DisplayList::FillPath(path)); >+} >+ >+void RemoteDisplayListRecorder::fillEllipse(const FloatRect& rect) >+{ >+ handleItem(DisplayList::FillEllipse(rect)); >+} >+ >+void RemoteDisplayListRecorder::getPixelBuffer(const IntRect& srcRect, const PixelBufferFormat& outputFormat) >+{ >+ m_renderingBackend->populateGetPixelBufferSharedMemory(m_imageBuffer->getPixelBuffer(outputFormat, srcRect)); >+} >+ >+void RemoteDisplayListRecorder::putPixelBuffer(const IntRect& srcRect, const IntPoint& destPoint, const PixelBuffer& pixelBuffer, AlphaPremultiplication destFormat) >+{ >+ m_imageBuffer->putPixelBuffer(pixelBuffer, srcRect, destPoint, destFormat); >+} >+ >+void RemoteDisplayListRecorder::paintFrameForMedia(MediaPlayerIdentifier identifier, const FloatRect& destination) >+{ >+ m_renderingBackend->performWithMediaPlayerOnMainThread(identifier, [imageBuffer = m_imageBuffer.copyRef(), destination](MediaPlayer& player) { >+ // It is currently not safe to call paintFrameForMedia() off the main thread. >+ imageBuffer->context().paintFrameForMedia(player, destination); >+ }); >+} >+ >+void RemoteDisplayListRecorder::strokeRect(const FloatRect& rect, float lineWidth) >+{ >+ handleItem(DisplayList::StrokeRect(rect, lineWidth)); >+} >+ >+#if ENABLE(INLINE_PATH_DATA) >+ >+void RemoteDisplayListRecorder::strokeLine(const LineData& data) >+{ >+ handleItem(DisplayList::StrokeLine(data)); >+} >+ >+void RemoteDisplayListRecorder::strokeArc(const ArcData& data) >+{ >+ handleItem(DisplayList::StrokeArc(data)); >+} >+ >+void RemoteDisplayListRecorder::strokeQuadCurve(const QuadCurveData& data) >+{ >+ handleItem(DisplayList::StrokeQuadCurve(data)); >+} >+ >+void RemoteDisplayListRecorder::strokeBezierCurve(const BezierCurveData& data) >+{ >+ handleItem(DisplayList::StrokeBezierCurve(data)); >+} >+ >+#endif // ENABLE(INLINE_PATH_DATA) >+ >+void RemoteDisplayListRecorder::strokePath(const Path& path) >+{ >+ handleItem(DisplayList::StrokePath(path)); >+} >+ >+void RemoteDisplayListRecorder::strokeEllipse(const FloatRect& rect) >+{ >+ handleItem(DisplayList::StrokeEllipse(rect)); >+} >+ >+void RemoteDisplayListRecorder::clearRect(const FloatRect& rect) >+{ >+ handleItem(DisplayList::ClearRect(rect)); >+} >+ >+#if USE(CG) >+ >+void RemoteDisplayListRecorder::applyStrokePattern() >+{ >+ handleItem(DisplayList::ApplyStrokePattern()); >+} >+ >+void RemoteDisplayListRecorder::applyFillPattern() >+{ >+ handleItem(DisplayList::ApplyFillPattern()); >+} >+ >+#endif // USE(CG) >+ >+void RemoteDisplayListRecorder::applyDeviceScaleFactor(float scaleFactor) >+{ >+ handleItem(DisplayList::ApplyDeviceScaleFactor(scaleFactor)); >+} >+ >+void RemoteDisplayListRecorder::flushContext(GraphicsContextFlushIdentifier identifier) >+{ >+ m_imageBuffer->flushContext(); >+ m_renderingBackend->didFlush(identifier, m_imageBufferIdentifier); >+} >+ >+} // namespace WebKit >diff --git a/Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.h b/Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.h >new file mode 100644 >index 0000000000000000000000000000000000000000..00f7851dfab91f18d4141e91705448ccad966a84 >--- /dev/null >+++ b/Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.h >@@ -0,0 +1,147 @@ >+/* >+ * Copyright (C) 2021 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#include "Decoder.h" >+#include "QualifiedRenderingResourceIdentifier.h" >+#include "RemoteRenderingBackend.h" >+#include "StreamMessageReceiver.h" >+#include "StreamServerConnection.h" >+#include <WebCore/DisplayListItems.h> >+#include <wtf/RefCounted.h> >+#include <wtf/WeakPtr.h> >+ >+namespace WebKit { >+ >+class RemoteRenderingBackend; >+class RemoteResourceCache; >+ >+class RemoteDisplayListRecorder : public IPC::StreamMessageReceiver, public CanMakeWeakPtr<RemoteDisplayListRecorder> { >+public: >+ static Ref<RemoteDisplayListRecorder> create(WebCore::ImageBuffer& imageBuffer, QualifiedRenderingResourceIdentifier imageBufferIdentifier, RemoteRenderingBackend& renderingBackend) >+ { >+ return adoptRef(*new RemoteDisplayListRecorder(imageBuffer, imageBufferIdentifier, renderingBackend)); >+ } >+ >+ void startListeningForIPC(); >+ void stopListeningForIPC(); >+ >+ void save(); >+ void restore(); >+ void translate(float x, float y); >+ void rotate(float angle); >+ void scale(const WebCore::FloatSize& scale); >+ void setCTM(const WebCore::AffineTransform&); >+ void concatenateCTM(const WebCore::AffineTransform&); >+ void setInlineFillColor(WebCore::DisplayList::SetInlineFillColor&&); >+ void setInlineStrokeColor(WebCore::DisplayList::SetInlineStrokeColor&&); >+ void setStrokeThickness(float); >+ void setState(WebCore::DisplayList::SetState&&); >+ void setLineCap(WebCore::LineCap); >+ void setLineDash(WebCore::DisplayList::SetLineDash&&); >+ void setLineJoin(WebCore::LineJoin); >+ void setMiterLimit(float); >+ void clearShadow(); >+ void clip(const WebCore::FloatRect&); >+ void clipOut(const WebCore::FloatRect&); >+ void clipToImageBuffer(WebCore::RenderingResourceIdentifier, const WebCore::FloatRect& destinationRect); >+ void clipOutToPath(const WebCore::Path&); >+ void clipPath(const WebCore::Path&, WebCore::WindRule); >+ void beginClipToDrawingCommands(const WebCore::FloatRect& destination, const WebCore::DestinationColorSpace&); >+ void endClipToDrawingCommands(const WebCore::FloatRect& destination); >+ void drawGlyphs(WebCore::DisplayList::DrawGlyphs&&); >+ void drawImageBuffer(WebCore::RenderingResourceIdentifier imageBufferIdentifier, const WebCore::FloatRect& destinationRect, const WebCore::FloatRect& srcRect, const WebCore::ImagePaintingOptions&); >+ void drawNativeImage(WebCore::RenderingResourceIdentifier imageIdentifier, const WebCore::FloatSize& imageSize, const WebCore::FloatRect& destRect, const WebCore::FloatRect& srcRect, const WebCore::ImagePaintingOptions&); >+ void drawPattern(WebCore::RenderingResourceIdentifier imageIdentifier, const WebCore::FloatSize& imageSize, const WebCore::FloatRect& destRect, const WebCore::FloatRect& tileRect, const WebCore::AffineTransform&, const WebCore::FloatPoint&, const WebCore::FloatSize& spacing, const WebCore::ImagePaintingOptions&); >+ void beginTransparencyLayer(float opacity); >+ void endTransparencyLayer(); >+ void drawRect(const WebCore::FloatRect&, float borderThickness); >+ void drawLine(const WebCore::FloatPoint& point1, const WebCore::FloatPoint& point2); >+ void drawLinesForText(WebCore::DisplayList::DrawLinesForText&&); >+ void drawDotsForDocumentMarker(const WebCore::FloatRect&, const WebCore::DocumentMarkerLineStyle&); >+ void drawEllipse(const WebCore::FloatRect&); >+ void drawPath(const WebCore::Path&); >+ void drawFocusRingPath(const WebCore::Path&, float width, float offset, const WebCore::Color&); >+ void drawFocusRingRects(const Vector<WebCore::FloatRect>& rects, float width, float offset, const WebCore::Color&); >+ void fillRect(const WebCore::FloatRect&); >+ void fillRectWithColor(const WebCore::FloatRect&, const WebCore::Color&); >+ void fillRectWithGradient(WebCore::DisplayList::FillRectWithGradient&&); >+ void fillCompositedRect(const WebCore::FloatRect&, const WebCore::Color&, WebCore::CompositeOperator, WebCore::BlendMode); >+ void fillRoundedRect(const WebCore::FloatRoundedRect&, const WebCore::Color&, WebCore::BlendMode); >+ void fillRectWithRoundedHole(const WebCore::FloatRect&, const WebCore::FloatRoundedRect&, const WebCore::Color&); >+#if ENABLE(INLINE_PATH_DATA) >+ void fillLine(const WebCore::LineData&); >+ void fillArc(const WebCore::ArcData&); >+ void fillQuadCurve(const WebCore::QuadCurveData&); >+ void fillBezierCurve(const WebCore::BezierCurveData&); >+#endif >+ void fillPath(const WebCore::Path&); >+ void fillEllipse(const WebCore::FloatRect&); >+ void getPixelBuffer(const WebCore::IntRect& srcRect, const WebCore::PixelBufferFormat& outputFormat); >+ void putPixelBuffer(const WebCore::IntRect& srcRect, const WebCore::IntPoint& destPoint, const WebCore::PixelBuffer&, WebCore::AlphaPremultiplication destFormat); >+ void paintFrameForMedia(WebCore::MediaPlayerIdentifier, const WebCore::FloatRect& destination); >+ void strokeRect(const WebCore::FloatRect&, float lineWidth); >+#if ENABLE(INLINE_PATH_DATA) >+ void strokeLine(const WebCore::LineData&); >+ void strokeArc(const WebCore::ArcData&); >+ void strokeQuadCurve(const WebCore::QuadCurveData&); >+ void strokeBezierCurve(const WebCore::BezierCurveData&); >+#endif >+ void strokePath(const WebCore::Path&); >+ void strokeEllipse(const WebCore::FloatRect&); >+ void clearRect(const WebCore::FloatRect&); >+#if USE(CG) >+ void applyStrokePattern(); >+ void applyFillPattern(); >+#endif >+ void applyDeviceScaleFactor(float); >+ void flushContext(WebCore::GraphicsContextFlushIdentifier); >+ >+private: >+ RemoteDisplayListRecorder(WebCore::ImageBuffer&, QualifiedRenderingResourceIdentifier, RemoteRenderingBackend&); >+ >+ RemoteResourceCache& resourceCache(); >+ WebCore::GraphicsContext& drawingContext(); >+ >+ template<typename T, typename ... AdditionalArgs> >+ void handleItem(T&& item, AdditionalArgs&& ... args) >+ { >+ // FIXME: In the future, we should consider buffering up batches of display list items before >+ // applying them instead of applying them immediately, so that we can apply clipping and occlusion >+ // optimizations to skip over parts of a display list, if possible. >+ item.apply(drawingContext(), args...); >+ } >+ >+ void didReceiveStreamMessage(IPC::StreamServerConnectionBase&, IPC::Decoder&) final; >+ >+ Ref<WebCore::ImageBuffer> m_imageBuffer; >+ QualifiedRenderingResourceIdentifier m_imageBufferIdentifier; >+ Ref<RemoteRenderingBackend> m_renderingBackend; >+ RefPtr<WebCore::ImageBuffer> m_maskImageBuffer; >+ bool m_isListeningForIPC { false }; >+}; >+ >+} // namespace WebKit >diff --git a/Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.messages.in b/Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.messages.in >new file mode 100644 >index 0000000000000000000000000000000000000000..5c14093a3b9aba0a1be720687efb4668b595a361 >--- /dev/null >+++ b/Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.messages.in >@@ -0,0 +1,98 @@ >+# Copyright (C) 2021 Apple Inc. All rights reserved. >+# >+# Redistribution and use in source and binary forms, with or without >+# modification, are permitted provided that the following conditions >+# are met: >+# 1. Redistributions of source code must retain the above copyright >+# notice, this list of conditions and the following disclaimer. >+# 2. Redistributions in binary form must reproduce the above copyright >+# notice, this list of conditions and the following disclaimer in the >+# documentation and/or other materials provided with the distribution. >+# >+# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND >+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED >+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE >+# DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR >+# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL >+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR >+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER >+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, >+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ >+#if ENABLE(GPU_PROCESS) >+ >+messages -> RemoteDisplayListRecorder NotRefCounted Stream { >+ Save() >+ Restore() >+ Translate(float x, float y) >+ Rotate(float angle) >+ Scale(WebCore::FloatSize scale) >+ SetCTM(WebCore::AffineTransform ctm) >+ ConcatenateCTM(WebCore::AffineTransform ctm) >+ SetInlineFillColor(WebCore::DisplayList::SetInlineFillColor item) >+ SetInlineStrokeColor(WebCore::DisplayList::SetInlineStrokeColor item) >+ SetStrokeThickness(float thickness) >+ SetState(WebCore::DisplayList::SetState item) >+ SetLineCap(enum:uint8_t WebCore::LineCap lineCap) >+ SetLineDash(WebCore::DisplayList::SetLineDash item) >+ SetLineJoin(enum:uint8_t WebCore::LineJoin lineJoin) >+ SetMiterLimit(float limit) >+ ClearShadow() >+ Clip(WebCore::FloatRect rect) >+ ClipOut(WebCore::FloatRect rect) >+ ClipToImageBuffer(WebCore::RenderingResourceIdentifier renderingResourceIdentifier, WebCore::FloatRect destinationRect) >+ ClipOutToPath(WebCore::Path path) >+ ClipPath(WebCore::Path path, enum:uint8_t WebCore::WindRule windRule) >+ BeginClipToDrawingCommands(WebCore::FloatRect destination, WebCore::DestinationColorSpace colorSpace) >+ EndClipToDrawingCommands(WebCore::FloatRect destination) >+ DrawGlyphs(WebCore::DisplayList::DrawGlyphs item) >+ DrawImageBuffer(WebCore::RenderingResourceIdentifier imageBufferIdentifier, WebCore::FloatRect destinationRect, WebCore::FloatRect srcRect, struct WebCore::ImagePaintingOptions options) >+ DrawNativeImage(WebCore::RenderingResourceIdentifier imageIdentifier, WebCore::FloatSize imageSize, WebCore::FloatRect destRect, WebCore::FloatRect srcRect, struct WebCore::ImagePaintingOptions options) >+ DrawPattern(WebCore::RenderingResourceIdentifier imageIdentifier, WebCore::FloatSize imageSize, WebCore::FloatRect destRect, WebCore::FloatRect tileRect, WebCore::AffineTransform transform, WebCore::FloatPoint phase, WebCore::FloatSize spacing, struct WebCore::ImagePaintingOptions options) >+ BeginTransparencyLayer(float opacity) >+ EndTransparencyLayer() >+ DrawRect(WebCore::FloatRect rect, float borderThickness) >+ DrawLine(WebCore::FloatPoint point1, WebCore::FloatPoint point2) >+ DrawLinesForText(WebCore::DisplayList::DrawLinesForText item) >+ DrawDotsForDocumentMarker(WebCore::FloatRect rect, struct WebCore::DocumentMarkerLineStyle style) >+ DrawEllipse(WebCore::FloatRect rect) >+ DrawPath(WebCore::Path path) >+ DrawFocusRingPath(WebCore::Path path, float width, float offset, WebCore::Color color) >+ DrawFocusRingRects(Vector<WebCore::FloatRect> rects, float width, float offset, WebCore::Color color) >+ FillRect(WebCore::FloatRect rect) >+ FillRectWithColor(WebCore::FloatRect rect, WebCore::Color color) >+ FillRectWithGradient(WebCore::DisplayList::FillRectWithGradient item) >+ FillCompositedRect(WebCore::FloatRect rect, WebCore::Color color, enum:uint8_t WebCore::CompositeOperator op, enum:uint8_t WebCore::BlendMode blendMode) >+ FillRoundedRect(WebCore::FloatRoundedRect rect, WebCore::Color color, enum:uint8_t WebCore::BlendMode blendMode) >+ FillRectWithRoundedHole(WebCore::FloatRect rect, WebCore::FloatRoundedRect roundedHoleRect, WebCore::Color color) >+#if ENABLE(INLINE_PATH_DATA) >+ FillLine(struct WebCore::LineData data) >+ FillArc(struct WebCore::ArcData data) >+ FillQuadCurve(struct WebCore::QuadCurveData data) >+ FillBezierCurve(struct WebCore::BezierCurveData data) >+#endif >+ FillPath(WebCore::Path path) >+ FillEllipse(WebCore::FloatRect rect) >+ GetPixelBuffer(WebCore::IntRect srcRect, struct WebCore::PixelBufferFormat outputFormat) >+ PutPixelBuffer(WebCore::IntRect srcRect, WebCore::IntPoint destPoint, WebCore::PixelBuffer pixelBuffer, enum:uint8_t WebCore::AlphaPremultiplication destFormat) >+ PaintFrameForMedia(WebCore::MediaPlayerIdentifier identifier, WebCore::FloatRect destination) >+ StrokeRect(WebCore::FloatRect rect, float lineWidth) >+#if ENABLE(INLINE_PATH_DATA) >+ StrokeLine(struct WebCore::LineData data) >+ StrokeArc(struct WebCore::ArcData data) >+ StrokeQuadCurve(struct WebCore::QuadCurveData data) >+ StrokeBezierCurve(struct WebCore::BezierCurveData data) >+#endif >+ StrokePath(WebCore::Path path) >+ StrokeEllipse(WebCore::FloatRect rect) >+ ClearRect(WebCore::FloatRect rect) >+#if USE(CG) >+ ApplyStrokePattern() >+ ApplyFillPattern() >+#endif >+ ApplyDeviceScaleFactor(float scaleFactor) >+ FlushContext(WebCore::GraphicsContextFlushIdentifier identifier) >+} >+ >+#endif // ENABLE(GPU_PROCESS) >diff --git a/Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.cpp b/Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.cpp >index fcced7d51a2122a6004899e19e380cbd585721f1..c7d1a83eefe31e7c29d723dcc5af75786922f243 100644 >--- a/Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.cpp >+++ b/Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.cpp >@@ -783,6 +783,14 @@ void RemoteRenderingBackend::updateLastKnownState(RemoteRenderingBackendState st > m_lastKnownState.storeRelaxed(state); > } > >+void RemoteRenderingBackend::performWithMediaPlayerOnMainThread(MediaPlayerIdentifier identifier, Function<void(MediaPlayer&)>&& callback) >+{ >+ callOnMainRunLoopAndWait([&, gpuConnectionToWebProcess = m_gpuConnectionToWebProcess, identifier] { >+ if (auto player = gpuConnectionToWebProcess->remoteMediaPlayerManagerProxy().mediaPlayer(identifier)) >+ callback(*player); >+ }); >+} >+ > } // namespace WebKit > > #endif // ENABLE(GPU_PROCESS) >diff --git a/Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.h b/Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.h >index 419ae6d16f72d7d593141fe2296acfe69a1c590c..628ec39b6a189b82eba4fff258f66ad9680d72d5 100644 >--- a/Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.h >+++ b/Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.h >@@ -99,6 +99,8 @@ public: > > RemoteRenderingBackendState lastKnownState() const; > >+ void performWithMediaPlayerOnMainThread(WebCore::MediaPlayerIdentifier, Function<void(WebCore::MediaPlayer&)>&&); >+ > private: > RemoteRenderingBackend(GPUConnectionToWebProcess&, RemoteRenderingBackendCreationParameters&&); > void startListeningForIPC(); >diff --git a/Source/WebKit/Scripts/webkit/messages.py b/Source/WebKit/Scripts/webkit/messages.py >index 41c76bdb8da71645f3853a33fad5dd25ed78441c..7839f698dd81a8242d1ac3f325465bf15015552f 100644 >--- a/Source/WebKit/Scripts/webkit/messages.py >+++ b/Source/WebKit/Scripts/webkit/messages.py >@@ -691,13 +691,18 @@ def headers_for_type(type): > 'WallTime': ['<wtf/WallTime.h>'], > 'String': ['<wtf/text/WTFString.h>'], > 'PAL::SessionID': ['<pal/SessionID.h>'], >+ 'WebCore::ArcData': ['<WebCore/InlinePathData.h>'], > 'WebCore::AutoplayEventFlags': ['<WebCore/AutoplayEvent.h>'], >+ 'WebCore::BezierCurveData': ['<WebCore/InlinePathData.h>'], >+ 'WebCore::BlendMode': ['<WebCore/GraphicsTypes.h>'], > 'WebCore::BrowsingContextGroupSwitchDecision': ['<WebCore/FrameLoaderTypes.h>'], > 'WebCore::COEPDisposition': ['<WebCore/CrossOriginEmbedderPolicy.h>'], > 'WebCore::COOPDisposition': ['<WebCore/CrossOriginOpenerPolicy.h>'], >+ 'WebCore::CompositeOperator': ['<WebCore/GraphicsTypes.h>'], > 'WebCore::CreateNewGroupForHighlight': ['<WebCore/AppHighlight.h>'], > 'WebCore::DOMPasteAccessResponse': ['<WebCore/DOMPasteAccess.h>'], > 'WebCore::DestinationColorSpace': ['<WebCore/ColorSpace.h>'], >+ 'WebCore::DocumentMarkerLineStyle': ['<WebCore/GraphicsTypes.h>'], > 'WebCore::DocumentOrWorkerIdentifier': ['<WebCore/ServiceWorkerTypes.h>'], > 'WebCore::DragApplicationFlags': ['<WebCore/DragData.h>'], > 'WebCore::DragHandlingMethod': ['<WebCore/DragActions.h>'], >@@ -708,6 +713,7 @@ def headers_for_type(type): > 'WebCore::FileChooserSettings': ['<WebCore/FileChooser.h>'], > 'WebCore::FirstPartyWebsiteDataRemovalMode': ['<WebCore/NetworkStorageSession.h>'], > 'WebCore::FontChanges': ['<WebCore/FontAttributeChanges.h>'], >+ 'WebCore::FontSmoothingMode': ['<WebCore/GraphicsTypes.h>'], > 'WebCore::FrameLoadType': ['<WebCore/FrameLoaderTypes.h>'], > 'WebCore::GenericCueData': ['<WebCore/InbandGenericCue.h>'], > 'WebCore::GrammarDetail': ['<WebCore/TextCheckerClient.h>'], >@@ -723,10 +729,14 @@ def headers_for_type(type): > 'WebCore::KeypressCommand': ['<WebCore/KeyboardEvent.h>'], > 'WebCore::LastNavigationWasAppInitiated': ['<WebCore/ServiceWorkerClientData.h>'], > 'WebCore::LegacyCDMSessionClient::MediaKeyErrorCode': ['<WebCore/LegacyCDMSession.h>'], >+ 'WebCore::LineCap': ['<WebCore/GraphicsTypes.h>'], >+ 'WebCore::LineData': ['<WebCore/InlinePathData.h>'], >+ 'WebCore::LineJoin': ['<WebCore/GraphicsTypes.h>'], > 'WebCore::LockBackForwardList': ['<WebCore/FrameLoaderTypes.h>'], > 'WebCore::MediaEngineSupportParameters': ['<WebCore/MediaPlayer.h>'], > 'WebCore::MessagePortChannelProvider::HasActivity': ['<WebCore/MessagePortChannelProvider.h>'], > 'WebCore::MouseEventPolicy': ['<WebCore/DocumentLoader.h>'], >+ 'WebCore::MoveData': ['<WebCore/InlinePathData.h>'], > 'WebCore::NetworkTransactionInformation': ['<WebCore/NetworkLoadInformation.h>'], > 'WebCore::PasteboardCustomData': ['<WebCore/Pasteboard.h>'], > 'WebCore::PasteboardImage': ['<WebCore/Pasteboard.h>'], >@@ -742,6 +752,7 @@ def headers_for_type(type): > 'WebCore::PolicyCheckIdentifier': ['<WebCore/FrameLoaderTypes.h>'], > 'WebCore::PreserveResolution': ['<WebCore/ImageBufferBackend.h>'], > 'WebCore::ProcessIdentifier': ['<WebCore/ProcessIdentifier.h>'], >+ 'WebCore::QuadCurveData': ['<WebCore/InlinePathData.h>'], > 'WebCore::RecentSearch': ['<WebCore/SearchPopupMenu.h>'], > 'WebCore::RequestStorageAccessResult': ['<WebCore/DocumentStorageAccess.h>'], > 'WebCore::RouteSharingPolicy': ['<WebCore/AudioSession.h>'], >diff --git a/Source/WebKit/Shared/WebCoreArgumentCoders.cpp b/Source/WebKit/Shared/WebCoreArgumentCoders.cpp >index 867f6d548b9e2984ec71f33da02898723971cd0d..032ef473b5d20635237979950869b811f0bf0da3 100644 >--- a/Source/WebKit/Shared/WebCoreArgumentCoders.cpp >+++ b/Source/WebKit/Shared/WebCoreArgumentCoders.cpp >@@ -159,6 +159,9 @@ DEFINE_SIMPLE_ARGUMENT_CODER_FOR_SOURCE(CGPoint) > DEFINE_SIMPLE_ARGUMENT_CODER_FOR_SOURCE(CGAffineTransform) > #endif > >+DEFINE_SIMPLE_ARGUMENT_CODER_FOR_SOURCE(DisplayList::SetInlineFillColor) >+DEFINE_SIMPLE_ARGUMENT_CODER_FOR_SOURCE(DisplayList::SetInlineStrokeColor) >+ > #undef DEFINE_SIMPLE_ARGUMENT_CODER_FOR_SOURCE > > static void encodeSharedBuffer(Encoder& encoder, const SharedBuffer* buffer) >diff --git a/Source/WebKit/Shared/WebCoreArgumentCoders.h b/Source/WebKit/Shared/WebCoreArgumentCoders.h >index 7e8fec9fb3f6285ae7e60b3f0484a1ef99c76e6a..208f1b6117b8790ca43514baa4145d06c262af0e 100644 >--- a/Source/WebKit/Shared/WebCoreArgumentCoders.h >+++ b/Source/WebKit/Shared/WebCoreArgumentCoders.h >@@ -30,6 +30,7 @@ > #include <WebCore/AutoplayEvent.h> > #include <WebCore/ColorSpace.h> > #include <WebCore/DiagnosticLoggingClient.h> >+#include <WebCore/DisplayListItems.h> > #include <WebCore/FloatPoint.h> > #include <WebCore/FloatPoint3D.h> > #include <WebCore/FloatRect.h> >@@ -253,6 +254,9 @@ DEFINE_SIMPLE_ARGUMENT_CODER_FOR_HEADER(CGPoint) > DEFINE_SIMPLE_ARGUMENT_CODER_FOR_HEADER(CGAffineTransform) > #endif > >+DEFINE_SIMPLE_ARGUMENT_CODER_FOR_HEADER(WebCore::DisplayList::SetInlineFillColor) >+DEFINE_SIMPLE_ARGUMENT_CODER_FOR_HEADER(WebCore::DisplayList::SetInlineStrokeColor) >+ > #undef DEFINE_SIMPLE_ARGUMENT_CODER_FOR_HEADER > > template<> struct ArgumentCoder<WebCore::AttributedString> { >diff --git a/Source/WebKit/Sources.txt b/Source/WebKit/Sources.txt >index c4a84e1fb6f466b8fbd54e6ca46c472422b3b0c8..7e23d6052c4524f27b704202aa0e7c917f1db905 100644 >--- a/Source/WebKit/Sources.txt >+++ b/Source/WebKit/Sources.txt >@@ -25,6 +25,7 @@ GPUProcess/GPUProcess.cpp > GPUProcess/GPUConnectionToWebProcess.cpp > GPUProcess/GPUProcessCreationParameters.cpp > GPUProcess/graphics/DisplayListReaderHandle.cpp >+GPUProcess/graphics/RemoteDisplayListRecorder.cpp > GPUProcess/graphics/RemoteRenderingBackend.cpp > GPUProcess/graphics/RemoteGraphicsContextGL.cpp > GPUProcess/graphics/RemoteResourceCache.cpp >@@ -611,6 +612,7 @@ WebProcess/GPU/graphics/DisplayListWriterHandle.cpp > WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.cpp > WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp > WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp >+WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp > WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp > WebProcess/GPU/graphics/RemoteResourceCacheProxy.cpp > WebProcess/GPU/media/AudioTrackPrivateRemote.cpp >@@ -755,6 +757,7 @@ NetworkBroadcastChannelRegistryMessageReceiver.cpp > RTCDataChannelRemoteManagerMessageReceiver.cpp > RTCDataChannelRemoteManagerProxyMessageReceiver.cpp > RemoteAudioMediaStreamTrackRendererInternalUnitManagerMessageReceiver.cpp >+RemoteDisplayListRecorderMessageReceiver.cpp > RemoteGraphicsContextGLMessageReceiver.cpp > RemoteGraphicsContextGLProxyMessageReceiver.cpp > PlatformXRSystemMessageReceiver.cpp >diff --git a/Source/WebKit/WebKit.xcodeproj/project.pbxproj b/Source/WebKit/WebKit.xcodeproj/project.pbxproj >index ed2041fa52df36a9166fc7282e19b64b91d49b3e..3b07fb3d56520dcc8eef8f951681bb58f56a4704 100644 >--- a/Source/WebKit/WebKit.xcodeproj/project.pbxproj >+++ b/Source/WebKit/WebKit.xcodeproj/project.pbxproj >@@ -2053,6 +2053,9 @@ > F44291961FA5942A002CC93E /* _WKAttachmentInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = F44291951FA5942A002CC93E /* _WKAttachmentInternal.h */; }; > F44815642387820000982657 /* WKDeferringGestureRecognizer.h in Headers */ = {isa = PBXBuildFile; fileRef = F44815622387820000982657 /* WKDeferringGestureRecognizer.h */; }; > F44DFEB21E9E752F0038D196 /* WebIconUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = F44DFEB01E9E752F0038D196 /* WebIconUtilities.h */; }; >+ F4517D7B26FBCD39004C8475 /* RemoteRenderingBackendMessagesReplies.h in Headers */ = {isa = PBXBuildFile; fileRef = F4517D7926FBCD38004C8475 /* RemoteRenderingBackendMessagesReplies.h */; }; >+ F4517D7C26FBCD39004C8475 /* RemoteRenderingBackendMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = F4517D7A26FBCD38004C8475 /* RemoteRenderingBackendMessages.h */; }; >+ F451C0FE2703B263002BA03B /* RemoteDisplayListRecorderProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = F48BB8DD26F9635D001C1C40 /* RemoteDisplayListRecorderProxy.h */; }; > F4660BC225DEF08100E86598 /* PasteboardAccessIntent.h in Headers */ = {isa = PBXBuildFile; fileRef = F4660BC125DEF08100E86598 /* PasteboardAccessIntent.h */; }; > F48570A32644BEC500C05F71 /* Timeout.h in Headers */ = {isa = PBXBuildFile; fileRef = F48570A22644BEC400C05F71 /* Timeout.h */; }; > F48D2A8521583A7E00C6752B /* AppKitSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = F48D2A8421583A0200C6752B /* AppKitSPI.h */; }; >@@ -6129,9 +6132,17 @@ > F44815632387820000982657 /* WKDeferringGestureRecognizer.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = WKDeferringGestureRecognizer.mm; path = ios/WKDeferringGestureRecognizer.mm; sourceTree = "<group>"; }; > F44DFEB01E9E752F0038D196 /* WebIconUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebIconUtilities.h; path = ios/WebIconUtilities.h; sourceTree = "<group>"; }; > F44DFEB11E9E752F0038D196 /* WebIconUtilities.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WebIconUtilities.mm; path = ios/WebIconUtilities.mm; sourceTree = "<group>"; }; >+ F4517D7726FBCCE4004C8475 /* RemoteRenderingBackendMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RemoteRenderingBackendMessageReceiver.cpp; path = DerivedSources/WebKit2/RemoteRenderingBackendMessageReceiver.cpp; sourceTree = BUILT_PRODUCTS_DIR; }; >+ F4517D7926FBCD38004C8475 /* RemoteRenderingBackendMessagesReplies.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RemoteRenderingBackendMessagesReplies.h; path = DerivedSources/WebKit2/RemoteRenderingBackendMessagesReplies.h; sourceTree = BUILT_PRODUCTS_DIR; }; >+ F4517D7A26FBCD38004C8475 /* RemoteRenderingBackendMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RemoteRenderingBackendMessages.h; path = DerivedSources/WebKit2/RemoteRenderingBackendMessages.h; sourceTree = BUILT_PRODUCTS_DIR; }; >+ F451C1002703D853002BA03B /* RemoteDisplayListRecorder.messages.in */ = {isa = PBXFileReference; lastKnownFileType = text; path = RemoteDisplayListRecorder.messages.in; sourceTree = "<group>"; }; > F4660BC125DEF08100E86598 /* PasteboardAccessIntent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PasteboardAccessIntent.h; sourceTree = "<group>"; }; > F47A051626827A09007E5CF2 /* QuickLookPreviewActivity.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = QuickLookPreviewActivity.h; sourceTree = "<group>"; }; > F48570A22644BEC400C05F71 /* Timeout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Timeout.h; sourceTree = "<group>"; }; >+ F48BB8DD26F9635D001C1C40 /* RemoteDisplayListRecorderProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RemoteDisplayListRecorderProxy.h; sourceTree = "<group>"; }; >+ F48BB8DE26F9635D001C1C40 /* RemoteDisplayListRecorderProxy.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RemoteDisplayListRecorderProxy.cpp; sourceTree = "<group>"; }; >+ F48BB8DF26F96392001C1C40 /* RemoteDisplayListRecorder.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RemoteDisplayListRecorder.h; sourceTree = "<group>"; }; >+ F48BB8E026F96392001C1C40 /* RemoteDisplayListRecorder.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RemoteDisplayListRecorder.cpp; sourceTree = "<group>"; }; > F48D2A8421583A0200C6752B /* AppKitSPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppKitSPI.h; sourceTree = "<group>"; }; > F496A42F1F58A272004C1757 /* DragDropInteractionState.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = DragDropInteractionState.h; path = ios/DragDropInteractionState.h; sourceTree = "<group>"; }; > F496A4301F58A272004C1757 /* DragDropInteractionState.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = DragDropInteractionState.mm; path = ios/DragDropInteractionState.mm; sourceTree = "<group>"; }; >@@ -9072,6 +9083,8 @@ > 727A7F36240788F0004D2931 /* ImageBufferShareableBitmapBackend.h */, > 727A7F38240788F0004D2931 /* PlatformImageBufferShareableBackend.h */, > 7227800B2408BD7D007D376B /* PlatformRemoteImageBufferProxy.h */, >+ F48BB8DE26F9635D001C1C40 /* RemoteDisplayListRecorderProxy.cpp */, >+ F48BB8DD26F9635D001C1C40 /* RemoteDisplayListRecorderProxy.h */, > 7B904165254AFDEA006EEB8C /* RemoteGraphicsContextGLProxy.cpp */, > 7B904166254AFDEB006EEB8C /* RemoteGraphicsContextGLProxy.h */, > 7B904167254AFE17006EEB8C /* RemoteGraphicsContextGLProxy.messages.in */, >@@ -9094,6 +9107,9 @@ > F4094CBB255304AF003D73E3 /* DisplayListReaderHandle.h */, > 55AD09432408A0E600DE4D2F /* PlatformRemoteImageBuffer.h */, > 1CC54AFD270F9654005BF8BE /* QualifiedRenderingResourceIdentifier.h */, >+ F48BB8E026F96392001C1C40 /* RemoteDisplayListRecorder.cpp */, >+ F48BB8DF26F96392001C1C40 /* RemoteDisplayListRecorder.h */, >+ F451C1002703D853002BA03B /* RemoteDisplayListRecorder.messages.in */, > 7B904169254AFEA7006EEB8C /* RemoteGraphicsContextGL.cpp */, > 7B90416A254AFEA7006EEB8C /* RemoteGraphicsContextGL.h */, > 7B904168254AFEA7006EEB8C /* RemoteGraphicsContextGL.messages.in */, >@@ -11465,6 +11481,9 @@ > CD8252DA25D4915400862FD8 /* RemoteRemoteCommandListenerProxyMessageReceiver.cpp */, > CD8252D925D4915400862FD8 /* RemoteRemoteCommandListenerProxyMessages.h */, > CD8252D825D4915300862FD8 /* RemoteRemoteCommandListenerProxyMessagesReplies.h */, >+ F4517D7726FBCCE4004C8475 /* RemoteRenderingBackendMessageReceiver.cpp */, >+ F4517D7A26FBCD38004C8475 /* RemoteRenderingBackendMessages.h */, >+ F4517D7926FBCD38004C8475 /* RemoteRenderingBackendMessagesReplies.h */, > 0F5947A5187B517600437857 /* RemoteScrollingCoordinatorMessageReceiver.cpp */, > 0F5947A6187B517600437857 /* RemoteScrollingCoordinatorMessages.h */, > 1DD2A66B2562021E00FF7B6F /* RemoteSourceBufferProxyMessageReceiver.cpp */, >@@ -12560,6 +12579,7 @@ > CDAC20B423FB58F20021DEE3 /* RemoteCDMInstanceProxy.h in Headers */, > CDAC20CA23FC2F750021DEE3 /* RemoteCDMInstanceSession.h in Headers */, > CDAC20C923FC2F750021DEE3 /* RemoteCDMInstanceSessionIdentifier.h in Headers */, >+ F451C0FE2703B263002BA03B /* RemoteDisplayListRecorderProxy.h in Headers */, > 2D47B56D1810714E003A3AEE /* RemoteLayerBackingStore.h in Headers */, > 2DDF731518E95060004F5A66 /* RemoteLayerBackingStoreCollection.h in Headers */, > 1AB16AEA164B3A8800290D62 /* RemoteLayerTreeContext.h in Headers */, >@@ -12588,6 +12608,8 @@ > 1AC1338618590C4600F3EC05 /* RemoteObjectRegistryMessages.h in Headers */, > 46088A00261FA8BC00E2500D /* RemoteRenderingBackend.h in Headers */, > 46088A01261FA8C400E2500D /* RemoteRenderingBackendCreationParameters.h in Headers */, >+ F4517D7C26FBCD39004C8475 /* RemoteRenderingBackendMessages.h in Headers */, >+ F4517D7B26FBCD39004C8475 /* RemoteRenderingBackendMessagesReplies.h in Headers */, > F414CE2D269DE6EA00BD216A /* RemoteRenderingBackendState.h in Headers */, > 0F594790187B3B3A00437857 /* RemoteScrollingCoordinator.h in Headers */, > 0F5947A8187B517600437857 /* RemoteScrollingCoordinatorMessages.h in Headers */, >diff --git a/Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp b/Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..93e02a28ab55c994efa7003c874e5b7794380951 >--- /dev/null >+++ b/Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp >@@ -0,0 +1,446 @@ >+/* >+ * Copyright (C) 2021 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+#include "RemoteDisplayListRecorderProxy.h" >+ >+#include "RemoteDisplayListRecorderMessages.h" >+#include <WebCore/DisplayList.h> >+#include <WebCore/DisplayListDrawingContext.h> >+#include <WebCore/DisplayListItems.h> >+#include <WebCore/GraphicsContext.h> >+#include <WebCore/ImageBuffer.h> >+#include <WebCore/MediaPlayer.h> >+#include <WebCore/NotImplemented.h> >+#include <wtf/MathExtras.h> >+#include <wtf/text/TextStream.h> >+ >+namespace WebKit { >+using namespace WebCore; >+ >+RemoteDisplayListRecorderProxy::RemoteDisplayListRecorderProxy(ImageBuffer& imageBuffer, RemoteRenderingBackendProxy& renderingBackend, const FloatRect& initialClip, const AffineTransform& initialCTM, DrawGlyphsRecorder::DeconstructDrawGlyphs deconstructDrawGlyphs) >+ : DisplayList::Recorder({ }, initialClip, initialCTM, deconstructDrawGlyphs) >+ , m_destinationBufferIdentifier(imageBuffer.renderingResourceIdentifier()) >+ , m_imageBuffer(makeWeakPtr(imageBuffer)) >+ , m_renderingBackend(makeWeakPtr(renderingBackend)) >+{ >+} >+ >+RemoteDisplayListRecorderProxy::RemoteDisplayListRecorderProxy(RemoteDisplayListRecorderProxy& parent, const FloatRect& initialClip, const AffineTransform& initialCTM) >+ : DisplayList::Recorder(parent, { }, initialClip, initialCTM) >+ , m_destinationBufferIdentifier(parent.m_destinationBufferIdentifier) >+ , m_imageBuffer(parent.m_imageBuffer) >+ , m_renderingBackend(parent.m_renderingBackend) >+{ >+} >+ >+void RemoteDisplayListRecorderProxy::getPixelBuffer(const PixelBufferFormat& outputFormat, const IntRect& sourceRect) >+{ >+ send(Messages::RemoteDisplayListRecorder::GetPixelBuffer(sourceRect, outputFormat)); >+} >+ >+void RemoteDisplayListRecorderProxy::putPixelBuffer(const PixelBuffer& pixelBuffer, const IntRect& srcRect, const IntPoint& destPoint, AlphaPremultiplication destFormat) >+{ >+ send(Messages::RemoteDisplayListRecorder::PutPixelBuffer(srcRect, destPoint, pixelBuffer, destFormat)); >+} >+ >+bool RemoteDisplayListRecorderProxy::canDrawImageBuffer(const ImageBuffer& imageBuffer) const >+{ >+ return m_renderingBackend && m_renderingBackend->isCached(imageBuffer); >+} >+ >+RenderingMode RemoteDisplayListRecorderProxy::renderingMode() const >+{ >+ return m_imageBuffer ? m_imageBuffer->renderingMode() : RenderingMode::Unaccelerated; >+} >+ >+void RemoteDisplayListRecorderProxy::recordSave() >+{ >+ send(Messages::RemoteDisplayListRecorder::Save()); >+} >+ >+void RemoteDisplayListRecorderProxy::recordRestore() >+{ >+ send(Messages::RemoteDisplayListRecorder::Restore()); >+} >+ >+void RemoteDisplayListRecorderProxy::recordTranslate(float x, float y) >+{ >+ send(Messages::RemoteDisplayListRecorder::Translate(x, y)); >+} >+ >+void RemoteDisplayListRecorderProxy::recordRotate(float angle) >+{ >+ send(Messages::RemoteDisplayListRecorder::Rotate(angle)); >+} >+ >+void RemoteDisplayListRecorderProxy::recordScale(const FloatSize& scale) >+{ >+ send(Messages::RemoteDisplayListRecorder::Scale(scale)); >+} >+ >+void RemoteDisplayListRecorderProxy::recordSetCTM(const AffineTransform& transform) >+{ >+ send(Messages::RemoteDisplayListRecorder::SetCTM(transform)); >+} >+ >+void RemoteDisplayListRecorderProxy::recordConcatenateCTM(const AffineTransform& transform) >+{ >+ send(Messages::RemoteDisplayListRecorder::ConcatenateCTM(transform)); >+} >+ >+void RemoteDisplayListRecorderProxy::recordSetInlineFillColor(SRGBA<uint8_t> color) >+{ >+ send(Messages::RemoteDisplayListRecorder::SetInlineFillColor({ color })); >+} >+ >+void RemoteDisplayListRecorderProxy::recordSetInlineStrokeColor(SRGBA<uint8_t> color) >+{ >+ send(Messages::RemoteDisplayListRecorder::SetInlineStrokeColor({ color })); >+} >+ >+void RemoteDisplayListRecorderProxy::recordSetStrokeThickness(float thickness) >+{ >+ send(Messages::RemoteDisplayListRecorder::SetStrokeThickness(thickness)); >+} >+ >+void RemoteDisplayListRecorderProxy::recordSetState(const GraphicsContextState& state, GraphicsContextState::StateChangeFlags flags) >+{ >+ send(Messages::RemoteDisplayListRecorder::SetState({ state, flags })); >+} >+ >+void RemoteDisplayListRecorderProxy::recordSetLineCap(LineCap lineCap) >+{ >+ send(Messages::RemoteDisplayListRecorder::SetLineCap(lineCap)); >+} >+ >+void RemoteDisplayListRecorderProxy::recordSetLineDash(const DashArray& array, float dashOffset) >+{ >+ send(Messages::RemoteDisplayListRecorder::SetLineDash({ array, dashOffset })); >+} >+ >+void RemoteDisplayListRecorderProxy::recordSetLineJoin(LineJoin lineJoin) >+{ >+ send(Messages::RemoteDisplayListRecorder::SetLineJoin(lineJoin)); >+} >+ >+void RemoteDisplayListRecorderProxy::recordSetMiterLimit(float limit) >+{ >+ send(Messages::RemoteDisplayListRecorder::SetMiterLimit(limit)); >+} >+ >+void RemoteDisplayListRecorderProxy::recordClearShadow() >+{ >+ send(Messages::RemoteDisplayListRecorder::ClearShadow()); >+} >+ >+void RemoteDisplayListRecorderProxy::recordClip(const FloatRect& rect) >+{ >+ send(Messages::RemoteDisplayListRecorder::Clip(rect)); >+} >+ >+void RemoteDisplayListRecorderProxy::recordClipOut(const FloatRect& rect) >+{ >+ send(Messages::RemoteDisplayListRecorder::ClipOut(rect)); >+} >+ >+void RemoteDisplayListRecorderProxy::recordClipToImageBuffer(RenderingResourceIdentifier imageBufferIdentifier, const FloatRect& destinationRect) >+{ >+ send(Messages::RemoteDisplayListRecorder::ClipToImageBuffer(imageBufferIdentifier, destinationRect)); >+} >+ >+void RemoteDisplayListRecorderProxy::recordClipOutToPath(const Path& path) >+{ >+ send(Messages::RemoteDisplayListRecorder::ClipOutToPath(path)); >+} >+ >+void RemoteDisplayListRecorderProxy::recordClipPath(const Path& path, WindRule rule) >+{ >+ send(Messages::RemoteDisplayListRecorder::ClipPath(path, rule)); >+} >+ >+void RemoteDisplayListRecorderProxy::recordBeginClipToDrawingCommands(const FloatRect& destination, DestinationColorSpace colorSpace) >+{ >+ send(Messages::RemoteDisplayListRecorder::BeginClipToDrawingCommands(destination, colorSpace)); >+} >+ >+void RemoteDisplayListRecorderProxy::recordEndClipToDrawingCommands(const FloatRect& destination) >+{ >+ send(Messages::RemoteDisplayListRecorder::EndClipToDrawingCommands(destination)); >+} >+ >+void RemoteDisplayListRecorderProxy::recordDrawGlyphs(const Font& font, const GlyphBufferGlyph* glyphs, const GlyphBufferAdvance* advances, unsigned count, const FloatPoint& localAnchor, FontSmoothingMode mode) >+{ >+ send(Messages::RemoteDisplayListRecorder::DrawGlyphs({ font, glyphs, advances, count, localAnchor, mode })); >+} >+ >+void RemoteDisplayListRecorderProxy::recordDrawImageBuffer(RenderingResourceIdentifier imageBufferIdentifier, const FloatRect& destRect, const FloatRect& srcRect, const ImagePaintingOptions& options) >+{ >+ send(Messages::RemoteDisplayListRecorder::DrawImageBuffer(imageBufferIdentifier, destRect, srcRect, options)); >+} >+ >+void RemoteDisplayListRecorderProxy::recordDrawNativeImage(RenderingResourceIdentifier imageIdentifier, const FloatSize& imageSize, const FloatRect& destRect, const FloatRect& srcRect, const ImagePaintingOptions& options) >+{ >+ send(Messages::RemoteDisplayListRecorder::DrawNativeImage(imageIdentifier, imageSize, destRect, srcRect, options)); >+} >+ >+void RemoteDisplayListRecorderProxy::recordDrawPattern(RenderingResourceIdentifier imageIdentifier, const FloatSize& imageSize, const FloatRect& destRect, const FloatRect& tileRect, const AffineTransform& transform, const FloatPoint& phase, const FloatSize& spacing, const ImagePaintingOptions& options) >+{ >+ send(Messages::RemoteDisplayListRecorder::DrawPattern(imageIdentifier, imageSize, destRect, tileRect, transform, phase, spacing, options)); >+} >+ >+void RemoteDisplayListRecorderProxy::recordBeginTransparencyLayer(float opacity) >+{ >+ send(Messages::RemoteDisplayListRecorder::BeginTransparencyLayer(opacity)); >+} >+ >+void RemoteDisplayListRecorderProxy::recordEndTransparencyLayer() >+{ >+ send(Messages::RemoteDisplayListRecorder::EndTransparencyLayer()); >+} >+ >+void RemoteDisplayListRecorderProxy::recordDrawRect(const FloatRect& rect, float width) >+{ >+ send(Messages::RemoteDisplayListRecorder::DrawRect(rect, width)); >+} >+ >+void RemoteDisplayListRecorderProxy::recordDrawLine(const FloatPoint& point1, const FloatPoint& point2) >+{ >+ send(Messages::RemoteDisplayListRecorder::DrawLine(point1, point2)); >+} >+ >+void RemoteDisplayListRecorderProxy::recordDrawLinesForText(const FloatPoint& blockLocation, const FloatSize& localAnchor, float thickness, const DashArray& widths, bool printing, bool doubleLines) >+{ >+ send(Messages::RemoteDisplayListRecorder::DrawLinesForText({ blockLocation, localAnchor, thickness, widths, printing, doubleLines })); >+} >+ >+void RemoteDisplayListRecorderProxy::recordDrawDotsForDocumentMarker(const FloatRect& rect, const DocumentMarkerLineStyle& style) >+{ >+ send(Messages::RemoteDisplayListRecorder::DrawDotsForDocumentMarker(rect, style)); >+} >+ >+void RemoteDisplayListRecorderProxy::recordDrawEllipse(const FloatRect& rect) >+{ >+ send(Messages::RemoteDisplayListRecorder::DrawEllipse(rect)); >+} >+ >+void RemoteDisplayListRecorderProxy::recordDrawPath(const Path& path) >+{ >+ send(Messages::RemoteDisplayListRecorder::DrawPath(path)); >+} >+ >+void RemoteDisplayListRecorderProxy::recordDrawFocusRingPath(const Path& path, float width, float offset, const Color& color) >+{ >+ send(Messages::RemoteDisplayListRecorder::DrawFocusRingPath(path, width, offset, color)); >+} >+ >+void RemoteDisplayListRecorderProxy::recordDrawFocusRingRects(const Vector<FloatRect>& rects, float width, float offset, const Color& color) >+{ >+ send(Messages::RemoteDisplayListRecorder::DrawFocusRingRects(rects, width, offset, color)); >+} >+ >+void RemoteDisplayListRecorderProxy::recordFillRect(const FloatRect& rect) >+{ >+ send(Messages::RemoteDisplayListRecorder::FillRect(rect)); >+} >+ >+void RemoteDisplayListRecorderProxy::recordFillRectWithColor(const FloatRect& rect, const Color& color) >+{ >+ send(Messages::RemoteDisplayListRecorder::FillRectWithColor(rect, color)); >+} >+ >+void RemoteDisplayListRecorderProxy::recordFillRectWithGradient(const FloatRect& rect, Gradient& gradient) >+{ >+ send(Messages::RemoteDisplayListRecorder::FillRectWithGradient({ rect, gradient })); >+} >+ >+void RemoteDisplayListRecorderProxy::recordFillCompositedRect(const FloatRect& rect, const Color& color, CompositeOperator op, BlendMode mode) >+{ >+ send(Messages::RemoteDisplayListRecorder::FillCompositedRect(rect, color, op, mode)); >+} >+ >+void RemoteDisplayListRecorderProxy::recordFillRoundedRect(const FloatRoundedRect& roundedRect, const Color& color, BlendMode mode) >+{ >+ send(Messages::RemoteDisplayListRecorder::FillRoundedRect(roundedRect, color, mode)); >+} >+ >+void RemoteDisplayListRecorderProxy::recordFillRectWithRoundedHole(const FloatRect& rect, const FloatRoundedRect& roundedRect, const Color& color) >+{ >+ send(Messages::RemoteDisplayListRecorder::FillRectWithRoundedHole(rect, roundedRect, color)); >+} >+ >+#if ENABLE(INLINE_PATH_DATA) >+ >+void RemoteDisplayListRecorderProxy::recordFillLine(const LineData& data) >+{ >+ send(Messages::RemoteDisplayListRecorder::FillLine(data)); >+} >+ >+void RemoteDisplayListRecorderProxy::recordFillArc(const ArcData& data) >+{ >+ send(Messages::RemoteDisplayListRecorder::FillArc(data)); >+} >+ >+void RemoteDisplayListRecorderProxy::recordFillQuadCurve(const QuadCurveData& data) >+{ >+ send(Messages::RemoteDisplayListRecorder::FillQuadCurve(data)); >+} >+ >+void RemoteDisplayListRecorderProxy::recordFillBezierCurve(const BezierCurveData& data) >+{ >+ send(Messages::RemoteDisplayListRecorder::FillBezierCurve(data)); >+} >+ >+#endif // ENABLE(INLINE_PATH_DATA) >+ >+void RemoteDisplayListRecorderProxy::recordFillPath(const Path& path) >+{ >+ send(Messages::RemoteDisplayListRecorder::FillPath(path)); >+} >+ >+void RemoteDisplayListRecorderProxy::recordFillEllipse(const FloatRect& rect) >+{ >+ send(Messages::RemoteDisplayListRecorder::FillEllipse(rect)); >+} >+ >+void RemoteDisplayListRecorderProxy::recordGetPixelBuffer(PixelBufferFormat outputFormat, const IntRect& rect) >+{ >+ send(Messages::RemoteDisplayListRecorder::GetPixelBuffer(rect, outputFormat)); >+} >+ >+void RemoteDisplayListRecorderProxy::recordPutPixelBuffer(const PixelBuffer& buffer, const IntRect& srcRect, const IntPoint& destPoint, AlphaPremultiplication premultiplication) >+{ >+ send(Messages::RemoteDisplayListRecorder::PutPixelBuffer(srcRect, destPoint, buffer, premultiplication)); >+} >+ >+void RemoteDisplayListRecorderProxy::recordPaintFrameForMedia(MediaPlayer& player, const FloatRect& destination) >+{ >+ send(Messages::RemoteDisplayListRecorder::PaintFrameForMedia(player.identifier(), destination)); >+} >+ >+void RemoteDisplayListRecorderProxy::recordStrokeRect(const FloatRect& rect, float width) >+{ >+ send(Messages::RemoteDisplayListRecorder::StrokeRect(rect, width)); >+} >+ >+#if ENABLE(INLINE_PATH_DATA) >+ >+void RemoteDisplayListRecorderProxy::recordStrokeLine(const LineData& data) >+{ >+ send(Messages::RemoteDisplayListRecorder::StrokeLine(data)); >+} >+ >+void RemoteDisplayListRecorderProxy::recordStrokeArc(const ArcData& data) >+{ >+ send(Messages::RemoteDisplayListRecorder::StrokeArc(data)); >+} >+ >+void RemoteDisplayListRecorderProxy::recordStrokeQuadCurve(const QuadCurveData& data) >+{ >+ send(Messages::RemoteDisplayListRecorder::StrokeQuadCurve(data)); >+} >+ >+void RemoteDisplayListRecorderProxy::recordStrokeBezierCurve(const BezierCurveData& data) >+{ >+ send(Messages::RemoteDisplayListRecorder::StrokeBezierCurve(data)); >+} >+ >+#endif // ENABLE(INLINE_PATH_DATA) >+ >+void RemoteDisplayListRecorderProxy::recordStrokePath(const Path& path) >+{ >+ send(Messages::RemoteDisplayListRecorder::StrokePath(path)); >+} >+ >+void RemoteDisplayListRecorderProxy::recordStrokeEllipse(const FloatRect& rect) >+{ >+ send(Messages::RemoteDisplayListRecorder::StrokeEllipse(rect)); >+} >+ >+void RemoteDisplayListRecorderProxy::recordClearRect(const FloatRect& rect) >+{ >+ send(Messages::RemoteDisplayListRecorder::ClearRect(rect)); >+} >+ >+#if USE(CG) >+ >+void RemoteDisplayListRecorderProxy::recordApplyStrokePattern() >+{ >+ send(Messages::RemoteDisplayListRecorder::ApplyStrokePattern()); >+} >+ >+void RemoteDisplayListRecorderProxy::recordApplyFillPattern() >+{ >+ send(Messages::RemoteDisplayListRecorder::ApplyFillPattern()); >+} >+ >+#endif // USE(CG) >+ >+void RemoteDisplayListRecorderProxy::recordApplyDeviceScaleFactor(float scaleFactor) >+{ >+ send(Messages::RemoteDisplayListRecorder::ApplyDeviceScaleFactor(scaleFactor)); >+} >+ >+void RemoteDisplayListRecorderProxy::recordResourceUse(NativeImage& image) >+{ >+ if (UNLIKELY(!m_renderingBackend)) { >+ ASSERT_NOT_REACHED(); >+ return; >+ } >+ >+ m_renderingBackend->recordNativeImageUse(image); >+} >+ >+void RemoteDisplayListRecorderProxy::recordResourceUse(Font& font) >+{ >+ if (UNLIKELY(!m_renderingBackend)) { >+ ASSERT_NOT_REACHED(); >+ return; >+ } >+ >+ m_renderingBackend->recordFontUse(font); >+} >+ >+void RemoteDisplayListRecorderProxy::recordResourceUse(ImageBuffer& imageBuffer) >+{ >+ if (UNLIKELY(!m_renderingBackend)) { >+ ASSERT_NOT_REACHED(); >+ return; >+ } >+ >+ m_renderingBackend->recordImageBufferUse(imageBuffer); >+} >+ >+void RemoteDisplayListRecorderProxy::flushContext(GraphicsContextFlushIdentifier identifier) >+{ >+ send(Messages::RemoteDisplayListRecorder::FlushContext({ identifier })); >+} >+ >+std::unique_ptr<GraphicsContext> RemoteDisplayListRecorderProxy::createNestedContext(const FloatRect& initialClip, const AffineTransform& initialCTM) >+{ >+ return makeUnique<RemoteDisplayListRecorderProxy>(*this, initialClip, initialCTM); >+} >+ >+} // namespace WebCore >diff --git a/Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h b/Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h >new file mode 100644 >index 0000000000000000000000000000000000000000..e9b60b8f892fd31c3da754aa5fe3a22ce06430b5 >--- /dev/null >+++ b/Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h >@@ -0,0 +1,147 @@ >+/* >+ * Copyright (C) 2021 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#include "RemoteRenderingBackendProxy.h" >+#include <WebCore/DisplayListRecorder.h> >+#include <WebCore/DrawGlyphsRecorder.h> >+#include <WebCore/GraphicsContext.h> >+#include <wtf/WeakPtr.h> >+ >+namespace WebKit { >+ >+class RemoteRenderingBackendProxy; >+ >+class RemoteDisplayListRecorderProxy : public WebCore::DisplayList::Recorder { >+public: >+ RemoteDisplayListRecorderProxy(WebCore::ImageBuffer&, RemoteRenderingBackendProxy&, const WebCore::FloatRect& initialClip, const WebCore::AffineTransform&, WebCore::DrawGlyphsRecorder::DeconstructDrawGlyphs = WebCore::DrawGlyphsRecorder::DeconstructDrawGlyphs::Yes); >+ RemoteDisplayListRecorderProxy(RemoteDisplayListRecorderProxy& parent, const WebCore::FloatRect& initialClip, const WebCore::AffineTransform& initialCTM); >+ >+ ~RemoteDisplayListRecorderProxy() { } >+ >+ void resetNeedsFlush() { m_needsFlush = false; } >+ bool needsFlush() const { return m_needsFlush; } >+ >+ void getPixelBuffer(const WebCore::PixelBufferFormat& outputFormat, const WebCore::IntRect& sourceRect) final; >+ void putPixelBuffer(const WebCore::PixelBuffer&, const WebCore::IntRect& srcRect, const WebCore::IntPoint& destPoint, WebCore::AlphaPremultiplication destFormat) final; >+ void flushContext(WebCore::GraphicsContextFlushIdentifier) final; >+ >+private: >+ template<typename T> >+ void send(T&& message) >+ { >+ m_needsFlush = true; >+ m_renderingBackend->sendToStream(WTFMove(message), m_destinationBufferIdentifier); >+ } >+ >+ friend class DrawGlyphsRecorder; >+ >+ bool canDrawImageBuffer(const ImageBuffer&) const final; >+ RenderingMode renderingMode() const final; >+ >+ void recordSave() final; >+ void recordRestore() final; >+ void recordTranslate(float x, float y) final; >+ void recordRotate(float angle) final; >+ void recordScale(const WebCore::FloatSize&) final; >+ void recordSetCTM(const WebCore::AffineTransform&) final; >+ void recordConcatenateCTM(const WebCore::AffineTransform&) final; >+ void recordSetInlineFillColor(WebCore::SRGBA<uint8_t>) final; >+ void recordSetInlineStrokeColor(WebCore::SRGBA<uint8_t>) final; >+ void recordSetStrokeThickness(float) final; >+ void recordSetState(const WebCore::GraphicsContextState&, WebCore::GraphicsContextState::StateChangeFlags) final; >+ void recordSetLineCap(WebCore::LineCap) final; >+ void recordSetLineDash(const WebCore::DashArray&, float dashOffset) final; >+ void recordSetLineJoin(WebCore::LineJoin) final; >+ void recordSetMiterLimit(float) final; >+ void recordClearShadow() final; >+ void recordClip(const WebCore::FloatRect&) final; >+ void recordClipOut(const WebCore::FloatRect&) final; >+ void recordClipToImageBuffer(WebCore::RenderingResourceIdentifier imageBufferIdentifier, const WebCore::FloatRect& destinationRect) final; >+ void recordClipOutToPath(const WebCore::Path&) final; >+ void recordClipPath(const WebCore::Path&, WebCore::WindRule) final; >+ void recordBeginClipToDrawingCommands(const WebCore::FloatRect& destination, DestinationColorSpace) final; >+ void recordEndClipToDrawingCommands(const WebCore::FloatRect& destination) final; >+ void recordDrawGlyphs(const WebCore::Font&, const WebCore::GlyphBufferGlyph*, const WebCore::GlyphBufferAdvance*, unsigned count, const WebCore::FloatPoint& localAnchor, WebCore::FontSmoothingMode) final; >+ void recordDrawImageBuffer(WebCore::RenderingResourceIdentifier imageBufferIdentifier, const WebCore::FloatRect& destRect, const WebCore::FloatRect& srcRect, const WebCore::ImagePaintingOptions&) final; >+ void recordDrawNativeImage(WebCore::RenderingResourceIdentifier imageIdentifier, const WebCore::FloatSize& imageSize, const WebCore::FloatRect& destRect, const WebCore::FloatRect& srcRect, const WebCore::ImagePaintingOptions&) final; >+ void recordDrawPattern(WebCore::RenderingResourceIdentifier, const WebCore::FloatSize& imageSize, const WebCore::FloatRect& destRect, const WebCore::FloatRect& tileRect, const WebCore::AffineTransform&, const WebCore::FloatPoint& phase, const WebCore::FloatSize& spacing, const WebCore::ImagePaintingOptions& = { }) final; >+ void recordBeginTransparencyLayer(float) final; >+ void recordEndTransparencyLayer() final; >+ void recordDrawRect(const WebCore::FloatRect&, float) final; >+ void recordDrawLine(const WebCore::FloatPoint& point1, const WebCore::FloatPoint& point2) final; >+ void recordDrawLinesForText(const WebCore::FloatPoint& blockLocation, const WebCore::FloatSize& localAnchor, float thickness, const WebCore::DashArray& widths, bool printing, bool doubleLines) final; >+ void recordDrawDotsForDocumentMarker(const WebCore::FloatRect&, const WebCore::DocumentMarkerLineStyle&) final; >+ void recordDrawEllipse(const WebCore::FloatRect&) final; >+ void recordDrawPath(const WebCore::Path&) final; >+ void recordDrawFocusRingPath(const WebCore::Path&, float width, float offset, const WebCore::Color&) final; >+ void recordDrawFocusRingRects(const Vector<WebCore::FloatRect>&, float width, float offset, const WebCore::Color&) final; >+ void recordFillRect(const WebCore::FloatRect&) final; >+ void recordFillRectWithColor(const WebCore::FloatRect&, const WebCore::Color&) final; >+ void recordFillRectWithGradient(const WebCore::FloatRect&, WebCore::Gradient&) final; >+ void recordFillCompositedRect(const WebCore::FloatRect&, const WebCore::Color&, WebCore::CompositeOperator, WebCore::BlendMode) final; >+ void recordFillRoundedRect(const WebCore::FloatRoundedRect&, const WebCore::Color&, WebCore::BlendMode) final; >+ void recordFillRectWithRoundedHole(const WebCore::FloatRect&, const WebCore::FloatRoundedRect&, const WebCore::Color&) final; >+#if ENABLE(INLINE_PATH_DATA) >+ void recordFillLine(const WebCore::LineData&) final; >+ void recordFillArc(const WebCore::ArcData&) final; >+ void recordFillQuadCurve(const WebCore::QuadCurveData&) final; >+ void recordFillBezierCurve(const WebCore::BezierCurveData&) final; >+#endif >+ void recordFillPath(const WebCore::Path&) final; >+ void recordFillEllipse(const WebCore::FloatRect&) final; >+ void recordGetPixelBuffer(WebCore::PixelBufferFormat outputFormat, const WebCore::IntRect&) final; >+ void recordPutPixelBuffer(const WebCore::PixelBuffer&, const WebCore::IntRect& srcRect, const WebCore::IntPoint& destPoint, WebCore::AlphaPremultiplication) final; >+ void recordPaintFrameForMedia(MediaPlayer&, const WebCore::FloatRect& destination) final; >+ void recordStrokeRect(const WebCore::FloatRect&, float) final; >+#if ENABLE(INLINE_PATH_DATA) >+ void recordStrokeLine(const WebCore::LineData&) final; >+ void recordStrokeArc(const WebCore::ArcData&) final; >+ void recordStrokeQuadCurve(const WebCore::QuadCurveData&) final; >+ void recordStrokeBezierCurve(const WebCore::BezierCurveData&) final; >+#endif >+ void recordStrokePath(const WebCore::Path&) final; >+ void recordStrokeEllipse(const WebCore::FloatRect&) final; >+ void recordClearRect(const WebCore::FloatRect&) final; >+#if USE(CG) >+ void recordApplyStrokePattern() final; >+ void recordApplyFillPattern() final; >+#endif >+ void recordApplyDeviceScaleFactor(float) final; >+ >+ void recordResourceUse(WebCore::NativeImage&) final; >+ void recordResourceUse(WebCore::Font&) final; >+ void recordResourceUse(WebCore::ImageBuffer&) final; >+ >+ std::unique_ptr<WebCore::GraphicsContext> createNestedContext(const WebCore::FloatRect& initialClip, const WebCore::AffineTransform& initialCTM) final; >+ >+ WebCore::RenderingResourceIdentifier m_destinationBufferIdentifier; >+ WeakPtr<WebCore::ImageBuffer> m_imageBuffer; >+ WeakPtr<RemoteRenderingBackendProxy> m_renderingBackend; >+ bool m_needsFlush { false }; >+}; >+ >+} // namespace WebKit >diff --git a/Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp b/Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp >index 772fbca68fa7f031ad04201e9fe016ded7b5719b..bf49a827d202824a47b0d65696c6ca2c7d8fb91e 100644 >--- a/Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp >+++ b/Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp >@@ -447,6 +447,30 @@ RenderingBackendIdentifier RemoteRenderingBackendProxy::ensureBackendCreated() > return renderingBackendIdentifier(); > } > >+void RemoteRenderingBackendProxy::recordNativeImageUse(NativeImage& image) >+{ >+ m_remoteResourceCacheProxy.recordNativeImageUse(image); >+} >+ >+void RemoteRenderingBackendProxy::recordFontUse(Font& font) >+{ >+ m_remoteResourceCacheProxy.recordFontUse(font); >+} >+ >+void RemoteRenderingBackendProxy::recordImageBufferUse(ImageBuffer& imageBuffer) >+{ >+ m_remoteResourceCacheProxy.recordImageBufferUse(imageBuffer); >+} >+ >+bool RemoteRenderingBackendProxy::isCached(const ImageBuffer& imageBuffer) const >+{ >+ if (auto cachedImageBuffer = m_remoteResourceCacheProxy.cachedImageBuffer(imageBuffer.renderingResourceIdentifier())) { >+ ASSERT(cachedImageBuffer == &imageBuffer); >+ return true; >+ } >+ return false; >+} >+ > } // namespace WebKit > > #endif // ENABLE(GPU_PROCESS) >diff --git a/Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.h b/Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.h >index 2394ff5adc4d783b8afd2dc1321f2f5475a21285..aa023dcf2db5a33aab13f69ba016292d305af769 100644 >--- a/Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.h >+++ b/Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.h >@@ -88,6 +88,7 @@ public: > void destroyGetPixelBufferSharedMemory(); > > void createRemoteImageBuffer(WebCore::ImageBuffer&); >+ bool isCached(const WebCore::ImageBuffer&) const; > > // IPC::MessageSender. > IPC::Connection* messageSenderConnection() const override; >@@ -124,6 +125,22 @@ public: > > bool isGPUProcessConnectionClosed() const { return !m_gpuProcessConnection; } > >+ template<typename T, typename U> >+ void sendToStream(T&& message, ObjectIdentifier<U> identifier) >+ { >+ // FIXME: Not yet implemented. >+ } >+ >+ template<typename T> >+ void sendToStream(T&& message) >+ { >+ sendToStream(WTFMove(message), renderingBackendIdentifier()); >+ } >+ >+ void recordNativeImageUse(WebCore::NativeImage&); >+ void recordFontUse(WebCore::Font&); >+ void recordImageBufferUse(WebCore::ImageBuffer&); >+ > private: > explicit RemoteRenderingBackendProxy(WebPage&); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
ews-feeder
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 231484
:
440739
|
440740
|
440745
|
440746
|
440824