Title: [270676] trunk/Source/WebCore
Revision
270676
Author
[email protected]
Date
2020-12-11 08:06:22 -0800 (Fri, 11 Dec 2020)

Log Message

REGRESSION (r270458): Canvas painting is broken when enabling GPU process for DOM
https://bugs.webkit.org/show_bug.cgi?id=219760

Reviewed by Tim Horton.

Use `ImageBuffer::logicalSize` instead of `ImageBuffer::backendSize` when overriding the CanvasBase's size, upon
changing image buffers. When enabling GPU process for DOM, `ImageBufferShareableIOSurfaceBackend::backendSize`
is empty because the actual IOSurface backend exists in the GPU process; using the backendSize instead of the
logical size here would otherwise cause us to always set CanvasBase's size to `(0, 0)`.

* html/CanvasBase.cpp:
(WebCore::CanvasBase::setImageBuffer const):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (270675 => 270676)


--- trunk/Source/WebCore/ChangeLog	2020-12-11 12:46:26 UTC (rev 270675)
+++ trunk/Source/WebCore/ChangeLog	2020-12-11 16:06:22 UTC (rev 270676)
@@ -1,3 +1,18 @@
+2020-12-10  Wenson Hsieh  <[email protected]>
+
+        REGRESSION (r270458): Canvas painting is broken when enabling GPU process for DOM
+        https://bugs.webkit.org/show_bug.cgi?id=219760
+
+        Reviewed by Tim Horton.
+
+        Use `ImageBuffer::logicalSize` instead of `ImageBuffer::backendSize` when overriding the CanvasBase's size, upon
+        changing image buffers. When enabling GPU process for DOM, `ImageBufferShareableIOSurfaceBackend::backendSize`
+        is empty because the actual IOSurface backend exists in the GPU process; using the backendSize instead of the
+        logical size here would otherwise cause us to always set CanvasBase's size to `(0, 0)`.
+
+        * html/CanvasBase.cpp:
+        (WebCore::CanvasBase::setImageBuffer const):
+
 2020-12-11  Miguel Gomez  <[email protected]>
 
         REGRESSION(r268923): [WPE] Nothing renders on the rpi3 using the proprietary video driver

Modified: trunk/Source/WebCore/html/CanvasBase.cpp (270675 => 270676)


--- trunk/Source/WebCore/html/CanvasBase.cpp	2020-12-11 12:46:26 UTC (rev 270675)
+++ trunk/Source/WebCore/html/CanvasBase.cpp	2020-12-11 16:06:22 UTC (rev 270676)
@@ -191,8 +191,8 @@
         returnBuffer = std::exchange(m_imageBuffer, WTFMove(buffer));
     }
 
-    if (m_imageBuffer && m_size != m_imageBuffer->backendSize())
-        m_size = m_imageBuffer->backendSize();
+    if (m_imageBuffer && m_size != m_imageBuffer->logicalSize())
+        m_size = m_imageBuffer->logicalSize();
 
     size_t previousMemoryCost = m_imageBufferCost;
     m_imageBufferCost = memoryCost();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to