Changeset 233909 in webkit
- Timestamp:
- Jul 18, 2018 3:20:21 AM (6 years ago)
- Location:
- trunk/Source
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r233908 r233909 1 2018-07-18 Zan Dobersek <zdobersek@igalia.com> 2 3 [CoordGraphics] Start tracking Nicosia layers in CoordinatedGraphicsState 4 https://bugs.webkit.org/show_bug.cgi?id=187751 5 6 Reviewed by Carlos Garcia Campos. 7 8 Start including the Nicosia::CompositionLayer objects in the 9 CoordinatedGraphicsState struct, under a separate NicosiaState struct. 10 References to all the layers in a given scene are kept in a HashSet, 11 and a separate reference to the root layer kept in a separate member 12 variable. 13 14 * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp: 15 (WebCore::CoordinatedGraphicsLayer::compositionLayer const): 16 * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h: 17 Add the getter method that returns internal Nicosia::CompositionLayer 18 object. This can't be defined in the class definition because of 19 WEBCORE_EXPORT used on the CoordinatedGraphicsLayer class. 20 * platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h: 21 1 22 2018-07-18 Simon Fraser <simon.fraser@apple.com> 2 23 -
trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp
r233845 r233909 1112 1112 } 1113 1113 1114 const RefPtr<Nicosia::CompositionLayer>& CoordinatedGraphicsLayer::compositionLayer() const 1115 { 1116 return m_nicosia.layer; 1117 } 1118 1114 1119 void CoordinatedGraphicsLayer::setNeedsVisibleRectAdjustment() 1115 1120 { -
trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h
r233845 r233909 135 135 void purgeBackingStores(); 136 136 137 const RefPtr<Nicosia::CompositionLayer>& compositionLayer() const; 138 137 139 private: 138 140 bool isCoordinatedGraphicsLayer() const override { return true; } -
trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h
r230955 r233909 38 38 #include "IntSize.h" 39 39 #include "NicosiaBuffer.h" 40 #include "NicosiaPlatformLayer.h" 40 41 #include "SurfaceUpdateInfo.h" 41 42 #include "TextureMapperAnimation.h" … … 175 176 176 177 struct CoordinatedGraphicsState { 178 struct NicosiaState { 179 HashSet<RefPtr<Nicosia::CompositionLayer>> layers; 180 RefPtr<Nicosia::CompositionLayer> rootLayer; 181 } nicosia; 182 177 183 uint32_t rootCompositingLayer; 178 184 -
trunk/Source/WebKit/ChangeLog
r233905 r233909 1 2018-07-18 Zan Dobersek <zdobersek@igalia.com> 2 3 [CoordGraphics] Start tracking Nicosia layers in CoordinatedGraphicsState 4 https://bugs.webkit.org/show_bug.cgi?id=187751 5 6 Reviewed by Carlos Garcia Campos. 7 8 Start including the Nicosia::CompositionLayer objects in the 9 CoordinatedGraphicsState struct, under a separate NicosiaState struct. 10 References to all the layers in a given scene are kept in a HashSet, 11 and a separate reference to the root layer kept in a separate member 12 variable. 13 14 CompositingCoordinator now takes care of adding or removing the 15 Nicosia::CompositionLayer objects to the NicosiaState's HashSet, as well 16 as setting the root layer object when it's being initialized. Additions 17 and removals of Nicosia::CompositionLayer correspond to the additions 18 and removals of CoordinatedGraphicsLayer objects to the coordinator's 19 m_registeredLayers HashMap. 20 21 Upon each state commit that's done in CoordinatedGraphicsScene, the 22 NicosiaState object will be copied into the member variable. Nothing is 23 done yet with that state object, but in the near future it will be used 24 to finally commit all the state details into the TextureMapper layers. 25 26 * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp: 27 (WebKit::CoordinatedGraphicsScene::commitSceneState): 28 * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h: 29 * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp: 30 (WebKit::CompositingCoordinator::initializeRootCompositingLayerIfNeeded): 31 (WebKit::CompositingCoordinator::createGraphicsLayer): 32 (WebKit::CompositingCoordinator::detachLayer): 33 (WebKit::CompositingCoordinator::attachLayer): 34 1 35 2018-07-17 Tim Horton <timothy_horton@apple.com> 2 36 -
trunk/Source/WebKit/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp
r233080 r233909 432 432 return; 433 433 434 m_nicosia = state.nicosia; 435 // FIXME: Start using the Nicosia layer state for updates. 436 434 437 CommitScope commitScope; 435 438 -
trunk/Source/WebKit/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h
r230955 r233909 143 143 #endif 144 144 145 WebCore::CoordinatedGraphicsState::NicosiaState m_nicosia; 146 145 147 std::unique_ptr<WebCore::TextureMapper> m_textureMapper; 146 148 -
trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp
r233193 r233909 172 172 return; 173 173 174 m_state.rootCompositingLayer = downcast<CoordinatedGraphicsLayer>(*m_rootLayer).id(); 174 auto& rootLayer = downcast<CoordinatedGraphicsLayer>(*m_rootLayer); 175 m_state.nicosia.rootLayer = rootLayer.compositionLayer(); 176 m_state.rootCompositingLayer = rootLayer.id(); 175 177 m_didInitializeRootCompositingLayer = true; 176 178 m_shouldSyncFrame = true; … … 262 264 CoordinatedGraphicsLayer* layer = new CoordinatedGraphicsLayer(layerType, client); 263 265 layer->setCoordinator(this); 266 m_state.nicosia.layers.add(layer->compositionLayer()); 264 267 m_registeredLayers.add(layer->id(), layer); 265 268 m_state.layersToCreate.append(layer->id()); … … 302 305 return; 303 306 307 m_state.nicosia.layers.remove(layer->compositionLayer()); 304 308 m_registeredLayers.remove(layer->id()); 305 309 … … 317 321 { 318 322 layer->setCoordinator(this); 323 m_state.nicosia.layers.add(layer->compositionLayer()); 319 324 m_registeredLayers.add(layer->id(), layer); 320 325 m_state.layersToCreate.append(layer->id());
Note: See TracChangeset
for help on using the changeset viewer.