Title: [94678] trunk/Source/WebKit2
- Revision
- 94678
- Author
- [email protected]
- Date
- 2011-09-07 10:07:38 -0700 (Wed, 07 Sep 2011)
Log Message
TiledDrawingArea: Fix issues where the tiles of the previous scale would be removed too early.
https://bugs.webkit.org/show_bug.cgi?id=67390
Reviewed by Tor Arne Vestbø.
The two issues addresssed are:
- The previous instance of the tile backing store would be destroyed in createTile which
would send removeTile messages for all its tiles before the DidRenderFrame message is sent for the new tiles.
- When quickly changing the scale a second time after a scale change, the previous tile set would
be replaced by the current incomplete tile set which may contain no tiles at all.
* WebProcess/WebPage/TiledDrawingArea.cpp:
(WebKit::TiledDrawingArea::setVisibleContentRectAndScale):
(WebKit::TiledDrawingArea::tiledBackingStorePaintEnd):
(WebKit::TiledDrawingArea::createTile):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (94677 => 94678)
--- trunk/Source/WebKit2/ChangeLog 2011-09-07 17:05:41 UTC (rev 94677)
+++ trunk/Source/WebKit2/ChangeLog 2011-09-07 17:07:38 UTC (rev 94678)
@@ -1,3 +1,20 @@
+2011-09-01 Jocelyn Turcotte <[email protected]>
+
+ TiledDrawingArea: Fix issues where the tiles of the previous scale would be removed too early.
+ https://bugs.webkit.org/show_bug.cgi?id=67390
+
+ Reviewed by Tor Arne Vestbø.
+
+ The two issues addresssed are:
+ - The previous instance of the tile backing store would be destroyed in createTile which
+ would send removeTile messages for all its tiles before the DidRenderFrame message is sent for the new tiles.
+ - When quickly changing the scale a second time after a scale change, the previous tile set would
+ be replaced by the current incomplete tile set which may contain no tiles at all.
+ * WebProcess/WebPage/TiledDrawingArea.cpp:
+ (WebKit::TiledDrawingArea::setVisibleContentRectAndScale):
+ (WebKit::TiledDrawingArea::tiledBackingStorePaintEnd):
+ (WebKit::TiledDrawingArea::createTile):
+
2011-08-30 Jocelyn Turcotte <[email protected]>
[Qt][WK2] The scene graph is rendered continuously even when the page is idle.
Modified: trunk/Source/WebKit2/WebProcess/WebPage/TiledDrawingArea.cpp (94677 => 94678)
--- trunk/Source/WebKit2/WebProcess/WebPage/TiledDrawingArea.cpp 2011-09-07 17:05:41 UTC (rev 94677)
+++ trunk/Source/WebKit2/WebProcess/WebPage/TiledDrawingArea.cpp 2011-09-07 17:07:38 UTC (rev 94678)
@@ -76,7 +76,13 @@
m_visibleContentRect = visibleContentsRect;
if (scale != m_mainBackingStore->contentsScale()) {
- m_previousBackingStore = m_mainBackingStore.release();
+ // Keep the tiles for the previous scale until enough content is available to be shown on the screen for the new scale.
+ // If we already have a previous set of tiles it means that two scale changed happened successively.
+ // In that case, make sure that our current main tiles have more content to show than the "previous previous"
+ // within the visible rect before replacing it.
+ if (!m_previousBackingStore || m_mainBackingStore->coverageRatio(m_visibleContentRect) > m_previousBackingStore->coverageRatio(m_visibleContentRect))
+ m_previousBackingStore = m_mainBackingStore.release();
+
m_mainBackingStore = adoptPtr(new TiledBackingStore(this, TiledBackingStoreRemoteTileBackend::create(this)));
m_mainBackingStore->setContentsScale(scale);
} else
@@ -122,6 +128,12 @@
m_webPage->send(Messages::DrawingAreaProxy::DidRenderFrame());
m_isWaitingForUIProcess = true;
m_didSendTileUpdate = false;
+
+ // Make sure that we destroy the previous backing store and remove its tiles only after DidRenderFrame
+ // was sent to swap recently created tiles' buffer. Else a frame could be rendered after the previous
+ // tiles were removed and before the new tile have their first back buffer swapped.
+ if (m_previousBackingStore && m_mainBackingStore->coverageRatio(m_visibleContentRect) >= 1.0f)
+ m_previousBackingStore.clear();
}
}
@@ -149,9 +161,6 @@
{
m_webPage->send(Messages::DrawingAreaProxy::CreateTile(tileID, updateInfo));
m_didSendTileUpdate = true;
-
- if (m_previousBackingStore && m_mainBackingStore->coverageRatio(m_visibleContentRect) >= 1.0f)
- m_previousBackingStore.clear();
}
void TiledDrawingArea::updateTile(int tileID, const UpdateInfo& updateInfo)
{
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes