Changeset 163959 in webkit
- Timestamp:
- Feb 12, 2014 9:10:25 AM (10 years ago)
- Location:
- trunk/Source
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r163948 r163959 1 2014-02-11 Brent Fulgham <bfulgham@apple.com> 2 3 Remove some unintended copies in ranged for loops 4 https://bugs.webkit.org/show_bug.cgi?id=128644 5 6 Reviewed by Anders Carlsson. 7 8 * inspector/InjectedScriptHost.cpp: 9 (Inspector::InjectedScriptHost::clearAllWrappers): Avoid creating/destroying 10 a std::pair<> and pointer each loop iteration. 11 * parser/Parser.cpp: 12 (JSC::Parser<LexerType>::Parser): Avoid copying object containing a string 13 each loop iteration. 14 1 15 2014-02-11 Ryosuke Niwa <rniwa@webkit.org> 2 16 -
trunk/Source/JavaScriptCore/inspector/InjectedScriptHost.cpp
r161563 r163959 73 73 void InjectedScriptHost::clearAllWrappers() 74 74 { 75 for (auto wrapper : m_wrappers)75 for (auto& wrapper : m_wrappers) 76 76 clearWrapperFromValue(wrapper.value.get()); 77 77 -
trunk/Source/JavaScriptCore/parser/Parser.cpp
r163844 r163959 238 238 parameter->collectBoundIdentifiers(boundParameterNames); 239 239 } 240 for (auto boundParameterName : boundParameterNames)240 for (auto& boundParameterName : boundParameterNames) 241 241 scope->declareVariable(&boundParameterName); 242 242 } -
trunk/Source/WebCore/ChangeLog
r163958 r163959 1 2014-02-11 Brent Fulgham <bfulgham@apple.com> 2 3 Remove some unintended copies in ranged for loops 4 https://bugs.webkit.org/show_bug.cgi?id=128644 5 6 Reviewed by Anders Carlsson. 7 8 * css/StyleResolver.cpp: 9 (WebCore::StyleResolver::loadPendingSVGDocuments): Avoid creating/destroying 10 RefPtrs in loop. 11 1 12 2014-02-12 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> 2 13 -
trunk/Source/WebCore/css/StyleResolver.cpp
r163888 r163959 3325 3325 3326 3326 CachedResourceLoader* cachedResourceLoader = state.document().cachedResourceLoader(); 3327 for (auto filterOperation : state.filtersWithPendingSVGDocuments())3327 for (auto& filterOperation : state.filtersWithPendingSVGDocuments()) 3328 3328 filterOperation->getOrCreateCachedSVGDocumentReference()->load(cachedResourceLoader); 3329 3329 -
trunk/Source/WebKit2/ChangeLog
r163958 r163959 1 2014-02-11 Brent Fulgham <bfulgham@apple.com> 2 3 Remove some unintended copies in ranged for loops 4 https://bugs.webkit.org/show_bug.cgi?id=128644 5 6 Reviewed by Anders Carlsson. 7 8 * Shared/WebCrossThreadCopier.cpp: 9 (WebCore::Vector<Vector<IDBKeyData>>>::copy): Each iteration copies a vector of 10 vectors, 11 * Shared/mac/RemoteLayerBackingStore.mm: 12 (RemoteLayerBackingStore::enumerateRectsBeingDrawn): Avoid copying a FloatRect 13 on each iteration. 14 * Shared/mac/RemoteLayerTreePropertyApplier.mm: 15 (WebKit::RemoteLayerTreePropertyApplier::applyPropertiesToLayer): Avoid copying 16 a LayerProperty object each iteration. 17 * UIProcess/GeolocationPermissionRequestManagerProxy.cpp: 18 (WebKit::GeolocationPermissionRequestManagerProxy::invalidateRequests): Avoid 19 copying a pair<int64_t, pointer> each iteration. 20 * UIProcess/Notifications/NotificationPermissionRequestManagerProxy.cpp: 21 (WebKit::NotificationPermissionRequestManagerProxy::invalidateRequests): Ditto 22 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp: 23 (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers): Ditto 24 * UIProcess/WebContext.cpp: 25 (WebKit::WebContext::postMessageToInjectedBundle): Avoid creating/destroying a 26 RefPtr each loop iteration. 27 * UIProcess/WebPageProxy.cpp: 28 (WebKit::WebPageProxy::shouldStartTrackingTouchEvents): Avoid copying a WebPlatformTouchPoint 29 object each cycle. 30 * UIProcess/mac/RemoteLayerTreeHost.mm: 31 (WebKit::RemoteLayerTreeHost::updateLayerTree): Avoid copying a pair each iteration. 32 * UIProcess/mac/WindowServerConnection.mm: 33 (WebKit::WindowServerConnection::WindowServerConnection): Avoid copying the struct 34 of occlusionNotificationHandlers each iteration. 35 * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp: 36 (WebKit::WebIDBServerConnection::put): Avoid copying a vector-of-vectors each 37 iteration. 38 * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp: 39 (PlatformCALayerRemote::recursiveBuildTransaction): Avoid creating/destroying a 40 RefPtr each loop iteration. 41 1 42 2014-02-12 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> 2 43 -
trunk/Source/WebKit2/Shared/WebCrossThreadCopier.cpp
r162911 r163959 71 71 Vector<Vector<IDBKeyData>> result; 72 72 73 for ( autokeys : vector) {73 for (const auto& keys : vector) { 74 74 result.append(Vector<IDBKeyData>()); 75 for ( autokey : keys)75 for (const auto& key : keys) 76 76 result.last().append(WebCore::CrossThreadCopier<IDBKeyData>::copy(key)); 77 77 } -
trunk/Source/WebKit2/Shared/mac/RemoteLayerBackingStore.mm
r163079 r163959 343 343 inverseTransform = CGAffineTransformTranslate(inverseTransform, 0, -m_size.height()); 344 344 345 for ( autorect : m_paintingRects) {345 for (const auto& rect : m_paintingRects) { 346 346 CGRect rectToDraw = CGRectApplyAffineTransform(rect, inverseTransform); 347 347 block(rectToDraw); -
trunk/Source/WebKit2/Shared/mac/RemoteLayerTreePropertyApplier.mm
r162453 r163959 103 103 if (properties.changedProperties & RemoteLayerTreeTransaction::ChildrenChanged) { 104 104 RetainPtr<NSMutableArray> children = adoptNS([[NSMutableArray alloc] initWithCapacity:properties.children.size()]); 105 for (auto child : properties.children)105 for (auto& child : properties.children) 106 106 [children addObject:relatedLayers.get(child)]; 107 107 layer.sublayers = children.get(); -
trunk/Source/WebKit2/UIProcess/GeolocationPermissionRequestManagerProxy.cpp
r159903 r163959 40 40 void GeolocationPermissionRequestManagerProxy::invalidateRequests() 41 41 { 42 for (auto request : m_pendingRequests.values())42 for (auto& request : m_pendingRequests.values()) 43 43 request->invalidate(); 44 44 -
trunk/Source/WebKit2/UIProcess/Notifications/NotificationPermissionRequestManagerProxy.cpp
r159903 r163959 41 41 void NotificationPermissionRequestManagerProxy::invalidateRequests() 42 42 { 43 for (auto request : m_pendingRequests.values())43 for (auto& request : m_pendingRequests.values()) 44 44 request->invalidate(); 45 45 -
trunk/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp
r163837 r163959 92 92 void RemoteScrollingCoordinatorProxy::connectStateNodeLayers(ScrollingStateTree& stateTree, const RemoteLayerTreeHost& layerTreeHost) 93 93 { 94 for (auto it : stateTree.nodeMap()) {94 for (auto& it : stateTree.nodeMap()) { 95 95 ScrollingStateNode* currNode = it.value; 96 96 switch (currNode->nodeType()) { -
trunk/Source/WebKit2/UIProcess/WebContext.cpp
r163844 r163959 815 815 } 816 816 817 for (auto process : m_processes) {817 for (auto& process : m_processes) { 818 818 // FIXME: Return early if the message body contains any references to WKPageRefs/WKFrameRefs etc. since they're local to a process. 819 819 IPC::ArgumentEncoder messageData; -
trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp
r163908 r163959 1405 1405 { 1406 1406 #if ENABLE(ASYNC_SCROLLING) 1407 for (auto touchPoint : touchStartEvent.touchPoints()) {1407 for (auto& touchPoint : touchStartEvent.touchPoints()) { 1408 1408 if (m_scrollingCoordinatorProxy->isPointInNonFastScrollableRegion(touchPoint.location())) 1409 1409 return true; -
trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.mm
r163837 r163959 57 57 LOG(RemoteLayerTree, "%s", transaction.description().data()); 58 58 59 for ( autocreatedLayer : transaction.createdLayers())59 for (const auto& createdLayer : transaction.createdLayers()) 60 60 createLayer(createdLayer); 61 61 … … 67 67 } 68 68 69 for (auto changedLayer : transaction.changedLayers()) {69 for (auto& changedLayer : transaction.changedLayers()) { 70 70 auto layerID = changedLayer.key; 71 71 const auto& properties = changedLayer.value; … … 76 76 RemoteLayerTreePropertyApplier::RelatedLayerMap relatedLayers; 77 77 if (properties.changedProperties & RemoteLayerTreeTransaction::ChildrenChanged) { 78 for (auto child : properties.children)78 for (auto& child : properties.children) 79 79 relatedLayers.set(child, getLayer(child)); 80 80 } -
trunk/Source/WebKit2/UIProcess/mac/WindowServerConnection.mm
r161301 r163959 81 81 }; 82 82 83 for ( autoocclusionNotificationHandler : occlusionNotificationHandlers) {83 for (const auto& occlusionNotificationHandler : occlusionNotificationHandlers) { 84 84 bool result = WKRegisterOcclusionNotificationHandler(occlusionNotificationHandler.notificationType, occlusionNotificationHandler.handler); 85 85 UNUSED_PARAM(result); -
trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp
r163817 r163959 422 422 423 423 Vector<Vector<IDBKeyData>> indexKeys; 424 for ( autokeys : operation.indexKeys()) {424 for (const auto& keys : operation.indexKeys()) { 425 425 indexKeys.append(Vector<IDBKeyData>()); 426 for ( autokey : keys)426 for (const auto& key : keys) 427 427 indexKeys.last().append(IDBKeyData(key.get())); 428 428 } -
trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.cpp
r163079 r163959 102 102 if (m_properties.changedProperties & RemoteLayerTreeTransaction::ChildrenChanged) { 103 103 m_properties.children.clear(); 104 for ( autolayer : m_children)104 for (const auto& layer : m_children) 105 105 m_properties.children.append(layer->layerID()); 106 106 }
Note: See TracChangeset
for help on using the changeset viewer.