Title: [278820] trunk/Source/WebCore
Revision
278820
Author
wei...@apple.com
Date
2021-06-13 11:42:45 -0700 (Sun, 13 Jun 2021)

Log Message

SimulatedXRDevice::shutDownTrackingAndRendering() should clear it's GraphicsContextGL to ensure the resource is cleaned up quickly
https://bugs.webkit.org/show_bug.cgi?id=226947

Reviewed by Dean Jackson.

SimulatedXRDevice::shutDownTrackingAndRendering() needs to clear its GraphicsContextGL
to ensure the resource is cleaned up quickly, and doesn't wait for GC to be reclaimed.
Without this, we can run out of GraphicsContextGLs and fail tests if GC happens to be
running a bit behind.

* testing/WebFakeXRDevice.cpp:
(WebCore::SimulatedXRDevice::shutDownTrackingAndRendering):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (278819 => 278820)


--- trunk/Source/WebCore/ChangeLog	2021-06-13 18:29:46 UTC (rev 278819)
+++ trunk/Source/WebCore/ChangeLog	2021-06-13 18:42:45 UTC (rev 278820)
@@ -1,3 +1,18 @@
+2021-06-13  Sam Weinig  <wei...@apple.com>
+
+        SimulatedXRDevice::shutDownTrackingAndRendering() should clear it's GraphicsContextGL to ensure the resource is cleaned up quickly
+        https://bugs.webkit.org/show_bug.cgi?id=226947
+
+        Reviewed by Dean Jackson.
+
+        SimulatedXRDevice::shutDownTrackingAndRendering() needs to clear its GraphicsContextGL
+        to ensure the resource is cleaned up quickly, and doesn't wait for GC to be reclaimed. 
+        Without this, we can run out of GraphicsContextGLs and fail tests if GC happens to be
+        running a bit behind.
+
+        * testing/WebFakeXRDevice.cpp:
+        (WebCore::SimulatedXRDevice::shutDownTrackingAndRendering):
+
 2021-06-13  Alan Bujtas  <za...@apple.com>
 
         [LFC][TFC] Add support for over-constrained cases for available space distribution

Modified: trunk/Source/WebCore/testing/WebFakeXRDevice.cpp (278819 => 278820)


--- trunk/Source/WebCore/testing/WebFakeXRDevice.cpp	2021-06-13 18:29:46 UTC (rev 278819)
+++ trunk/Source/WebCore/testing/WebFakeXRDevice.cpp	2021-06-13 18:42:45 UTC (rev 278820)
@@ -133,6 +133,7 @@
     if (m_gl) {
         for (auto layer : m_layers)
             m_gl->deleteTexture(layer.value);
+        m_gl = nullptr;
     }
     m_layers.clear();
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to