Title: [291442] trunk/Source/WebCore
Revision
291442
Author
[email protected]
Date
2022-03-17 14:21:22 -0700 (Thu, 17 Mar 2022)

Log Message

[GTK][WPE] m_compositorThread ASSERT in TextureMapper classes can just be used in debug mode
https://bugs.webkit.org/show_bug.cgi?id=238020

Patch by Alejandro G. Castro <[email protected]> on 2022-03-17
Reviewed by Michael Catanzaro.

This is a build fix for the case where someone compiles release
with asserts activated.

* platform/graphics/texmap/TextureMapperPlatformLayerProxyDMABuf.cpp:
(WebCore::TextureMapperPlatformLayerProxyDMABuf::activateOnCompositingThread):
(WebCore::TextureMapperPlatformLayerProxyDMABuf::invalidate):
* platform/graphics/texmap/TextureMapperPlatformLayerProxyDMABuf.h:
* platform/graphics/texmap/TextureMapperPlatformLayerProxyGL.cpp:
(WebCore::TextureMapperPlatformLayerProxyGL::activateOnCompositingThread):
(WebCore::TextureMapperPlatformLayerProxyGL::invalidate):
* platform/graphics/texmap/TextureMapperPlatformLayerProxyGL.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (291441 => 291442)


--- trunk/Source/WebCore/ChangeLog	2022-03-17 21:19:27 UTC (rev 291441)
+++ trunk/Source/WebCore/ChangeLog	2022-03-17 21:21:22 UTC (rev 291442)
@@ -1,3 +1,22 @@
+2022-03-17  Alejandro G. Castro  <[email protected]>
+
+        [GTK][WPE] m_compositorThread ASSERT in TextureMapper classes can just be used in debug mode
+        https://bugs.webkit.org/show_bug.cgi?id=238020
+
+        Reviewed by Michael Catanzaro.
+
+        This is a build fix for the case where someone compiles release
+        with asserts activated.
+
+        * platform/graphics/texmap/TextureMapperPlatformLayerProxyDMABuf.cpp:
+        (WebCore::TextureMapperPlatformLayerProxyDMABuf::activateOnCompositingThread):
+        (WebCore::TextureMapperPlatformLayerProxyDMABuf::invalidate):
+        * platform/graphics/texmap/TextureMapperPlatformLayerProxyDMABuf.h:
+        * platform/graphics/texmap/TextureMapperPlatformLayerProxyGL.cpp:
+        (WebCore::TextureMapperPlatformLayerProxyGL::activateOnCompositingThread):
+        (WebCore::TextureMapperPlatformLayerProxyGL::invalidate):
+        * platform/graphics/texmap/TextureMapperPlatformLayerProxyGL.h:
+
 2022-03-17  Alex Christensen  <[email protected]>
 
         PerformanceNavigationTiming Response Start unavailable when using Service Worker Cache

Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxyDMABuf.cpp (291441 => 291442)


--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxyDMABuf.cpp	2022-03-17 21:19:27 UTC (rev 291441)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxyDMABuf.cpp	2022-03-17 21:21:22 UTC (rev 291442)
@@ -95,7 +95,7 @@
 
 void TextureMapperPlatformLayerProxyDMABuf::activateOnCompositingThread(Compositor* compositor, TextureMapperLayer* targetLayer)
 {
-#ifndef NDEBUG
+#if ASSERT_ENABLED
     if (!m_compositorThread)
         m_compositorThread = &Thread::current();
 #endif
@@ -113,7 +113,7 @@
 void TextureMapperPlatformLayerProxyDMABuf::invalidate()
 {
     ASSERT(m_compositorThread == &Thread::current());
-#ifndef NDEBUG
+#if ASSERT_ENABLED
     m_compositorThread = nullptr;
 #endif
 

Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxyDMABuf.h (291441 => 291442)


--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxyDMABuf.h	2022-03-17 21:19:27 UTC (rev 291441)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxyDMABuf.h	2022-03-17 21:21:22 UTC (rev 291442)
@@ -93,7 +93,7 @@
 private:
     void pushDMABuf(Ref<DMABufLayer>&&);
 
-#ifndef NDEBUG
+#if ASSERT_ENABLED
     RefPtr<Thread> m_compositorThread;
 #endif
 

Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxyGL.cpp (291441 => 291442)


--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxyGL.cpp	2022-03-17 21:19:27 UTC (rev 291441)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxyGL.cpp	2022-03-17 21:21:22 UTC (rev 291442)
@@ -54,7 +54,7 @@
 
 void TextureMapperPlatformLayerProxyGL::activateOnCompositingThread(Compositor* compositor, TextureMapperLayer* targetLayer)
 {
-#ifndef NDEBUG
+#if ASSERT_ENABLED
     if (!m_compositorThread)
         m_compositorThread = &Thread::current();
 #endif
@@ -87,13 +87,13 @@
 void TextureMapperPlatformLayerProxyGL::invalidate()
 {
     ASSERT(m_compositorThread == &Thread::current());
+#if ASSERT_ENABLED
+    m_compositorThread = nullptr;
+#endif
     Function<void()> updateFunction;
     {
         Locker locker { m_lock };
         m_compositor = nullptr;
-#ifndef NDEBUG
-        m_compositorThread = nullptr;
-#endif
         m_targetLayer = nullptr;
 
         m_currentBuffer = nullptr;

Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxyGL.h (291441 => 291442)


--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxyGL.h	2022-03-17 21:19:27 UTC (rev 291441)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxyGL.h	2022-03-17 21:21:22 UTC (rev 291442)
@@ -75,7 +75,7 @@
     Vector<std::unique_ptr<TextureMapperPlatformLayerBuffer>> m_usedBuffers;
     std::unique_ptr<RunLoop::Timer<TextureMapperPlatformLayerProxyGL>> m_releaseUnusedBuffersTimer;
 
-#ifndef NDEBUG
+#if ASSERT_ENABLED
     RefPtr<Thread> m_compositorThread;
 #endif
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to