Title: [157704] trunk/Source/WebCore
Revision
157704
Author
[email protected]
Date
2013-10-20 11:33:58 -0700 (Sun, 20 Oct 2013)

Log Message

Avoid unnecessary vector copy in AnimationController event dispatch.
<https://webkit.org/b/122994>

Use Vector's move constructor instead of making a copy of the pending
events queue and then clearing it.

Reviewed by Simon Fraser.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (157703 => 157704)


--- trunk/Source/WebCore/ChangeLog	2013-10-20 16:36:41 UTC (rev 157703)
+++ trunk/Source/WebCore/ChangeLog	2013-10-20 18:33:58 UTC (rev 157704)
@@ -1,3 +1,13 @@
+2013-10-20  Andreas Kling  <[email protected]>
+
+        Avoid unnecessary vector copy in AnimationController event dispatch.
+        <https://webkit.org/b/122994>
+
+        Use Vector's move constructor instead of making a copy of the pending
+        events queue and then clearing it.
+
+        Reviewed by Simon Fraser.
+
 2013-10-19  Brady Eidson  <[email protected]>
 
         Add abstract IDBBackingStoreInterface, use it to get IDBDatabaseBackendLevelDB closer to going cross-platform

Modified: trunk/Source/WebCore/page/animation/AnimationController.cpp (157703 => 157704)


--- trunk/Source/WebCore/page/animation/AnimationController.cpp	2013-10-20 16:36:41 UTC (rev 157703)
+++ trunk/Source/WebCore/page/animation/AnimationController.cpp	2013-10-20 18:33:58 UTC (rev 157704)
@@ -167,8 +167,7 @@
     bool updateStyle = !m_eventsToDispatch.isEmpty() || !m_nodeChangesToDispatch.isEmpty();
 
     // fire all the events
-    Vector<EventToDispatch> eventsToDispatch = m_eventsToDispatch;
-    m_eventsToDispatch.clear();
+    Vector<EventToDispatch> eventsToDispatch = std::move(m_eventsToDispatch);
     Vector<EventToDispatch>::const_iterator eventsToDispatchEnd = eventsToDispatch.end();
     for (Vector<EventToDispatch>::const_iterator it = eventsToDispatch.begin(); it != eventsToDispatchEnd; ++it) {
         Element* element = it->element.get();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to