Changeset 79867 in webkit
- Timestamp:
- Feb 28, 2011 8:35:32 AM (13 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r79863 r79867 1 2011-02-28 Adam Roben <aroben@apple.com> 2 3 Decouple state changes from sending of UpdateState messages in DrawingAreaProxyImpl 4 5 The new DrawingAreaProxyImpl::stateDidChange function should be called whenever 6 DrawingAreaProxyImpl's state changes in a way that will require allocating a new backing 7 store. (Currently, this is just when the size changes.) This function will sometimes (but 8 not always, as when we're waiting for a DidUpdateState message) send an UpdateState message 9 to the web process. This means it's now possible for the state IDs sent in consecutive 10 UpdateState messages to increase by more than one, but that's OK. 11 12 This should cause no change in behavior. 13 14 Fixes <http://webkit.org/b/55382> DrawingAreaProxyImpl's state ID should be updated whenever 15 its state changes, not just when we send an UpdateState message 16 17 Reviewed by Anders Carlsson. 18 19 * UIProcess/DrawingAreaProxyImpl.cpp: 20 (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl): Updated for rename. 21 (WebKit::DrawingAreaProxyImpl::sizeDidChange): Changed to call stateDidChange. 22 (WebKit::DrawingAreaProxyImpl::didUpdateState): Updated for rename, and changed to call 23 sendUpdateState whenever our state has changed for any reason since the last UpdateState 24 message was sent. 25 (WebKit::DrawingAreaProxyImpl::stateDidChange): Added. Increments m_nextStateID and calls 26 through to sendUpdateState. 27 (WebKit::DrawingAreaProxyImpl::sendUpdateState): Updated for rename, moved incrementing of 28 the state ID we send to the web process from here to stateDidChange, and added an assertion. 29 30 * UIProcess/DrawingAreaProxyImpl.h: Renamed m_requestedStateID to m_nextStateID, and updated 31 the comment explaining its meaning. 32 1 33 2011-02-28 Adam Roben <aroben@apple.com> 2 34 -
trunk/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp
r79803 r79867 51 51 : DrawingAreaProxy(DrawingAreaTypeImpl, webPageProxy) 52 52 , m_currentStateID(0) 53 , m_ requestedStateID(0)53 , m_nextStateID(0) 54 54 , m_isWaitingForDidUpdateState(false) 55 55 { … … 104 104 void DrawingAreaProxyImpl::sizeDidChange() 105 105 { 106 s endUpdateState();106 stateDidChange(); 107 107 } 108 108 … … 137 137 void DrawingAreaProxyImpl::didUpdateState(uint64_t stateID, const UpdateInfo& updateInfo, const LayerTreeContext& layerTreeContext) 138 138 { 139 ASSERT_ARG(stateID, stateID <= m_ requestedStateID);139 ASSERT_ARG(stateID, stateID <= m_nextStateID); 140 140 ASSERT_ARG(stateID, stateID > m_currentStateID); 141 141 m_currentStateID = stateID; … … 144 144 m_isWaitingForDidUpdateState = false; 145 145 146 if (m_ size != updateInfo.viewSize)146 if (m_nextStateID != m_currentStateID) 147 147 sendUpdateState(); 148 148 … … 215 215 } 216 216 217 void DrawingAreaProxyImpl::stateDidChange() 218 { 219 ++m_nextStateID; 220 sendUpdateState(); 221 } 222 217 223 void DrawingAreaProxyImpl::sendUpdateState() 218 224 { 225 ASSERT(m_currentStateID < m_nextStateID); 226 219 227 if (!m_webPageProxy->isValid()) 220 228 return; … … 224 232 225 233 m_isWaitingForDidUpdateState = true; 226 m_webPageProxy->process()->send(Messages::DrawingArea::UpdateState( ++m_requestedStateID, m_size, m_scrollOffset), m_webPageProxy->pageID());234 m_webPageProxy->process()->send(Messages::DrawingArea::UpdateState(m_nextStateID, m_size, m_scrollOffset), m_webPageProxy->pageID()); 227 235 m_scrollOffset = IntSize(); 228 236 -
trunk/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.h
r79803 r79867 62 62 63 63 void incorporateUpdate(const UpdateInfo&); 64 65 void stateDidChange(); 64 66 void sendUpdateState(); 65 67 void waitForAndDispatchDidUpdateState(); … … 75 77 uint64_t m_currentStateID; 76 78 77 // The state ID we most recently requested the web process update to. Incremented whenever we 78 // send an UpdateState message to the web process to tell it we need to allocate a new backing 79 // store. 80 uint64_t m_requestedStateID; 79 // The next state ID we will request the web process update to. Incremented whenever our state 80 // changes in a way that will require a new backing store to be allocated. 81 uint64_t m_nextStateID; 81 82 82 83 // The current layer tree context.
Note: See TracChangeset
for help on using the changeset viewer.