Title: [94675] trunk/Source/WebKit2
- Revision
- 94675
- Author
- [email protected]
- Date
- 2011-09-07 09:43:19 -0700 (Wed, 07 Sep 2011)
Log Message
[Qt][WK2] The scene graph is rendered continuously even when the page is idle.
https://bugs.webkit.org/show_bug.cgi?id=67195
Reviewed by Tor Arne Vestbø.
Since tiledBackingStorePaintEnd is called even when no tile is dirty, the TiledDrawingArea
and its proxy are looping over DidRenderFrame and RenderNextFrame messages.
This causes QSGItem::update() to be called and consumes a lot of useless CPU cycles on the UI process.
Introduce a bool to send DidRenderFrame only when dirty content was rendered.
* WebProcess/WebPage/TiledDrawingArea.cpp:
(WebKit::TiledDrawingArea::TiledDrawingArea):
(WebKit::TiledDrawingArea::tiledBackingStorePaint):
(WebKit::TiledDrawingArea::tiledBackingStorePaintEnd):
* WebProcess/WebPage/TiledDrawingArea.h:
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (94674 => 94675)
--- trunk/Source/WebKit2/ChangeLog 2011-09-07 16:42:00 UTC (rev 94674)
+++ trunk/Source/WebKit2/ChangeLog 2011-09-07 16:43:19 UTC (rev 94675)
@@ -1,5 +1,24 @@
2011-08-30 Jocelyn Turcotte <[email protected]>
+ [Qt][WK2] The scene graph is rendered continuously even when the page is idle.
+ https://bugs.webkit.org/show_bug.cgi?id=67195
+
+ Reviewed by Tor Arne Vestbø.
+
+ Since tiledBackingStorePaintEnd is called even when no tile is dirty, the TiledDrawingArea
+ and its proxy are looping over DidRenderFrame and RenderNextFrame messages.
+ This causes QSGItem::update() to be called and consumes a lot of useless CPU cycles on the UI process.
+
+ Introduce a bool to send DidRenderFrame only when dirty content was rendered.
+
+ * WebProcess/WebPage/TiledDrawingArea.cpp:
+ (WebKit::TiledDrawingArea::TiledDrawingArea):
+ (WebKit::TiledDrawingArea::tiledBackingStorePaint):
+ (WebKit::TiledDrawingArea::tiledBackingStorePaintEnd):
+ * WebProcess/WebPage/TiledDrawingArea.h:
+
+2011-08-30 Jocelyn Turcotte <[email protected]>
+
[Qt][WK2] Make sure that the visible content rect and the content scale get to the web process in one single message.
https://bugs.webkit.org/show_bug.cgi?id=67189
Modified: trunk/Source/WebKit2/WebProcess/WebPage/TiledDrawingArea.cpp (94674 => 94675)
--- trunk/Source/WebKit2/WebProcess/WebPage/TiledDrawingArea.cpp 2011-09-07 16:42:00 UTC (rev 94674)
+++ trunk/Source/WebKit2/WebProcess/WebPage/TiledDrawingArea.cpp 2011-09-07 16:43:19 UTC (rev 94675)
@@ -43,6 +43,7 @@
: DrawingArea(DrawingAreaTypeTiled, webPage)
, m_suspended(false)
, m_isWaitingForUIProcess(false)
+ , m_didSendTileUpdate(false)
, m_mainBackingStore(adoptPtr(new TiledBackingStore(this, TiledBackingStoreRemoteTileBackend::create(this))))
{
}
@@ -115,10 +116,13 @@
void TiledDrawingArea::tiledBackingStorePaintEnd(const Vector<IntRect>& paintedArea)
{
- // Since we know that all tile updates following a page invalidate will all be rendered
- // in one paint pass for all the tiles, we can send the swap tile message here.
- m_webPage->send(Messages::DrawingAreaProxy::DidRenderFrame());
- m_isWaitingForUIProcess = true;
+ if (m_didSendTileUpdate) {
+ // Since we know that all tile updates following a page invalidate will all be rendered
+ // in one paint pass for all the tiles, we can send the swap tile message here.
+ m_webPage->send(Messages::DrawingAreaProxy::DidRenderFrame());
+ m_isWaitingForUIProcess = true;
+ m_didSendTileUpdate = false;
+ }
}
bool TiledDrawingArea::tiledBackingStoreUpdatesAllowed() const
@@ -144,6 +148,7 @@
void TiledDrawingArea::createTile(int tileID, const UpdateInfo& updateInfo)
{
m_webPage->send(Messages::DrawingAreaProxy::CreateTile(tileID, updateInfo));
+ m_didSendTileUpdate = true;
if (m_previousBackingStore && m_mainBackingStore->coverageRatio(m_visibleContentRect) >= 1.0f)
m_previousBackingStore.clear();
@@ -151,6 +156,7 @@
void TiledDrawingArea::updateTile(int tileID, const UpdateInfo& updateInfo)
{
m_webPage->send(Messages::DrawingAreaProxy::UpdateTile(tileID, updateInfo));
+ m_didSendTileUpdate = true;
}
void TiledDrawingArea::removeTile(int tileID)
{
Modified: trunk/Source/WebKit2/WebProcess/WebPage/TiledDrawingArea.h (94674 => 94675)
--- trunk/Source/WebKit2/WebProcess/WebPage/TiledDrawingArea.h 2011-09-07 16:42:00 UTC (rev 94674)
+++ trunk/Source/WebKit2/WebProcess/WebPage/TiledDrawingArea.h 2011-09-07 16:43:19 UTC (rev 94675)
@@ -75,6 +75,7 @@
bool m_suspended;
bool m_isWaitingForUIProcess;
+ bool m_didSendTileUpdate;
WebCore::IntRect m_visibleContentRect;
OwnPtr<WebCore::TiledBackingStore> m_mainBackingStore;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes