Title: [274373] trunk
Revision
274373
Author
[email protected]
Date
2021-03-12 15:52:47 -0800 (Fri, 12 Mar 2021)

Log Message

[GPU Process] inspector/canvas/memory.html fails when GPU rendering is enabled for 2D Canvas
https://bugs.webkit.org/show_bug.cgi?id=222880

Reviewed by Tim Horton.

Source/WebCore:

RemoteImageBufferProxy has to ensure its backend is created in the GPUP
before reporting its memory cost.

* platform/graphics/ConcreteImageBuffer.h:

LayoutTests:

Enable GPUP rendering for 2D canvas for this test.

* inspector/canvas/memory.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (274372 => 274373)


--- trunk/LayoutTests/ChangeLog	2021-03-12 23:14:55 UTC (rev 274372)
+++ trunk/LayoutTests/ChangeLog	2021-03-12 23:52:47 UTC (rev 274373)
@@ -1,3 +1,14 @@
+2021-03-12  Said Abou-Hallawa  <[email protected]>
+
+        [GPU Process] inspector/canvas/memory.html fails when GPU rendering is enabled for 2D Canvas
+        https://bugs.webkit.org/show_bug.cgi?id=222880
+
+        Reviewed by Tim Horton.
+
+        Enable GPUP rendering for 2D canvas for this test.
+
+        * inspector/canvas/memory.html:
+
 2021-03-12  Robert Jenner  <[email protected]>
 
         [ MacOS wk2 ] inspector/debugger/breakpoints/resolved-dump-all-inline-script-pause-locations.html is flakey timing out

Modified: trunk/LayoutTests/inspector/canvas/memory.html (274372 => 274373)


--- trunk/LayoutTests/inspector/canvas/memory.html	2021-03-12 23:14:55 UTC (rev 274372)
+++ trunk/LayoutTests/inspector/canvas/memory.html	2021-03-12 23:52:47 UTC (rev 274373)
@@ -1,4 +1,3 @@
-<!-- webkit-test-runner [ UseGPUProcessForCanvasRenderingEnabled=false ] -->
 <!DOCTYPE html>
 <html>
 <head>

Modified: trunk/Source/WebCore/ChangeLog (274372 => 274373)


--- trunk/Source/WebCore/ChangeLog	2021-03-12 23:14:55 UTC (rev 274372)
+++ trunk/Source/WebCore/ChangeLog	2021-03-12 23:52:47 UTC (rev 274373)
@@ -1,3 +1,15 @@
+2021-03-12  Said Abou-Hallawa  <[email protected]>
+
+        [GPU Process] inspector/canvas/memory.html fails when GPU rendering is enabled for 2D Canvas
+        https://bugs.webkit.org/show_bug.cgi?id=222880
+
+        Reviewed by Tim Horton.
+
+        RemoteImageBufferProxy has to ensure its backend is created in the GPUP
+        before reporting its memory cost.
+
+        * platform/graphics/ConcreteImageBuffer.h:
+
 2021-03-12  Manuel Rego Casasnovas  <[email protected]>
 
         [selectors] :focus-visible matches body after keyboard event

Modified: trunk/Source/WebCore/platform/graphics/ConcreteImageBuffer.h (274372 => 274373)


--- trunk/Source/WebCore/platform/graphics/ConcreteImageBuffer.h	2021-03-12 23:14:55 UTC (rev 274372)
+++ trunk/Source/WebCore/platform/graphics/ConcreteImageBuffer.h	2021-03-12 23:52:47 UTC (rev 274373)
@@ -111,12 +111,16 @@
 
     size_t memoryCost() const override
     {
-        return m_backend ? m_backend->memoryCost() : 0;
+        if (auto* backend = ensureBackendCreated())
+            return m_backend->memoryCost();
+        return 0;
     }
 
     size_t externalMemoryCost() const override
     {
-        return m_backend ? m_backend->externalMemoryCost() : 0;
+        if (auto* backend = ensureBackendCreated())
+            return m_backend->externalMemoryCost();
+        return 0;
     }
 
     RefPtr<NativeImage> copyNativeImage(BackingStoreCopy copyBehavior = CopyBackingStore) const override
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to