Title: [289976] trunk/Source
Revision
289976
Author
s...@apple.com
Date
2022-02-16 15:45:09 -0800 (Wed, 16 Feb 2022)

Log Message

[GPU Process] Route the call to ImageBuffer::drawPattern() through GraphicsContext
https://bugs.webkit.org/show_bug.cgi?id=236638

Reviewed by Simon Fraser.

Source/WebCore:

This will allow recording ImageBuffer::drawPattern() via the super classes
DisplayList::RecorderImpl and RemoteDisplayListRecorderProxy. So another
version of GraphicsContext::drawPattern() will be added which takes
ImageBuffer as an argument.

To make the display list item DrawPattern be suitable for recording both
versions of drawPattern(), we need to remove the argument 'imageSize'
from GraphicsContext::drawPattern() since this function is only called from
Image::drawPattern() and it passes imageSize = Image::size(). So imageSize
can be calculated from the NativeImage::size().

The DisplayList::Replayer and RemoteDisplayListRecorder have to consider
the RenderingResourceIdentifier of the DrawPattern can be the identifier
of a NativeImage or an ImageBuffer. DrawPattern::apply() needs to take a
SourceImage and it can make the decision whether to call the NativeImage
version or the ImageBuffer version of GraphicsContext::drawPattern().

* html/CustomPaintImage.cpp:
(WebCore::CustomPaintImage::drawPattern):
* platform/graphics/BifurcatedGraphicsContext.cpp:
(WebCore::BifurcatedGraphicsContext::drawPattern):
* platform/graphics/BifurcatedGraphicsContext.h:
* platform/graphics/CrossfadeGeneratedImage.cpp:
(WebCore::CrossfadeGeneratedImage::drawPattern):
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::drawPattern):
* platform/graphics/GraphicsContext.h:
(WebCore::GraphicsContext::drawPattern):
* platform/graphics/Image.cpp:
(WebCore::Image::drawPattern):
* platform/graphics/NamedImageGeneratedImage.cpp:
(WebCore::NamedImageGeneratedImage::drawPattern):
* platform/graphics/NullGraphicsContext.h:
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContextCairo::drawPattern):
* platform/graphics/cairo/GraphicsContextCairo.h:
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContextCG::drawPattern):
* platform/graphics/cg/GraphicsContextCG.h:
* platform/graphics/displaylists/DisplayListItems.cpp:
(WebCore::DisplayList::DrawPattern::DrawPattern):
(WebCore::DisplayList::DrawPattern::apply const):
* platform/graphics/displaylists/DisplayListItems.h:
(WebCore::DisplayList::DrawPattern::DrawPattern):
(WebCore::DisplayList::DrawPattern::imageIdentifier const):
(WebCore::DisplayList::DrawPattern::imageSize const): Deleted.
* platform/graphics/displaylists/DisplayListRecorder.cpp:
(WebCore::DisplayList::Recorder::drawPattern):
* platform/graphics/displaylists/DisplayListRecorder.h:
(WebCore::DisplayList::Recorder::recordDrawPattern):
* platform/graphics/displaylists/DisplayListRecorderImpl.cpp:
(WebCore::DisplayList::RecorderImpl::recordDrawPattern):
* platform/graphics/displaylists/DisplayListRecorderImpl.h:
(WebCore::DisplayList::RecorderImpl::recordDrawPattern):
* platform/graphics/displaylists/DisplayListReplayer.cpp:
(WebCore::DisplayList::applySourceImageItem):
(WebCore::DisplayList::Replayer::applyItem):
* platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp:
(Nicosia::CairoOperationRecorder::drawPattern):
* platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.h:

Source/WebKit:

* GPUProcess/graphics/RemoteDisplayListRecorder.cpp:
(WebKit::RemoteDisplayListRecorder::drawPattern):
(WebKit::RemoteDisplayListRecorder::drawPatternWithQualifiedIdentifier):
* GPUProcess/graphics/RemoteDisplayListRecorder.h:
* GPUProcess/graphics/RemoteDisplayListRecorder.messages.in:
* WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp:
(WebKit::RemoteDisplayListRecorderProxy::recordDrawPattern):
* WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h:
(WebKit::RemoteDisplayListRecorderProxy::recordDrawPattern):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (289975 => 289976)


--- trunk/Source/WebCore/ChangeLog	2022-02-16 23:35:12 UTC (rev 289975)
+++ trunk/Source/WebCore/ChangeLog	2022-02-16 23:45:09 UTC (rev 289976)
@@ -1,3 +1,71 @@
+2022-02-16  Said Abou-Hallawa  <s...@apple.com>
+
+        [GPU Process] Route the call to ImageBuffer::drawPattern() through GraphicsContext
+        https://bugs.webkit.org/show_bug.cgi?id=236638
+
+        Reviewed by Simon Fraser.
+
+        This will allow recording ImageBuffer::drawPattern() via the super classes
+        DisplayList::RecorderImpl and RemoteDisplayListRecorderProxy. So another
+        version of GraphicsContext::drawPattern() will be added which takes
+        ImageBuffer as an argument.
+
+        To make the display list item DrawPattern be suitable for recording both
+        versions of drawPattern(), we need to remove the argument 'imageSize'
+        from GraphicsContext::drawPattern() since this function is only called from
+        Image::drawPattern() and it passes imageSize = Image::size(). So imageSize
+        can be calculated from the NativeImage::size().
+
+        The DisplayList::Replayer and RemoteDisplayListRecorder have to consider 
+        the RenderingResourceIdentifier of the DrawPattern can be the identifier
+        of a NativeImage or an ImageBuffer. DrawPattern::apply() needs to take a
+        SourceImage and it can make the decision whether to call the NativeImage
+        version or the ImageBuffer version of GraphicsContext::drawPattern().
+
+        * html/CustomPaintImage.cpp:
+        (WebCore::CustomPaintImage::drawPattern):
+        * platform/graphics/BifurcatedGraphicsContext.cpp:
+        (WebCore::BifurcatedGraphicsContext::drawPattern):
+        * platform/graphics/BifurcatedGraphicsContext.h:
+        * platform/graphics/CrossfadeGeneratedImage.cpp:
+        (WebCore::CrossfadeGeneratedImage::drawPattern):
+        * platform/graphics/GraphicsContext.cpp:
+        (WebCore::GraphicsContext::drawPattern):
+        * platform/graphics/GraphicsContext.h:
+        (WebCore::GraphicsContext::drawPattern):
+        * platform/graphics/Image.cpp:
+        (WebCore::Image::drawPattern):
+        * platform/graphics/NamedImageGeneratedImage.cpp:
+        (WebCore::NamedImageGeneratedImage::drawPattern):
+        * platform/graphics/NullGraphicsContext.h:
+        * platform/graphics/cairo/GraphicsContextCairo.cpp:
+        (WebCore::GraphicsContextCairo::drawPattern):
+        * platform/graphics/cairo/GraphicsContextCairo.h:
+        * platform/graphics/cg/GraphicsContextCG.cpp:
+        (WebCore::GraphicsContextCG::drawPattern):
+        * platform/graphics/cg/GraphicsContextCG.h:
+        * platform/graphics/displaylists/DisplayListItems.cpp:
+        (WebCore::DisplayList::DrawPattern::DrawPattern):
+        (WebCore::DisplayList::DrawPattern::apply const):
+        * platform/graphics/displaylists/DisplayListItems.h:
+        (WebCore::DisplayList::DrawPattern::DrawPattern):
+        (WebCore::DisplayList::DrawPattern::imageIdentifier const):
+        (WebCore::DisplayList::DrawPattern::imageSize const): Deleted.
+        * platform/graphics/displaylists/DisplayListRecorder.cpp:
+        (WebCore::DisplayList::Recorder::drawPattern):
+        * platform/graphics/displaylists/DisplayListRecorder.h:
+        (WebCore::DisplayList::Recorder::recordDrawPattern):
+        * platform/graphics/displaylists/DisplayListRecorderImpl.cpp:
+        (WebCore::DisplayList::RecorderImpl::recordDrawPattern):
+        * platform/graphics/displaylists/DisplayListRecorderImpl.h:
+        (WebCore::DisplayList::RecorderImpl::recordDrawPattern):
+        * platform/graphics/displaylists/DisplayListReplayer.cpp:
+        (WebCore::DisplayList::applySourceImageItem):
+        (WebCore::DisplayList::Replayer::applyItem):
+        * platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp:
+        (Nicosia::CairoOperationRecorder::drawPattern):
+        * platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.h:
+
 2022-02-16  Lauro Moura  <lmo...@igalia.com>
 
         Unreviewed, non-unified build fix after r289742

Modified: trunk/Source/WebCore/html/CustomPaintImage.cpp (289975 => 289976)


--- trunk/Source/WebCore/html/CustomPaintImage.cpp	2022-02-16 23:35:12 UTC (rev 289975)
+++ trunk/Source/WebCore/html/CustomPaintImage.cpp	2022-02-16 23:45:09 UTC (rev 289976)
@@ -207,7 +207,7 @@
     if (destContext.drawLuminanceMask())
         buffer->convertToLuminanceMask();
 
-    buffer->drawPattern(destContext, destRect, adjustedSrcRect, adjustedPatternCTM, phase, spacing, options);
+    destContext.drawPattern(*buffer, destRect, adjustedSrcRect, adjustedPatternCTM, phase, spacing, options);
     destContext.setDrawLuminanceMask(false);
 }
 

Modified: trunk/Source/WebCore/platform/graphics/BifurcatedGraphicsContext.cpp (289975 => 289976)


--- trunk/Source/WebCore/platform/graphics/BifurcatedGraphicsContext.cpp	2022-02-16 23:35:12 UTC (rev 289975)
+++ trunk/Source/WebCore/platform/graphics/BifurcatedGraphicsContext.cpp	2022-02-16 23:45:09 UTC (rev 289976)
@@ -263,10 +263,10 @@
     m_secondaryContext.drawNativeImage(nativeImage, selfSize, destRect, srcRect, options);
 }
 
-void BifurcatedGraphicsContext::drawPattern(NativeImage& nativeImage, const FloatSize& imageSize, const FloatRect& destRect, const FloatRect& tileRect, const AffineTransform& patternTransform, const FloatPoint& phase, const FloatSize& spacing, const ImagePaintingOptions& options)
+void BifurcatedGraphicsContext::drawPattern(NativeImage& nativeImage, const FloatRect& destRect, const FloatRect& tileRect, const AffineTransform& patternTransform, const FloatPoint& phase, const FloatSize& spacing, const ImagePaintingOptions& options)
 {
-    m_primaryContext.drawPattern(nativeImage, imageSize, destRect, tileRect, patternTransform, phase, spacing, options);
-    m_secondaryContext.drawPattern(nativeImage, imageSize, destRect, tileRect, patternTransform, phase, spacing, options);
+    m_primaryContext.drawPattern(nativeImage, destRect, tileRect, patternTransform, phase, spacing, options);
+    m_secondaryContext.drawPattern(nativeImage, destRect, tileRect, patternTransform, phase, spacing, options);
 }
 
 ImageDrawResult BifurcatedGraphicsContext::drawImage(Image& image, const FloatRect& destination, const FloatRect& source, const ImagePaintingOptions& options)

Modified: trunk/Source/WebCore/platform/graphics/BifurcatedGraphicsContext.h (289975 => 289976)


--- trunk/Source/WebCore/platform/graphics/BifurcatedGraphicsContext.h	2022-02-16 23:35:12 UTC (rev 289975)
+++ trunk/Source/WebCore/platform/graphics/BifurcatedGraphicsContext.h	2022-02-16 23:45:09 UTC (rev 289976)
@@ -98,7 +98,7 @@
     void setMiterLimit(float) final;
 
     void drawNativeImage(NativeImage&, const FloatSize& selfSize, const FloatRect& destRect, const FloatRect& srcRect, const ImagePaintingOptions& = { }) final;
-    void drawPattern(NativeImage&, const FloatSize& imageSize, const FloatRect& destRect, const FloatRect& tileRect, const AffineTransform& patternTransform, const FloatPoint& phase, const FloatSize& spacing, const ImagePaintingOptions& = { }) final;
+    void drawPattern(NativeImage&, const FloatRect& destRect, const FloatRect& tileRect, const AffineTransform& patternTransform, const FloatPoint& phase, const FloatSize& spacing, const ImagePaintingOptions& = { }) final;
     ImageDrawResult drawImage(Image&, const FloatRect& destination, const FloatRect& source, const ImagePaintingOptions& = { ImageOrientation::FromImage }) final;
     ImageDrawResult drawImageForCanvas(Image&, const FloatRect& destination, const FloatRect& source, const ImagePaintingOptions&, DestinationColorSpace canvasColorSpace) final;
     ImageDrawResult drawTiledImage(Image&, const FloatRect& destination, const FloatPoint& source, const FloatSize& tileSize, const FloatSize& spacing, const ImagePaintingOptions& = { }) final;

Modified: trunk/Source/WebCore/platform/graphics/CrossfadeGeneratedImage.cpp (289975 => 289976)


--- trunk/Source/WebCore/platform/graphics/CrossfadeGeneratedImage.cpp	2022-02-16 23:35:12 UTC (rev 289975)
+++ trunk/Source/WebCore/platform/graphics/CrossfadeGeneratedImage.cpp	2022-02-16 23:45:09 UTC (rev 289976)
@@ -112,7 +112,7 @@
     drawCrossfade(graphicsContext);
 
     // Tile the image buffer into the context.
-    imageBuffer->drawPattern(context, dstRect, srcRect, patternTransform, phase, spacing, options);
+    context.drawPattern(*imageBuffer, dstRect, srcRect, patternTransform, phase, spacing, options);
 }
 
 void CrossfadeGeneratedImage::dump(TextStream& ts) const

Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp (289975 => 289976)


--- trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp	2022-02-16 23:35:12 UTC (rev 289975)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp	2022-02-16 23:45:09 UTC (rev 289976)
@@ -734,6 +734,11 @@
     scale(filter.filterScale());
 }
 
+void GraphicsContext::drawPattern(ImageBuffer& image, const FloatRect& destRect, const FloatRect& tileRect, const AffineTransform& patternTransform, const FloatPoint& phase, const FloatSize& spacing, const ImagePaintingOptions& options)
+{
+    image.drawPattern(*this, destRect, tileRect, patternTransform, phase, spacing, options);
+}
+
 void GraphicsContext::clipRoundedRect(const FloatRoundedRect& rect)
 {
     Path path;

Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext.h (289975 => 289976)


--- trunk/Source/WebCore/platform/graphics/GraphicsContext.h	2022-02-16 23:35:12 UTC (rev 289975)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext.h	2022-02-16 23:45:09 UTC (rev 289976)
@@ -445,7 +445,8 @@
 
     WEBCORE_EXPORT virtual void drawFilteredImageBuffer(ImageBuffer* sourceImage, const FloatRect& sourceImageRect, Filter&, FilterResults&);
 
-    virtual void drawPattern(NativeImage&, const FloatSize& imageSize, const FloatRect& destRect, const FloatRect& tileRect, const AffineTransform& patternTransform, const FloatPoint& phase, const FloatSize& spacing, const ImagePaintingOptions& = { }) = 0;
+    virtual void drawPattern(NativeImage&, const FloatRect& destRect, const FloatRect& tileRect, const AffineTransform& patternTransform, const FloatPoint& phase, const FloatSize& spacing, const ImagePaintingOptions& = { }) = 0;
+    WEBCORE_EXPORT virtual void drawPattern(ImageBuffer&, const FloatRect& destRect, const FloatRect& tileRect, const AffineTransform& patternTransform, const FloatPoint& phase, const FloatSize& spacing, const ImagePaintingOptions& = { });
 
 #if ENABLE(VIDEO)
     WEBCORE_EXPORT virtual void paintFrameForMedia(MediaPlayer&, const FloatRect& destination);

Modified: trunk/Source/WebCore/platform/graphics/Image.cpp (289975 => 289976)


--- trunk/Source/WebCore/platform/graphics/Image.cpp	2022-02-16 23:35:12 UTC (rev 289975)
+++ trunk/Source/WebCore/platform/graphics/Image.cpp	2022-02-16 23:45:09 UTC (rev 289976)
@@ -147,7 +147,7 @@
     if (!tileImage)
         return;
 
-    ctxt.drawPattern(*tileImage, size(), destRect, tileRect, patternTransform, phase, spacing, options);
+    ctxt.drawPattern(*tileImage, destRect, tileRect, patternTransform, phase, spacing, options);
 
     if (imageObserver())
         imageObserver()->didDraw(*this);

Modified: trunk/Source/WebCore/platform/graphics/NamedImageGeneratedImage.cpp (289975 => 289976)


--- trunk/Source/WebCore/platform/graphics/NamedImageGeneratedImage.cpp	2022-02-16 23:35:12 UTC (rev 289975)
+++ trunk/Source/WebCore/platform/graphics/NamedImageGeneratedImage.cpp	2022-02-16 23:45:09 UTC (rev 289976)
@@ -73,7 +73,7 @@
     Theme::singleton().drawNamedImage(m_name, graphicsContext, size());
 
     // Tile the image buffer into the context.
-    imageBuffer->drawPattern(context, dstRect, srcRect, patternTransform, phase, spacing, options);
+    context.drawPattern(*imageBuffer, dstRect, srcRect, patternTransform, phase, spacing, options);
 #else
     UNUSED_PARAM(context);
     UNUSED_PARAM(dstRect);

Modified: trunk/Source/WebCore/platform/graphics/NullGraphicsContext.h (289975 => 289976)


--- trunk/Source/WebCore/platform/graphics/NullGraphicsContext.h	2022-02-16 23:35:12 UTC (rev 289975)
+++ trunk/Source/WebCore/platform/graphics/NullGraphicsContext.h	2022-02-16 23:45:09 UTC (rev 289976)
@@ -63,7 +63,7 @@
 
     void drawNativeImage(NativeImage&, const FloatSize&, const FloatRect&, const FloatRect&, const ImagePaintingOptions&) final { }
 
-    void drawPattern(NativeImage&, const FloatSize&, const FloatRect&, const FloatRect&, const AffineTransform&, const FloatPoint&, const FloatSize&, const ImagePaintingOptions&) final { }
+    void drawPattern(NativeImage&, const FloatRect&, const FloatRect&, const AffineTransform&, const FloatPoint&, const FloatSize&, const ImagePaintingOptions&) final { }
 
     IntRect clipBounds() const final { return { }; }
 

Modified: trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp (289975 => 289976)


--- trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp	2022-02-16 23:35:12 UTC (rev 289975)
+++ trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp	2022-02-16 23:45:09 UTC (rev 289976)
@@ -395,13 +395,13 @@
     Cairo::fillRectWithRoundedHole(*this, rect, roundedHoleRect, Cairo::FillSource(state), Cairo::ShadowState(state));
 }
 
-void GraphicsContextCairo::drawPattern(NativeImage& nativeImage, const FloatSize& imageSize, const FloatRect& destRect, const FloatRect& tileRect, const AffineTransform& patternTransform, const FloatPoint& phase, const FloatSize& spacing, const ImagePaintingOptions& options)
+void GraphicsContextCairo::drawPattern(NativeImage& nativeImage, const FloatRect& destRect, const FloatRect& tileRect, const AffineTransform& patternTransform, const FloatPoint& phase, const FloatSize& spacing, const ImagePaintingOptions& options)
 {
     if (!patternTransform.isInvertible())
         return;
 
     UNUSED_PARAM(spacing);
-    Cairo::drawPattern(*this, nativeImage.platformImage().get(), IntSize(imageSize), destRect, tileRect, patternTransform, phase, options);
+    Cairo::drawPattern(*this, nativeImage.platformImage().get(), nativeImage.size(), destRect, tileRect, patternTransform, phase, options);
 }
 
 RenderingMode GraphicsContextCairo::renderingMode() const

Modified: trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.h (289975 => 289976)


--- trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.h	2022-02-16 23:35:12 UTC (rev 289975)
+++ trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.h	2022-02-16 23:45:09 UTC (rev 289976)
@@ -72,7 +72,7 @@
     void drawGlyphs(const Font&, const GlyphBufferGlyph*, const GlyphBufferAdvance*, unsigned numGlyphs, const FloatPoint&, FontSmoothingMode) final;
 
     void drawNativeImage(NativeImage&, const FloatSize&, const FloatRect&, const FloatRect&, const ImagePaintingOptions&) final;
-    void drawPattern(NativeImage&, const FloatSize& imageSize, const FloatRect& destRect, const FloatRect& srcRect, const AffineTransform&, const FloatPoint& phase, const FloatSize& spacing, const ImagePaintingOptions&) final;
+    void drawPattern(NativeImage&, const FloatRect& destRect, const FloatRect& srcRect, const AffineTransform&, const FloatPoint& phase, const FloatSize& spacing, const ImagePaintingOptions&) final;
 
     void drawRect(const FloatRect&, float) final;
     void drawLine(const FloatPoint&, const FloatPoint&) final;

Modified: trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp (289975 => 289976)


--- trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp	2022-02-16 23:35:12 UTC (rev 289975)
+++ trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp	2022-02-16 23:45:09 UTC (rev 289976)
@@ -384,12 +384,13 @@
     callOnMainThread([image = adoptCF(static_cast<CGImageRef>(info))] { });
 }
 
-void GraphicsContextCG::drawPattern(NativeImage& nativeImage, const FloatSize& imageSize, const FloatRect& destRect, const FloatRect& tileRect, const AffineTransform& patternTransform, const FloatPoint& phase, const FloatSize& spacing, const ImagePaintingOptions& options)
+void GraphicsContextCG::drawPattern(NativeImage& nativeImage, const FloatRect& destRect, const FloatRect& tileRect, const AffineTransform& patternTransform, const FloatPoint& phase, const FloatSize& spacing, const ImagePaintingOptions& options)
 {
     if (!patternTransform.isInvertible())
         return;
 
     auto image = nativeImage.platformImage();
+    auto imageSize = nativeImage.size();
 
     CGContextRef context = platformContext();
     CGContextStateSaver stateSaver(context);

Modified: trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.h (289975 => 289976)


--- trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.h	2022-02-16 23:35:12 UTC (rev 289975)
+++ trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.h	2022-02-16 23:45:09 UTC (rev 289976)
@@ -135,7 +135,7 @@
     void setMiterLimit(float) final;
 
     void drawNativeImage(NativeImage&, const FloatSize& selfSize, const FloatRect& destRect, const FloatRect& srcRect, const ImagePaintingOptions& = { }) final;
-    void drawPattern(NativeImage&, const FloatSize& imageSize, const FloatRect& destRect, const FloatRect& tileRect, const AffineTransform& patternTransform, const FloatPoint& phase, const FloatSize& spacing, const ImagePaintingOptions& = { }) final;
+    void drawPattern(NativeImage&, const FloatRect& destRect, const FloatRect& tileRect, const AffineTransform& patternTransform, const FloatPoint& phase, const FloatSize& spacing, const ImagePaintingOptions& = { }) final;
 
     using GraphicsContext::scale;
     void scale(const FloatSize&) final;

Modified: trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItems.cpp (289975 => 289976)


--- trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItems.cpp	2022-02-16 23:35:12 UTC (rev 289975)
+++ trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItems.cpp	2022-02-16 23:45:09 UTC (rev 289976)
@@ -398,9 +398,8 @@
     return ts;
 }
 
-DrawPattern::DrawPattern(RenderingResourceIdentifier imageIdentifier, const FloatSize& imageSize, const FloatRect& destRect, const FloatRect& tileRect, const AffineTransform& patternTransform, const FloatPoint& phase, const FloatSize& spacing, const ImagePaintingOptions& options)
+DrawPattern::DrawPattern(RenderingResourceIdentifier imageIdentifier, const FloatRect& destRect, const FloatRect& tileRect, const AffineTransform& patternTransform, const FloatPoint& phase, const FloatSize& spacing, const ImagePaintingOptions& options)
     : m_imageIdentifier(imageIdentifier)
-    , m_imageSize(imageSize)
     , m_destination(destRect)
     , m_tileRect(tileRect)
     , m_patternTransform(patternTransform)
@@ -415,9 +414,19 @@
     ASSERT_NOT_REACHED();
 }
 
-void DrawPattern::apply(GraphicsContext& context, NativeImage& image) const
+void DrawPattern::apply(GraphicsContext& context, SourceImage& sourceImage) const
 {
-    context.drawPattern(image, m_imageSize, m_destination, m_tileRect, m_patternTransform, m_phase, m_spacing, m_options);
+    if (auto image = sourceImage.nativeImageIfExists()) {
+        context.drawPattern(*image, m_destination, m_tileRect, m_patternTransform, m_phase, m_spacing, m_options);
+        return;
+    }
+
+    if (auto imageBuffer = sourceImage.imageBufferIfExists()) {
+        context.drawPattern(*imageBuffer, m_destination, m_tileRect, m_patternTransform, m_phase, m_spacing, m_options);
+        return;
+    }
+
+    ASSERT_NOT_REACHED();
 }
 
 static TextStream& operator<<(TextStream& ts, const DrawPattern& item)

Modified: trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItems.h (289975 => 289976)


--- trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItems.h	2022-02-16 23:35:12 UTC (rev 289975)
+++ trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItems.h	2022-02-16 23:45:09 UTC (rev 289976)
@@ -999,10 +999,9 @@
     static constexpr bool isInlineItem = true;
     static constexpr bool isDrawingItem = true;
 
-    WEBCORE_EXPORT DrawPattern(RenderingResourceIdentifier, const FloatSize& imageSize, const FloatRect& destRect, const FloatRect& tileRect, const AffineTransform&, const FloatPoint& phase, const FloatSize& spacing, const ImagePaintingOptions& = { });
+    WEBCORE_EXPORT DrawPattern(RenderingResourceIdentifier, const FloatRect& destRect, const FloatRect& tileRect, const AffineTransform&, const FloatPoint& phase, const FloatSize& spacing, const ImagePaintingOptions& = { });
 
     RenderingResourceIdentifier imageIdentifier() const { return m_imageIdentifier; }
-    FloatSize imageSize() const { return m_imageSize; }
     FloatRect destRect() const { return m_destination; }
     FloatRect tileRect() const { return m_tileRect; }
     const AffineTransform& patternTransform() const { return m_patternTransform; }
@@ -1012,7 +1011,7 @@
     bool isValid() const { return m_imageIdentifier.isValid(); }
 
     NO_RETURN_DUE_TO_ASSERT void apply(GraphicsContext&) const;
-    WEBCORE_EXPORT void apply(GraphicsContext&, NativeImage&) const;
+    WEBCORE_EXPORT void apply(GraphicsContext&, SourceImage&) const;
 
     std::optional<FloatRect> globalBounds() const { return std::nullopt; }
     std::optional<FloatRect> localBounds(const GraphicsContext&) const { return m_destination; }
@@ -1019,7 +1018,6 @@
 
 private:
     RenderingResourceIdentifier m_imageIdentifier;
-    FloatSize m_imageSize;
     FloatRect m_destination;
     FloatRect m_tileRect;
     AffineTransform m_patternTransform;

Modified: trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp (289975 => 289976)


--- trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp	2022-02-16 23:35:12 UTC (rev 289975)
+++ trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp	2022-02-16 23:45:09 UTC (rev 289976)
@@ -202,13 +202,25 @@
     recordDrawNativeImage(image.renderingResourceIdentifier(), imageSize, destRect, srcRect, options);
 }
 
-void Recorder::drawPattern(NativeImage& image, const FloatSize& imageSize, const FloatRect& destRect, const FloatRect& tileRect, const AffineTransform& patternTransform, const FloatPoint& phase, const FloatSize& spacing, const ImagePaintingOptions& options)
+void Recorder::drawPattern(NativeImage& image, const FloatRect& destRect, const FloatRect& tileRect, const AffineTransform& patternTransform, const FloatPoint& phase, const FloatSize& spacing, const ImagePaintingOptions& options)
 {
     appendStateChangeItemIfNecessary();
     recordResourceUse(image);
-    recordDrawPattern(image.renderingResourceIdentifier(), imageSize, destRect, tileRect, patternTransform, phase, spacing, options);
+    recordDrawPattern(image.renderingResourceIdentifier(), destRect, tileRect, patternTransform, phase, spacing, options);
 }
 
+void Recorder::drawPattern(ImageBuffer& imageBuffer, const FloatRect& destRect, const FloatRect& tileRect, const AffineTransform& patternTransform, const FloatPoint& phase, const FloatSize& spacing, const ImagePaintingOptions& options)
+{
+    appendStateChangeItemIfNecessary();
+
+    if (!recordResourceUse(imageBuffer)) {
+        GraphicsContext::drawPattern(imageBuffer, destRect, tileRect, patternTransform, phase, spacing, options);
+        return;
+    }
+
+    recordDrawPattern(imageBuffer.renderingResourceIdentifier(), destRect, tileRect, patternTransform, phase, spacing, options);
+}
+
 void Recorder::save()
 {
     recordSave();

Modified: trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h (289975 => 289976)


--- trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h	2022-02-16 23:35:12 UTC (rev 289975)
+++ trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h	2022-02-16 23:45:09 UTC (rev 289976)
@@ -86,7 +86,7 @@
     virtual void recordDrawGlyphs(const Font&, const GlyphBufferGlyph*, const GlyphBufferAdvance*, unsigned count, const FloatPoint& localAnchor, FontSmoothingMode) = 0;
     virtual void recordDrawImageBuffer(ImageBuffer&, const FloatRect& destRect, const FloatRect& srcRect, const ImagePaintingOptions&) = 0;
     virtual void recordDrawNativeImage(RenderingResourceIdentifier imageIdentifier, const FloatSize& imageSize, const FloatRect& destRect, const FloatRect& srcRect, const ImagePaintingOptions&) = 0;
-    virtual void recordDrawPattern(RenderingResourceIdentifier, const FloatSize& imageSize, const FloatRect& destRect, const FloatRect& tileRect, const AffineTransform&, const FloatPoint& phase, const FloatSize& spacing, const ImagePaintingOptions& = { }) = 0;
+    virtual void recordDrawPattern(RenderingResourceIdentifier, const FloatRect& destRect, const FloatRect& tileRect, const AffineTransform&, const FloatPoint& phase, const FloatSize& spacing, const ImagePaintingOptions& = { }) = 0;
     virtual void recordBeginTransparencyLayer(float) = 0;
     virtual void recordEndTransparencyLayer() = 0;
     virtual void recordDrawRect(const FloatRect&, float) = 0;
@@ -222,7 +222,8 @@
 
     WEBCORE_EXPORT void drawImageBuffer(ImageBuffer&, const FloatRect& destination, const FloatRect& source, const ImagePaintingOptions&) final;
     WEBCORE_EXPORT void drawNativeImage(NativeImage&, const FloatSize& imageSize, const FloatRect& destRect, const FloatRect& srcRect, const ImagePaintingOptions&) final;
-    WEBCORE_EXPORT void drawPattern(NativeImage&, const FloatSize& imageSize, const FloatRect& destRect, const FloatRect& srcRect, const AffineTransform&, const FloatPoint& phase, const FloatSize& spacing, const ImagePaintingOptions&) final;
+    WEBCORE_EXPORT void drawPattern(NativeImage&, const FloatRect& destRect, const FloatRect& tileRect, const AffineTransform&, const FloatPoint& phase, const FloatSize& spacing, const ImagePaintingOptions&) final;
+    WEBCORE_EXPORT void drawPattern(ImageBuffer&, const FloatRect& destRect, const FloatRect& tileRect, const AffineTransform&, const FloatPoint& phase, const FloatSize& spacing, const ImagePaintingOptions&) final;
 
     WEBCORE_EXPORT void drawRect(const FloatRect&, float borderThickness) final;
     WEBCORE_EXPORT void drawLine(const FloatPoint&, const FloatPoint&) final;

Modified: trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.cpp (289975 => 289976)


--- trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.cpp	2022-02-16 23:35:12 UTC (rev 289975)
+++ trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.cpp	2022-02-16 23:45:09 UTC (rev 289976)
@@ -182,9 +182,9 @@
     append<DrawNativeImage>(imageIdentifier, imageSize, destRect, srcRect, options);
 }
 
-void RecorderImpl::recordDrawPattern(RenderingResourceIdentifier imageIdentifier, const FloatSize& imageSize, const FloatRect& destRect, const FloatRect& tileRect, const AffineTransform& transform, const FloatPoint& phase, const FloatSize& spacing, const ImagePaintingOptions& options)
+void RecorderImpl::recordDrawPattern(RenderingResourceIdentifier imageIdentifier, const FloatRect& destRect, const FloatRect& tileRect, const AffineTransform& transform, const FloatPoint& phase, const FloatSize& spacing, const ImagePaintingOptions& options)
 {
-    append<DrawPattern>(imageIdentifier, imageSize, destRect, tileRect, transform, phase, spacing, options);
+    append<DrawPattern>(imageIdentifier, destRect, tileRect, transform, phase, spacing, options);
 }
 
 void RecorderImpl::recordBeginTransparencyLayer(float opacity)

Modified: trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.h (289975 => 289976)


--- trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.h	2022-02-16 23:35:12 UTC (rev 289975)
+++ trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.h	2022-02-16 23:45:09 UTC (rev 289976)
@@ -70,7 +70,7 @@
     void recordDrawGlyphs(const Font&, const GlyphBufferGlyph*, const GlyphBufferAdvance*, unsigned count, const FloatPoint& localAnchor, FontSmoothingMode) final;
     void recordDrawImageBuffer(ImageBuffer&, const FloatRect& destRect, const FloatRect& srcRect, const ImagePaintingOptions&) final;
     void recordDrawNativeImage(RenderingResourceIdentifier imageIdentifier, const FloatSize& imageSize, const FloatRect& destRect, const FloatRect& srcRect, const ImagePaintingOptions&) final;
-    void recordDrawPattern(RenderingResourceIdentifier, const FloatSize& imageSize, const FloatRect& destRect, const FloatRect& tileRect, const AffineTransform&, const FloatPoint& phase, const FloatSize& spacing, const ImagePaintingOptions& = { }) final;
+    void recordDrawPattern(RenderingResourceIdentifier, const FloatRect& destRect, const FloatRect& tileRect, const AffineTransform&, const FloatPoint& phase, const FloatSize& spacing, const ImagePaintingOptions& = { }) final;
     void recordBeginTransparencyLayer(float) final;
     void recordEndTransparencyLayer() final;
     void recordDrawRect(const FloatRect&, float) final;

Modified: trunk/Source/WebCore/platform/graphics/displaylists/DisplayListReplayer.cpp (289975 => 289976)


--- trunk/Source/WebCore/platform/graphics/displaylists/DisplayListReplayer.cpp	2022-02-16 23:35:12 UTC (rev 289975)
+++ trunk/Source/WebCore/platform/graphics/displaylists/DisplayListReplayer.cpp	2022-02-16 23:45:09 UTC (rev 289976)
@@ -68,6 +68,18 @@
     return resourceIdentifier;
 }
 
+template<class T>
+inline static std::optional<RenderingResourceIdentifier> applySourceImageItem(GraphicsContext& context, const ResourceHeap& resourceHeap, ItemHandle item)
+{
+    auto& sourceImageItem = item.get<T>();
+    auto resourceIdentifier = sourceImageItem.imageIdentifier();
+    if (auto sourceImage = resourceHeap.getSourceImage(resourceIdentifier)) {
+        sourceImageItem.apply(context, *sourceImage);
+        return std::nullopt;
+    }
+    return resourceIdentifier;
+}
+
 inline static std::optional<RenderingResourceIdentifier> applySetStateItem(GraphicsContext& context, const ResourceHeap& resourceHeap, ItemHandle item)
 {
     auto& setStateItem = item.get<SetState>();
@@ -134,7 +146,7 @@
     }
 
     if (item.is<DrawPattern>()) {
-        if (auto missingCachedResourceIdentifier = applyNativeImageItem<DrawPattern>(m_context, m_resourceHeap, item))
+        if (auto missingCachedResourceIdentifier = applySourceImageItem<DrawPattern>(m_context, m_resourceHeap, item))
             return { StopReplayReason::MissingCachedResource, WTFMove(missingCachedResourceIdentifier) };
         return { std::nullopt, std::nullopt };
     }

Modified: trunk/Source/WebCore/platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp (289975 => 289976)


--- trunk/Source/WebCore/platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp	2022-02-16 23:35:12 UTC (rev 289975)
+++ trunk/Source/WebCore/platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp	2022-02-16 23:45:09 UTC (rev 289976)
@@ -562,7 +562,7 @@
     append(createCommand<DrawNativeImage>(nativeImage.platformImage(), destRect, srcRect, ImagePaintingOptions(options, state.imageInterpolationQuality), state.alpha, Cairo::ShadowState(state)));
 }
 
-void CairoOperationRecorder::drawPattern(NativeImage& nativeImage, const FloatSize& imageSize, const FloatRect& destRect, const FloatRect& tileRect, const AffineTransform& patternTransform, const FloatPoint& phase, const FloatSize& spacing, const ImagePaintingOptions& options)
+void CairoOperationRecorder::drawPattern(NativeImage& nativeImage, const FloatRect& destRect, const FloatRect& tileRect, const AffineTransform& patternTransform, const FloatPoint& phase, const FloatSize& spacing, const ImagePaintingOptions& options)
 {
     struct DrawPattern final : PaintingOperation, OperationData<RefPtr<cairo_surface_t>, IntSize, FloatRect, FloatRect, AffineTransform, FloatPoint, ImagePaintingOptions> {
         virtual ~DrawPattern() = default;
@@ -579,7 +579,7 @@
     };
 
     UNUSED_PARAM(spacing);
-    append(createCommand<DrawPattern>(nativeImage.platformImage(), IntSize(imageSize), destRect, tileRect, patternTransform, phase, options));
+    append(createCommand<DrawPattern>(nativeImage.platformImage(), nativeImage.size(), destRect, tileRect, patternTransform, phase, options));
 }
 
 void CairoOperationRecorder::drawRect(const FloatRect& rect, float borderThickness)

Modified: trunk/Source/WebCore/platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.h (289975 => 289976)


--- trunk/Source/WebCore/platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.h	2022-02-16 23:35:12 UTC (rev 289975)
+++ trunk/Source/WebCore/platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.h	2022-02-16 23:45:09 UTC (rev 289976)
@@ -66,7 +66,7 @@
 
     void drawImageBuffer(WebCore::ImageBuffer&, const WebCore::FloatRect& destination, const WebCore::FloatRect& source, const WebCore::ImagePaintingOptions&) override;
     void drawNativeImage(WebCore::NativeImage&, const WebCore::FloatSize&, const WebCore::FloatRect&, const WebCore::FloatRect&, const WebCore::ImagePaintingOptions&) override;
-    void drawPattern(WebCore::NativeImage&, const WebCore::FloatSize&, const WebCore::FloatRect&, const WebCore::FloatRect&, const WebCore::AffineTransform&, const WebCore::FloatPoint&, const WebCore::FloatSize&, const WebCore::ImagePaintingOptions&) override;
+    void drawPattern(WebCore::NativeImage&, const WebCore::FloatRect&, const WebCore::FloatRect&, const WebCore::AffineTransform&, const WebCore::FloatPoint&, const WebCore::FloatSize&, const WebCore::ImagePaintingOptions&) override;
 
     void drawRect(const WebCore::FloatRect&, float) override;
     void drawLine(const WebCore::FloatPoint&, const WebCore::FloatPoint&) override;

Modified: trunk/Source/WebKit/ChangeLog (289975 => 289976)


--- trunk/Source/WebKit/ChangeLog	2022-02-16 23:35:12 UTC (rev 289975)
+++ trunk/Source/WebKit/ChangeLog	2022-02-16 23:45:09 UTC (rev 289976)
@@ -1,3 +1,20 @@
+2022-02-16  Said Abou-Hallawa  <s...@apple.com>
+
+        [GPU Process] Route the call to ImageBuffer::drawPattern() through GraphicsContext
+        https://bugs.webkit.org/show_bug.cgi?id=236638
+
+        Reviewed by Simon Fraser.
+
+        * GPUProcess/graphics/RemoteDisplayListRecorder.cpp:
+        (WebKit::RemoteDisplayListRecorder::drawPattern):
+        (WebKit::RemoteDisplayListRecorder::drawPatternWithQualifiedIdentifier):
+        * GPUProcess/graphics/RemoteDisplayListRecorder.h:
+        * GPUProcess/graphics/RemoteDisplayListRecorder.messages.in:
+        * WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp:
+        (WebKit::RemoteDisplayListRecorderProxy::recordDrawPattern):
+        * WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h:
+        (WebKit::RemoteDisplayListRecorderProxy::recordDrawPattern):
+
 2022-02-16  Per Arne Vollan  <pvol...@apple.com>
 
         [iOS][macOS] Block access to Icon Services

Modified: trunk/Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.cpp (289975 => 289976)


--- trunk/Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.cpp	2022-02-16 23:35:12 UTC (rev 289975)
+++ trunk/Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.cpp	2022-02-16 23:45:09 UTC (rev 289976)
@@ -283,22 +283,22 @@
     handleItem(DisplayList::DrawNativeImage(imageIdentifier.object(), imageSize, destRect, srcRect, options), *image);
 }
 
-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)
+void RemoteDisplayListRecorder::drawPattern(RenderingResourceIdentifier imageIdentifier, const FloatRect& destRect, const FloatRect& tileRect, const AffineTransform& transform, const FloatPoint& phase, const FloatSize& spacing, const ImagePaintingOptions& options)
 {
     // Immediately turn the RenderingResourceIdentifier (which is error-prone) to a QualifiedRenderingResourceIdentifier,
     // and use a helper function to make sure that don't accidentally use the RenderingResourceIdentifier (because the helper function can't see it).
-    drawPatternWithQualifiedIdentifier({ imageIdentifier, m_webProcessIdentifier }, imageSize, destRect, tileRect, transform, phase, spacing, options);
+    drawPatternWithQualifiedIdentifier({ imageIdentifier, m_webProcessIdentifier }, destRect, tileRect, transform, phase, spacing, options);
 }
 
-void RemoteDisplayListRecorder::drawPatternWithQualifiedIdentifier(QualifiedRenderingResourceIdentifier imageIdentifier, const FloatSize& imageSize, const FloatRect& destRect, const FloatRect& tileRect, const AffineTransform& transform, const FloatPoint& phase, const FloatSize& spacing, const ImagePaintingOptions& options)
+void RemoteDisplayListRecorder::drawPatternWithQualifiedIdentifier(QualifiedRenderingResourceIdentifier imageIdentifier, 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) {
+    auto sourceImage = resourceCache().cachedSourceImage(imageIdentifier);
+    if (!sourceImage) {
         ASSERT_NOT_REACHED();
         return;
     }
 
-    handleItem(DisplayList::DrawPattern(imageIdentifier.object(), imageSize, destRect, tileRect, transform, phase, spacing, options), *image);
+    handleItem(DisplayList::DrawPattern(imageIdentifier.object(), destRect, tileRect, transform, phase, spacing, options), *sourceImage);
 }
 
 void RemoteDisplayListRecorder::beginTransparencyLayer(float opacity)

Modified: trunk/Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.h (289975 => 289976)


--- trunk/Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.h	2022-02-16 23:35:12 UTC (rev 289975)
+++ trunk/Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.h	2022-02-16 23:45:09 UTC (rev 289976)
@@ -82,7 +82,7 @@
     void drawFilteredImageBuffer(std::optional<WebCore::RenderingResourceIdentifier> sourceImageIdentifier, const WebCore::FloatRect& sourceImageRect, IPC::FilterReference);
     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 drawPattern(WebCore::RenderingResourceIdentifier imageIdentifier, 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);
@@ -135,7 +135,7 @@
     void drawGlyphsWithQualifiedIdentifier(WebCore::DisplayList::DrawGlyphs&&, QualifiedRenderingResourceIdentifier fontIdentifier);
     void drawImageBufferWithQualifiedIdentifier(QualifiedRenderingResourceIdentifier imageBufferIdentifier, const WebCore::FloatRect& destinationRect, const WebCore::FloatRect& srcRect, const WebCore::ImagePaintingOptions&);
     void drawNativeImageWithQualifiedIdentifier(QualifiedRenderingResourceIdentifier imageIdentifier, const WebCore::FloatSize& imageSize, const WebCore::FloatRect& destRect, const WebCore::FloatRect& srcRect, const WebCore::ImagePaintingOptions&);
-    void drawPatternWithQualifiedIdentifier(QualifiedRenderingResourceIdentifier 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 drawPatternWithQualifiedIdentifier(QualifiedRenderingResourceIdentifier imageIdentifier, const WebCore::FloatRect& destRect, const WebCore::FloatRect& tileRect, const WebCore::AffineTransform&, const WebCore::FloatPoint&, const WebCore::FloatSize& spacing, const WebCore::ImagePaintingOptions&);
 
     RemoteResourceCache& resourceCache();
     WebCore::GraphicsContext& drawingContext();

Modified: trunk/Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.messages.in (289975 => 289976)


--- trunk/Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.messages.in	2022-02-16 23:35:12 UTC (rev 289975)
+++ trunk/Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.messages.in	2022-02-16 23:45:09 UTC (rev 289976)
@@ -48,7 +48,7 @@
     DrawFilteredImageBuffer(std::optional<WebCore::RenderingResourceIdentifier> sourceImageIdentifier, WebCore::FloatRect sourceImageRect, IPC::FilterReference filter)
     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)
+    DrawPattern(WebCore::RenderingResourceIdentifier imageIdentifier, 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)

Modified: trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp (289975 => 289976)


--- trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp	2022-02-16 23:35:12 UTC (rev 289975)
+++ trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp	2022-02-16 23:45:09 UTC (rev 289976)
@@ -203,9 +203,9 @@
     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)
+void RemoteDisplayListRecorderProxy::recordDrawPattern(RenderingResourceIdentifier imageIdentifier, 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));
+    send(Messages::RemoteDisplayListRecorder::DrawPattern(imageIdentifier, destRect, tileRect, transform, phase, spacing, options));
 }
 
 void RemoteDisplayListRecorderProxy::recordBeginTransparencyLayer(float opacity)

Modified: trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h (289975 => 289976)


--- trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h	2022-02-16 23:35:12 UTC (rev 289975)
+++ trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h	2022-02-16 23:45:09 UTC (rev 289976)
@@ -91,7 +91,7 @@
     void recordDrawGlyphs(const WebCore::Font&, const WebCore::GlyphBufferGlyph*, const WebCore::GlyphBufferAdvance*, unsigned count, const WebCore::FloatPoint& localAnchor, WebCore::FontSmoothingMode) final;
     void recordDrawImageBuffer(WebCore::ImageBuffer&, 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 recordDrawPattern(WebCore::RenderingResourceIdentifier, 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;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to