Title: [267459] trunk/Source/WebKit
Revision
267459
Author
[email protected]
Date
2020-09-22 20:41:44 -0700 (Tue, 22 Sep 2020)

Log Message

[GPU Process] fast/canvas/canvas-blend-image.html and fast/canvas/canvas-blend-solid.html fail on macOS
https://bugs.webkit.org/show_bug.cgi?id=216860

Reviewed by Said Abou-Hallawa.

These two tests disable accelerated drawing for canvas elements; when using the GPU process, this causes us to
use `ImageBufferShareableBitmapBackend` as the back-end for the image buffer backing the canvas element.

On both macOS and iOS, the image buffer is backed by BGRA image data. However, we override
`backendColorFormat()` and return `ColorFormat::BGRA` only for `PLATFORM(IOS_FAMILY)`, causing `putImageData`
and `getImageData` to result in flipped red and blue channels on macOS, which subsequently causes these two
layout tests to fail.

Fix these tests by removing the `PLATFORM(IOS_FAMILY)` guard.

* WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.h:

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (267458 => 267459)


--- trunk/Source/WebKit/ChangeLog	2020-09-23 03:38:17 UTC (rev 267458)
+++ trunk/Source/WebKit/ChangeLog	2020-09-23 03:41:44 UTC (rev 267459)
@@ -1,3 +1,22 @@
+2020-09-22  Wenson Hsieh  <[email protected]>
+
+        [GPU Process] fast/canvas/canvas-blend-image.html and fast/canvas/canvas-blend-solid.html fail on macOS
+        https://bugs.webkit.org/show_bug.cgi?id=216860
+
+        Reviewed by Said Abou-Hallawa.
+
+        These two tests disable accelerated drawing for canvas elements; when using the GPU process, this causes us to
+        use `ImageBufferShareableBitmapBackend` as the back-end for the image buffer backing the canvas element.
+
+        On both macOS and iOS, the image buffer is backed by BGRA image data. However, we override
+        `backendColorFormat()` and return `ColorFormat::BGRA` only for `PLATFORM(IOS_FAMILY)`, causing `putImageData`
+        and `getImageData` to result in flipped red and blue channels on macOS, which subsequently causes these two
+        layout tests to fail.
+
+        Fix these tests by removing the `PLATFORM(IOS_FAMILY)` guard.
+
+        * WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.h:
+
 2020-09-22  Commit Queue  <[email protected]>
 
         Unreviewed, reverting r267421.

Modified: trunk/Source/WebKit/WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.h (267458 => 267459)


--- trunk/Source/WebKit/WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.h	2020-09-23 03:38:17 UTC (rev 267458)
+++ trunk/Source/WebKit/WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.h	2020-09-23 03:41:44 UTC (rev 267459)
@@ -60,9 +60,7 @@
     void putImageData(WebCore::AlphaPremultiplication inputFormat, const WebCore::ImageData&, const WebCore::IntRect& srcRect, const WebCore::IntPoint& destPoint, WebCore::AlphaPremultiplication destFormat) override;
 
 private:
-#if PLATFORM(IOS_FAMILY)
     ColorFormat backendColorFormat() const override { return ColorFormat::BGRA; }
-#endif
 
     RefPtr<ShareableBitmap> m_bitmap;
     std::unique_ptr<WebCore::GraphicsContext> m_context;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to