Changeset 141325 in webkit
- Timestamp:
- Jan 30, 2013 3:00:20 PM (11 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r141322 r141325 1 2013-01-30 Huang Dongsung <luxtella@company100.net> 2 3 Coordinated Graphics: LayerTreeRenderer manages the surface of UpdateAtlas. 4 https://bugs.webkit.org/show_bug.cgi?id=107224 5 6 Reviewed by Benjamin Poulain. 7 8 Currently, CoordinatedLayerTreeHostProxy manages the surface of UpdateAtlas, but 9 all other resources are managed by LayerTreeRenderer. This patch matches the 10 surface of UpdateAtlas to other resources. 11 12 * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp: 13 (WebKit::CoordinatedLayerTreeHostProxy::updateTileForLayer): 14 (WebKit::CoordinatedLayerTreeHostProxy::createUpdateAtlas): 15 (WebKit::CoordinatedLayerTreeHostProxy::removeUpdateAtlas): 16 (WebKit::CoordinatedLayerTreeHostProxy::purgeBackingStores): 17 * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h: 18 (CoordinatedLayerTreeHostProxy): 19 * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp: 20 (WebKit::LayerTreeRenderer::updateTile): 21 (WebKit::LayerTreeRenderer::createUpdateAtlas): 22 (WebKit): 23 (WebKit::LayerTreeRenderer::removeUpdateAtlas): 24 (WebKit::LayerTreeRenderer::purgeGLResources): 25 * UIProcess/CoordinatedGraphics/LayerTreeRenderer.h: 26 (TileUpdate): 27 (WebKit::LayerTreeRenderer::TileUpdate::TileUpdate): 28 (LayerTreeRenderer): 29 1 30 2013-01-30 Anders Carlsson <andersca@apple.com> 2 31 -
trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp
r141310 r141325 68 68 void CoordinatedLayerTreeHostProxy::updateTileForLayer(CoordinatedLayerID layerID, uint32_t tileID, const IntRect& tileRect, const WebKit::SurfaceUpdateInfo& updateInfo) 69 69 { 70 SurfaceMap::iterator it = m_surfaces.find(updateInfo.atlasID); 71 ASSERT(it != m_surfaces.end()); 72 dispatchUpdate(bind(&LayerTreeRenderer::updateTile, m_renderer.get(), layerID, tileID, LayerTreeRenderer::TileUpdate(updateInfo.updateRect, tileRect, it->value, updateInfo.surfaceOffset))); 70 dispatchUpdate(bind(&LayerTreeRenderer::updateTile, m_renderer.get(), layerID, tileID, LayerTreeRenderer::TileUpdate(updateInfo.updateRect, tileRect, updateInfo.atlasID, updateInfo.surfaceOffset))); 73 71 } 74 72 … … 80 78 void CoordinatedLayerTreeHostProxy::createUpdateAtlas(uint32_t atlasID, const WebCoordinatedSurface::Handle& handle) 81 79 { 82 ASSERT(!m_surfaces.contains(atlasID)); 83 m_surfaces.add(atlasID, WebCoordinatedSurface::create(handle)); 80 dispatchUpdate(bind(&LayerTreeRenderer::createUpdateAtlas, m_renderer.get(), atlasID, WebCoordinatedSurface::create(handle))); 84 81 } 85 82 86 83 void CoordinatedLayerTreeHostProxy::removeUpdateAtlas(uint32_t atlasID) 87 84 { 88 ASSERT(m_surfaces.contains(atlasID)); 89 m_surfaces.remove(atlasID); 85 dispatchUpdate(bind(&LayerTreeRenderer::removeUpdateAtlas, m_renderer.get(), atlasID)); 90 86 } 91 87 … … 241 237 void CoordinatedLayerTreeHostProxy::purgeBackingStores() 242 238 { 243 m_surfaces.clear();244 239 m_drawingAreaProxy->page()->process()->send(Messages::CoordinatedLayerTreeHost::PurgeBackingStores(), m_drawingAreaProxy->page()->pageID()); 245 240 } -
trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h
r141310 r141325 104 104 WebCore::FloatRect m_lastSentVisibleRect; 105 105 WebCore::FloatPoint m_lastSentTrajectoryVector; 106 typedef HashMap<uint32_t /* atlasID */, RefPtr<CoordinatedSurface> > SurfaceMap;107 SurfaceMap m_surfaces;108 106 }; 109 107 -
trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp
r141232 r141325 469 469 RefPtr<CoordinatedBackingStore> backingStore = m_backingStores.get(layer); 470 470 ASSERT(backingStore); 471 backingStore->updateTile(tileID, update.sourceRect, update.tileRect, update.surface, update.offset); 471 472 SurfaceMap::iterator it = m_surfaces.find(update.atlasID); 473 ASSERT(it != m_surfaces.end()); 474 475 backingStore->updateTile(tileID, update.sourceRect, update.tileRect, it->value, update.offset); 472 476 resetBackingStoreSizeToLayerSize(layer); 473 477 m_backingStoresWithPendingBuffers.add(backingStore); 478 } 479 480 void LayerTreeRenderer::createUpdateAtlas(uint32_t atlasID, PassRefPtr<CoordinatedSurface> surface) 481 { 482 ASSERT(!m_surfaces.contains(atlasID)); 483 m_surfaces.add(atlasID, surface); 484 } 485 486 void LayerTreeRenderer::removeUpdateAtlas(uint32_t atlasID) 487 { 488 ASSERT(m_surfaces.contains(atlasID)); 489 m_surfaces.remove(atlasID); 474 490 } 475 491 … … 602 618 m_surfaceBackingStores.clear(); 603 619 #endif 620 m_surfaces.clear(); 604 621 605 622 m_rootLayer.clear(); -
trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.h
r141232 r141325 57 57 WebCore::IntRect sourceRect; 58 58 WebCore::IntRect tileRect; 59 RefPtr<CoordinatedSurface> surface;59 uint32_t atlasID; 60 60 WebCore::IntPoint offset; 61 TileUpdate(const WebCore::IntRect& source, const WebCore::IntRect& tile, PassRefPtr<CoordinatedSurface> newSurface, const WebCore::IntPoint& newOffset)61 TileUpdate(const WebCore::IntRect& source, const WebCore::IntRect& tile, uint32_t atlas, const WebCore::IntPoint& newOffset) 62 62 : sourceRect(source) 63 63 , tileRect(tile) 64 , surface(newSurface)64 , atlasID(atlas) 65 65 , offset(newOffset) 66 66 { … … 106 106 void removeTile(CoordinatedLayerID, uint32_t tileID); 107 107 void updateTile(CoordinatedLayerID, uint32_t tileID, const TileUpdate&); 108 void createUpdateAtlas(uint32_t atlasID, PassRefPtr<CoordinatedSurface>); 109 void removeUpdateAtlas(uint32_t atlasID); 108 110 void flushLayerChanges(); 109 111 void createImageBacking(CoordinatedImageBackingID); … … 181 183 SurfaceBackingStoreMap m_surfaceBackingStores; 182 184 #endif 185 186 typedef HashMap<uint32_t /* atlasID */, RefPtr<CoordinatedSurface> > SurfaceMap; 187 SurfaceMap m_surfaces; 183 188 184 189 // Below two members are accessed by only the main thread. The painting thread must lock the main thread to access both members.
Note: See TracChangeset
for help on using the changeset viewer.