Changeset 142578 in webkit
- Timestamp:
- Feb 11, 2013 9:29:40 PM (11 years ago)
- Location:
- trunk/Source
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r142576 r142578 1 2013-02-11 Huang Dongsung <luxtella@company100.net> 2 3 Coordinated Graphics: remove the DidChangeScrollPosition message. 4 https://bugs.webkit.org/show_bug.cgi?id=108051 5 6 Reviewed by Noam Rosenthal. 7 Signed off for WebKit2 by Benjamin Poulain. 8 9 Currently, we use the DidChangeScrollPosition message to send the scroll 10 position that WebCore used in this frame to UI Process. We had to have 11 some member variables for the DidChangeScrollPosition message. 12 However, we can send a scroll position via the DidRenderFrame message, 13 because CoordinatedGraphicsScene::m_renderedContentsScrollPosition is 14 updated at the moment of flushing. So we can remove the 15 DidChangeScrollPosition message and some redundant member variables. 16 17 No tests. No change in behavior. 18 19 * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp: 20 (WebCore::CoordinatedGraphicsScene::flushLayerChanges): 21 * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h: 22 (CoordinatedGraphicsScene): 23 1 24 2013-02-11 Ryosuke Niwa <rniwa@webkit.org> 2 25 -
trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp
r142524 r142578 231 231 for (LayerRawPtrMap::iterator it = m_fixedLayers.begin(); it != end; ++it) 232 232 toTextureMapperLayer(it->value)->setScrollPositionDeltaIfNeeded(delta); 233 }234 235 void CoordinatedGraphicsScene::didChangeScrollPosition(const FloatPoint& position)236 {237 m_pendingRenderedContentsScrollPosition = position;238 233 } 239 234 … … 574 569 } 575 570 576 void CoordinatedGraphicsScene::flushLayerChanges( )577 { 578 m_renderedContentsScrollPosition = m_pendingRenderedContentsScrollPosition;571 void CoordinatedGraphicsScene::flushLayerChanges(const FloatPoint& scrollPosition) 572 { 573 m_renderedContentsScrollPosition = scrollPosition; 579 574 580 575 // Since the frame has now been rendered, we can safely unlock the animations until the next layout. -
trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h
r142524 r142578 87 87 void setContentsSize(const FloatSize&); 88 88 void setVisibleContentsRect(const FloatRect&); 89 void didChangeScrollPosition(const FloatPoint& position);90 89 #if USE(GRAPHICS_SURFACE) 91 90 void createCanvas(CoordinatedLayerID, const IntSize&, PassRefPtr<GraphicsSurface>); … … 122 121 void createUpdateAtlas(uint32_t atlasID, PassRefPtr<CoordinatedSurface>); 123 122 void removeUpdateAtlas(uint32_t atlasID); 124 void flushLayerChanges( );123 void flushLayerChanges(const FloatPoint& scrollPosition); 125 124 void createImageBacking(CoordinatedImageBackingID); 126 125 void updateImageBacking(CoordinatedImageBackingID, PassRefPtr<CoordinatedSurface>); … … 215 214 CoordinatedLayerID m_rootLayerID; 216 215 FloatPoint m_renderedContentsScrollPosition; 217 FloatPoint m_pendingRenderedContentsScrollPosition;218 216 bool m_animationsLocked; 219 217 #if ENABLE(REQUEST_ANIMATION_FRAME) -
trunk/Source/WebKit2/ChangeLog
r142576 r142578 1 2013-02-11 Huang Dongsung <luxtella@company100.net> 2 3 Coordinated Graphics: remove the DidChangeScrollPosition message. 4 https://bugs.webkit.org/show_bug.cgi?id=108051 5 6 Reviewed by Noam Rosenthal. 7 Signed off for WebKit2 by Benjamin Poulain. 8 9 Currently, we use the DidChangeScrollPosition message to send the scroll 10 position that WebCore used in this frame to UI Process. We had to have 11 some member variables for the DidChangeScrollPosition message. 12 However, we can send a scroll position via the DidRenderFrame message, 13 because CoordinatedGraphicsScene::m_renderedContentsScrollPosition is 14 updated at the moment of flushing. So we can remove the 15 DidChangeScrollPosition message and some redundant member variables. 16 17 * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp: 18 (WebKit::CoordinatedLayerTreeHostProxy::didRenderFrame): 19 (WebKit): 20 * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h: 21 (CoordinatedLayerTreeHostProxy): 22 * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in: 23 Remove the DidChangeScrollPosition message. 24 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: 25 (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost): 26 (WebKit::CoordinatedLayerTreeHost::flushPendingLayerChanges): 27 Send a scroll position via the DidChangeScrollPosition message. 28 (WebKit::CoordinatedLayerTreeHost::syncLayerState): 29 Don't send a scroll position because flushPendingLayerChanges() does 30 that. In addition, it is weird to check if we must send a scroll 31 position at the moment of sending the SyncLayerState message of every 32 layers. 33 (WebKit::CoordinatedLayerTreeHost::setVisibleContentsRect): 34 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h: 35 1 36 2013-02-11 Ryosuke Niwa <rniwa@webkit.org> 2 37 -
trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp
r142160 r142578 132 132 #endif 133 133 134 void CoordinatedLayerTreeHostProxy::didRenderFrame(const IntSize& contentsSize, const IntRect& coveredRect)135 { 136 dispatchUpdate(bind(&CoordinatedGraphicsScene::flushLayerChanges, m_scene.get() ));134 void CoordinatedLayerTreeHostProxy::didRenderFrame(const FloatPoint& scrollPosition, const IntSize& contentsSize, const IntRect& coveredRect) 135 { 136 dispatchUpdate(bind(&CoordinatedGraphicsScene::flushLayerChanges, m_scene.get(), scrollPosition)); 137 137 updateViewport(); 138 138 #if USE(TILED_BACKING_STORE) … … 210 210 #endif 211 211 212 void CoordinatedLayerTreeHostProxy::didChangeScrollPosition(const FloatPoint& position)213 {214 dispatchUpdate(bind(&CoordinatedGraphicsScene::didChangeScrollPosition, m_scene.get(), position));215 }216 217 212 #if USE(GRAPHICS_SURFACE) 218 213 void CoordinatedLayerTreeHostProxy::createCanvas(CoordinatedLayerID id, const IntSize& canvasSize, const GraphicsSurfaceToken& token) -
trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h
r142160 r142578 68 68 void setContentsSize(const WebCore::FloatSize&); 69 69 void setVisibleContentsRect(const WebCore::FloatRect&, const WebCore::FloatPoint& trajectoryVector); 70 void didRenderFrame(const WebCore:: IntSize& contentsSize, const WebCore::IntRect& coveredRect);70 void didRenderFrame(const WebCore::FloatPoint& scrollPosition, const WebCore::IntSize& contentsSize, const WebCore::IntRect& coveredRect); 71 71 void createTileForLayer(WebCore::CoordinatedLayerID, uint32_t tileID, const WebCore::IntRect&, const WebCore::SurfaceUpdateInfo&); 72 72 void updateTileForLayer(WebCore::CoordinatedLayerID, uint32_t tileID, const WebCore::IntRect&, const WebCore::SurfaceUpdateInfo&); … … 78 78 void clearImageBackingContents(WebCore::CoordinatedImageBackingID); 79 79 void removeImageBacking(WebCore::CoordinatedImageBackingID); 80 void didChangeScrollPosition(const WebCore::FloatPoint& position);81 80 #if USE(GRAPHICS_SURFACE) 82 81 void createCanvas(WebCore::CoordinatedLayerID, const WebCore::IntSize&, const WebCore::GraphicsSurfaceToken&); -
trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in
r142160 r142578 41 41 ClearImageBackingContents(uint64_t imageID) 42 42 RemoveImageBacking(uint64_t imageID) 43 DidRenderFrame(WebCore::IntSize contentsSize, WebCore::IntRect coveredRect) 44 DidChangeScrollPosition(WebCore::FloatPoint position) 43 DidRenderFrame(WebCore::FloatPoint scrollPosition, WebCore::IntSize contentsSize, WebCore::IntRect coveredRect) 45 44 SetLayerAnimations(uint32_t id, WebCore::GraphicsLayerAnimations animations) 46 45 SetAnimationsLocked(bool locked) -
trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp
r142143 r142578 86 86 , m_waitingForUIProcess(true) 87 87 , m_isSuspended(false) 88 , m_shouldSendScrollPositionUpdate(true)89 88 , m_shouldSyncFrame(false) 90 89 , m_didInitializeRootCompositingLayer(false) … … 293 292 IntSize contentsSize = roundedIntSize(m_nonCompositedContentLayer->size()); 294 293 IntRect coveredRect = toCoordinatedGraphicsLayer(m_nonCompositedContentLayer.get())->coverRect(); 295 m_webPage->send(Messages::CoordinatedLayerTreeHostProxy::DidRenderFrame( contentsSize, coveredRect));294 m_webPage->send(Messages::CoordinatedLayerTreeHostProxy::DidRenderFrame(m_visibleContentsRect.location(), contentsSize, coveredRect)); 296 295 m_waitingForUIProcess = true; 297 296 m_shouldSyncFrame = false; … … 353 352 void CoordinatedLayerTreeHost::syncLayerState(CoordinatedLayerID id, const CoordinatedLayerInfo& info) 354 353 { 355 if (m_shouldSendScrollPositionUpdate) {356 m_webPage->send(Messages::CoordinatedLayerTreeHostProxy::DidChangeScrollPosition(m_visibleContentsRect.location()));357 m_shouldSendScrollPositionUpdate = false;358 }359 360 354 m_shouldSyncFrame = true; 361 355 m_webPage->send(Messages::CoordinatedLayerTreeHostProxy::SetCompositingLayerState(id, info)); … … 745 739 m_webPage->setFixedVisibleContentRect(roundedIntRect(rect)); 746 740 } 747 748 if (contentsRectDidChange)749 m_shouldSendScrollPositionUpdate = true;750 741 } 751 742 -
trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h
r142143 r142578 201 201 bool m_isSuspended; 202 202 WebCore::FloatRect m_visibleContentsRect; 203 bool m_shouldSendScrollPositionUpdate;204 203 205 204 LayerTreeContext m_layerTreeContext;
Note: See TracChangeset
for help on using the changeset viewer.