Changeset 140634 in webkit
- Timestamp:
- Jan 23, 2013 6:57:46 PM (11 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r140629 r140634 1 2013-01-23 Seulgi Kim <seulgikim@company100.net> 2 3 Coordinated Graphics : Reduce the number of calls to Functional and number of IPC messages by sending the created/deleted layers in a vector. 4 https://bugs.webkit.org/show_bug.cgi?id=107625 5 6 Reviewed by Benjamin Poulain. 7 8 Currently, the number of messages sent by CoordinatedLayerTreeHost is 9 equal to the number of layers created/deleted even though they requested 10 in the same cycle. 11 It's not good since CoreIPC creates functional before sending messages, 12 and CoordinatedLayerTreeHostProxy creates functional before 13 create/delete layers. 14 15 This patch makes CoordinatedLayerTreeHost send just one 16 CreateCompositingLayers message and CoordinatedLayerTreeHostProxy create 17 just one functional in a cycle. The same work has been done with 18 DeleteCompositingLayers message. 19 20 This patch will reduce the number of calls to Functional and number of 21 IPC messages by sending the created/deleted layers in a vector. 22 23 No new tests, no change in behavior. 24 25 * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp: 26 (WebKit::CoordinatedLayerTreeHostProxy::createCompositingLayers): 27 (WebKit::CoordinatedLayerTreeHostProxy::deleteCompositingLayers): 28 * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h: 29 (CoordinatedLayerTreeHostProxy): 30 * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in: 31 * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp: 32 (WebKit::LayerTreeRenderer::createLayers): 33 (WebKit): 34 (WebKit::LayerTreeRenderer::deleteLayers): 35 * UIProcess/CoordinatedGraphics/LayerTreeRenderer.h: 36 (LayerTreeRenderer): 37 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: 38 (WebKit::CoordinatedLayerTreeHost::createCompositingLayers): 39 (WebKit::CoordinatedLayerTreeHost::deleteCompositingLayers): 40 1 41 2013-01-23 Huang Dongsung <luxtella@company100.net> 2 42 -
trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp
r138468 r140634 96 96 } 97 97 98 void CoordinatedLayerTreeHostProxy::createCompositingLayer (CoordinatedLayerID id)99 { 100 dispatchUpdate(bind(&LayerTreeRenderer::createLayer , m_renderer.get(), id));101 } 102 103 void CoordinatedLayerTreeHostProxy::deleteCompositingLayer (CoordinatedLayerID id)104 { 105 dispatchUpdate(bind(&LayerTreeRenderer::deleteLayer , m_renderer.get(), id));98 void CoordinatedLayerTreeHostProxy::createCompositingLayers(const Vector<CoordinatedLayerID>& ids) 99 { 100 dispatchUpdate(bind(&LayerTreeRenderer::createLayers, m_renderer.get(), ids)); 101 } 102 103 void CoordinatedLayerTreeHostProxy::deleteCompositingLayers(const Vector<CoordinatedLayerID>& ids) 104 { 105 dispatchUpdate(bind(&LayerTreeRenderer::deleteLayers, m_renderer.get(), ids)); 106 106 } 107 107 -
trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h
r138468 r140634 40 40 #include <wtf/Functional.h> 41 41 #include <wtf/HashSet.h> 42 #include <wtf/Vector.h> 42 43 43 44 namespace WebKit { … … 61 62 void removeCustomFilterProgram(int id); 62 63 #endif 63 void createCompositingLayer (CoordinatedLayerID);64 void deleteCompositingLayer (CoordinatedLayerID);64 void createCompositingLayers(const Vector<CoordinatedLayerID>&); 65 void deleteCompositingLayers(const Vector<CoordinatedLayerID>&); 65 66 void setRootCompositingLayer(CoordinatedLayerID); 66 67 void setContentsSize(const WebCore::FloatSize&); -
trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in
r140629 r140634 30 30 #endif 31 31 SetRootCompositingLayer(uint32_t id) 32 CreateCompositingLayer (uint32_t id)33 DeleteCompositingLayer (uint32_t id)32 CreateCompositingLayers(Vector<uint32_t> ids) 33 DeleteCompositingLayers(Vector<uint32_t> ids) 34 34 CreateTileForLayer(uint32_t layerID, uint32_t tileID, WebCore::IntRect tileRect, WebKit::SurfaceUpdateInfo updateInfo) 35 35 UpdateTileForLayer(uint32_t layerID, uint32_t tileID, WebCore::IntRect tileRect, WebKit::SurfaceUpdateInfo updateInfo) -
trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp
r140053 r140634 354 354 } 355 355 356 void LayerTreeRenderer::createLayers(const Vector<CoordinatedLayerID>& ids) 357 { 358 for (size_t index = 0; index < ids.size(); ++index) 359 createLayer(ids[index]); 360 } 361 356 362 void LayerTreeRenderer::createLayer(CoordinatedLayerID id) 357 363 { … … 359 365 toGraphicsLayerTextureMapper(newLayer.get())->setHasOwnBackingStore(false); 360 366 m_layers.add(id, newLayer.release()); 367 } 368 369 void LayerTreeRenderer::deleteLayers(const Vector<CoordinatedLayerID>& layerIDs) 370 { 371 for (size_t index = 0; index < layerIDs.size(); ++index) 372 deleteLayer(layerIDs[index]); 361 373 } 362 374 -
trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.h
r138468 r140634 38 38 #include <wtf/HashSet.h> 39 39 #include <wtf/ThreadingPrimitives.h> 40 #include <wtf/Vector.h> 40 41 41 42 namespace WebCore { … … 87 88 void setActive(bool); 88 89 89 void createLayer (CoordinatedLayerID);90 void deleteLayer (CoordinatedLayerID);90 void createLayers(const Vector<CoordinatedLayerID>&); 91 void deleteLayers(const Vector<CoordinatedLayerID>&); 91 92 void setRootLayerID(CoordinatedLayerID); 92 93 void setLayerChildren(CoordinatedLayerID, const Vector<CoordinatedLayerID>&); … … 144 145 void purgeBackingStores(); 145 146 147 void createLayer(CoordinatedLayerID); 148 void deleteLayer(CoordinatedLayerID); 149 146 150 void assignImageBackingToLayer(WebCore::GraphicsLayer*, CoordinatedImageBackingID); 147 151 void removeReleasedImageBackingsIfNeeded(); -
trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp
r140620 r140634 319 319 } 320 320 321 for (size_t i = 0; i < m_layersToCreate.size(); ++i) 322 m_webPage->send(Messages::CoordinatedLayerTreeHostProxy::CreateCompositingLayer(m_layersToCreate[i])); 321 m_webPage->send(Messages::CoordinatedLayerTreeHostProxy::CreateCompositingLayers(m_layersToCreate)); 323 322 m_layersToCreate.clear(); 324 323 m_shouldSyncFrame = true; … … 335 334 } 336 335 337 for (size_t i = 0; i < m_layersToDelete.size(); ++i) 338 m_webPage->send(Messages::CoordinatedLayerTreeHostProxy::DeleteCompositingLayer(m_layersToDelete[i])); 336 m_webPage->send(Messages::CoordinatedLayerTreeHostProxy::DeleteCompositingLayers(m_layersToDelete)); 339 337 m_layersToDelete.clear(); 340 338 m_shouldSyncFrame = true;
Note: See TracChangeset
for help on using the changeset viewer.