Title: [210542] trunk/Source/WebCore
Revision
210542
Author
[email protected]
Date
2017-01-10 04:29:36 -0800 (Tue, 10 Jan 2017)

Log Message

[TexMap] Use WTF::Function in TextureMapperPlatformLayerProxy
https://bugs.webkit.org/show_bug.cgi?id=166853

Reviewed by Michael Catanzaro.

Use WTF::Function in the TextureMapperPlatformLayerProxy, instead of
the std::function bloat.

* platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp:
(WebCore::TextureMapperPlatformLayerProxy::scheduleUpdateOnCompositorThread):
(WebCore::TextureMapperPlatformLayerProxy::compositorThreadUpdateTimerFired):
* platform/graphics/texmap/TextureMapperPlatformLayerProxy.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (210541 => 210542)


--- trunk/Source/WebCore/ChangeLog	2017-01-10 12:28:46 UTC (rev 210541)
+++ trunk/Source/WebCore/ChangeLog	2017-01-10 12:29:36 UTC (rev 210542)
@@ -1,5 +1,20 @@
 2017-01-10  Zan Dobersek  <[email protected]>
 
+        [TexMap] Use WTF::Function in TextureMapperPlatformLayerProxy
+        https://bugs.webkit.org/show_bug.cgi?id=166853
+
+        Reviewed by Michael Catanzaro.
+
+        Use WTF::Function in the TextureMapperPlatformLayerProxy, instead of
+        the std::function bloat.
+
+        * platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp:
+        (WebCore::TextureMapperPlatformLayerProxy::scheduleUpdateOnCompositorThread):
+        (WebCore::TextureMapperPlatformLayerProxy::compositorThreadUpdateTimerFired):
+        * platform/graphics/texmap/TextureMapperPlatformLayerProxy.h:
+
+2017-01-10  Zan Dobersek  <[email protected]>
+
         [TextureMapper] TextureMapperPlatformLayerProxy::swapBuffers() should hold the lock throughout invocation
         https://bugs.webkit.org/show_bug.cgi?id=166852
 

Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp (210541 => 210542)


--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp	2017-01-10 12:28:46 UTC (rev 210541)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp	2017-01-10 12:29:36 UTC (rev 210542)
@@ -152,7 +152,7 @@
         m_usedBuffers.append(WTFMove(prevBuffer));
 }
 
-bool TextureMapperPlatformLayerProxy::scheduleUpdateOnCompositorThread(std::function<void()>&& updateFunction)
+bool TextureMapperPlatformLayerProxy::scheduleUpdateOnCompositorThread(Function<void()>&& updateFunction)
 {
     LockHolder locker(m_lock);
     if (!m_compositorThreadUpdateTimer)
@@ -165,7 +165,7 @@
 
 void TextureMapperPlatformLayerProxy::compositorThreadUpdateTimerFired()
 {
-    std::function<void()> updateFunction;
+    Function<void()> updateFunction;
     {
         LockHolder locker(m_lock);
         if (!m_compositorThreadUpdateFunction)

Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxy.h (210541 => 210542)


--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxy.h	2017-01-10 12:28:46 UTC (rev 210541)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxy.h	2017-01-10 12:29:36 UTC (rev 210542)
@@ -32,6 +32,7 @@
 #include "TextureMapper.h"
 #include "TransformationMatrix.h"
 #include <wtf/Condition.h>
+#include <wtf/Function.h>
 #include <wtf/Lock.h>
 #include <wtf/RunLoop.h>
 #include <wtf/ThreadSafeRefCounted.h>
@@ -77,7 +78,7 @@
 
     void swapBuffer();
 
-    bool scheduleUpdateOnCompositorThread(std::function<void()>&&);
+    bool scheduleUpdateOnCompositorThread(Function<void()>&&);
 
 private:
     void scheduleReleaseUnusedBuffers();
@@ -100,7 +101,7 @@
 
     void compositorThreadUpdateTimerFired();
     std::unique_ptr<RunLoop::Timer<TextureMapperPlatformLayerProxy>> m_compositorThreadUpdateTimer;
-    std::function<void()> m_compositorThreadUpdateFunction;
+    Function<void()> m_compositorThreadUpdateFunction;
 };
 
 } // namespace WebCore
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to