Title: [269508] trunk/Source/WebCore
Revision
269508
Author
[email protected]
Date
2020-11-06 05:47:04 -0800 (Fri, 06 Nov 2020)

Log Message

REGRESSION(r269503): [GTK][WPE] >200 tests are failing
https://bugs.webkit.org/show_bug.cgi?id=218654

Reviewed by Žan Doberšek.

Implement GraphicsContextImplCairo::drawImageBuffer. Prior to r269503,
this function had an error return code, but this was removed and so
its implementation is now mandatory.

* platform/graphics/cairo/GraphicsContextImplCairo.cpp:
(WebCore::GraphicsContextImplCairo::drawImageBuffer):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (269507 => 269508)


--- trunk/Source/WebCore/ChangeLog	2020-11-06 10:09:15 UTC (rev 269507)
+++ trunk/Source/WebCore/ChangeLog	2020-11-06 13:47:04 UTC (rev 269508)
@@ -1,3 +1,17 @@
+2020-11-06  Chris Lord  <[email protected]>
+
+        REGRESSION(r269503): [GTK][WPE] >200 tests are failing
+        https://bugs.webkit.org/show_bug.cgi?id=218654
+
+        Reviewed by Žan Doberšek.
+
+        Implement GraphicsContextImplCairo::drawImageBuffer. Prior to r269503,
+        this function had an error return code, but this was removed and so
+        its implementation is now mandatory.
+
+        * platform/graphics/cairo/GraphicsContextImplCairo.cpp:
+        (WebCore::GraphicsContextImplCairo::drawImageBuffer):
+
 2020-11-06  Martin Robinson  <[email protected]>
 
         Scroll snap specified on :root doesn't work

Modified: trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextImplCairo.cpp (269507 => 269508)


--- trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextImplCairo.cpp	2020-11-06 10:09:15 UTC (rev 269507)
+++ trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextImplCairo.cpp	2020-11-06 13:47:04 UTC (rev 269508)
@@ -279,9 +279,12 @@
     return GraphicsContextImpl::drawTiledImageImpl(graphicsContext(), image, destination, source, tileScaleFactor, hRule, vRule, imagePaintingOptions);
 }
 
-void GraphicsContextImplCairo::drawImageBuffer(ImageBuffer&, const FloatRect&, const FloatRect&, const ImagePaintingOptions&)
+void GraphicsContextImplCairo::drawImageBuffer(ImageBuffer& image, const FloatRect& destRect, const FloatRect& srcRect, const ImagePaintingOptions& options)
 {
-    // FIXME: Not implemented.
+    if (auto nativeImage = image.copyNativeImage(DontCopyBackingStore)) {
+        auto& state = graphicsContext().state();
+        Cairo::drawNativeImage(m_platformContext, nativeImage.get(), destRect, srcRect, { options, state.imageInterpolationQuality }, state.alpha, Cairo::ShadowState(state));
+    }
 }
 
 void GraphicsContextImplCairo::drawNativeImage(const NativeImagePtr& image, const FloatSize& imageSize, const FloatRect& destRect, const FloatRect& srcRect, const ImagePaintingOptions& options)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to