Title: [273406] trunk
Revision
273406
Author
s...@apple.com
Date
2021-02-24 09:51:55 -0800 (Wed, 24 Feb 2021)

Log Message

[GPU Process] Implement ImageBufferShareableBitmapBackend::bytesPerRow()
https://bugs.webkit.org/show_bug.cgi?id=222348

Reviewed by Simon Fraser.

Source/WebKit:

The default implementation ImageBufferBackend::bytesPerRow() is not correct
for ImageBufferShareableBitmapBackend because ShareableBitmap aligns the
rows using IOSurfaceAlignProperty(kIOSurfaceBytesPerRow, ...).

* Shared/ShareableBitmap.h:
(WebKit::ShareableBitmap::bytesPerRow const):
* WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.cpp:
(WebKit::ImageBufferShareableBitmapBackend::bytesPerRow const):
* WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.h:

LayoutTests:

* gpu-process/TestExpectations:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (273405 => 273406)


--- trunk/LayoutTests/ChangeLog	2021-02-24 17:26:46 UTC (rev 273405)
+++ trunk/LayoutTests/ChangeLog	2021-02-24 17:51:55 UTC (rev 273406)
@@ -1,3 +1,12 @@
+2021-02-24  Said Abou-Hallawa  <s...@apple.com>
+
+        [GPU Process] Implement ImageBufferShareableBitmapBackend::bytesPerRow()
+        https://bugs.webkit.org/show_bug.cgi?id=222348
+
+        Reviewed by Simon Fraser.
+
+        * gpu-process/TestExpectations:
+
 2021-02-24  Zalan Bujtas  <za...@apple.com>
 
         [LegacyLineLayout] Inline level box should not stick out at the bottom of its containing block

Modified: trunk/LayoutTests/gpu-process/TestExpectations (273405 => 273406)


--- trunk/LayoutTests/gpu-process/TestExpectations	2021-02-24 17:26:46 UTC (rev 273405)
+++ trunk/LayoutTests/gpu-process/TestExpectations	2021-02-24 17:51:55 UTC (rev 273406)
@@ -13,7 +13,6 @@
 fast/canvas/canvas-blend-image.html [ Failure Pass ]
 fast/canvas/canvas-blend-solid.html [ Failure Pass ]
 fast/canvas/canvas-drawImage-composite-copy.html [ ImageOnlyFailure ]
-fast/canvas/canvas-large-dimensions.html [ Failure ]
 fast/canvas/canvas-render-layer.html [ Failure ]
 fast/canvas/hidpi-repaint-on-retina-leaves-bits-behind.html [ ImageOnlyFailure ]
 fast/canvas/webgl/tex-image-and-sub-image-2d-with-video-rgb565.html [ Failure ]

Modified: trunk/Source/WebKit/ChangeLog (273405 => 273406)


--- trunk/Source/WebKit/ChangeLog	2021-02-24 17:26:46 UTC (rev 273405)
+++ trunk/Source/WebKit/ChangeLog	2021-02-24 17:51:55 UTC (rev 273406)
@@ -1,3 +1,20 @@
+2021-02-24  Said Abou-Hallawa  <s...@apple.com>
+
+        [GPU Process] Implement ImageBufferShareableBitmapBackend::bytesPerRow()
+        https://bugs.webkit.org/show_bug.cgi?id=222348
+
+        Reviewed by Simon Fraser.
+
+        The default implementation ImageBufferBackend::bytesPerRow() is not correct
+        for ImageBufferShareableBitmapBackend because ShareableBitmap aligns the
+        rows using IOSurfaceAlignProperty(kIOSurfaceBytesPerRow, ...).
+
+        * Shared/ShareableBitmap.h:
+        (WebKit::ShareableBitmap::bytesPerRow const):
+        * WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.cpp:
+        (WebKit::ImageBufferShareableBitmapBackend::bytesPerRow const):
+        * WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.h:
+
 2021-02-24  Carlos Garcia Campos  <cgar...@igalia.com>
 
         REGRESSION(r267763): [GTK][WPE] user preferred languages are sent to the wrong network process

Modified: trunk/Source/WebKit/Shared/ShareableBitmap.h (273405 => 273406)


--- trunk/Source/WebKit/Shared/ShareableBitmap.h	2021-02-24 17:26:46 UTC (rev 273405)
+++ trunk/Source/WebKit/Shared/ShareableBitmap.h	2021-02-24 17:51:55 UTC (rev 273406)
@@ -167,6 +167,8 @@
 
 public:
     void* data() const;
+    size_t bytesPerRow() const { return calculateBytesPerRow(m_size, m_configuration).unsafeGet(); }
+    
 private:
     size_t sizeInBytes() const { return numBytesForSize(m_size, m_configuration).unsafeGet(); }
 

Modified: trunk/Source/WebKit/WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.cpp (273405 => 273406)


--- trunk/Source/WebKit/WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.cpp	2021-02-24 17:26:46 UTC (rev 273405)
+++ trunk/Source/WebKit/WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.cpp	2021-02-24 17:51:55 UTC (rev 273406)
@@ -103,6 +103,11 @@
     return m_bitmap->size();
 }
 
+unsigned ImageBufferShareableBitmapBackend::bytesPerRow() const
+{
+    return m_bitmap->bytesPerRow();
+}
+
 RefPtr<NativeImage> ImageBufferShareableBitmapBackend::copyNativeImage(BackingStoreCopy) const
 {
     return NativeImage::create(m_bitmap->createPlatformImage());

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


--- trunk/Source/WebKit/WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.h	2021-02-24 17:26:46 UTC (rev 273405)
+++ trunk/Source/WebKit/WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.h	2021-02-24 17:51:55 UTC (rev 273406)
@@ -62,6 +62,8 @@
     void putImageData(WebCore::AlphaPremultiplication inputFormat, const WebCore::ImageData&, const WebCore::IntRect& srcRect, const WebCore::IntPoint& destPoint, WebCore::AlphaPremultiplication destFormat) override;
 
 private:
+    unsigned bytesPerRow() const override;
+
     RefPtr<ShareableBitmap> m_bitmap;
     std::unique_ptr<WebCore::GraphicsContext> m_context;
 };
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to