Title: [111567] trunk/Source/WebKit2
- Revision
- 111567
- Author
- [email protected]
- Date
- 2012-03-21 10:25:07 -0700 (Wed, 21 Mar 2012)
Log Message
[Qt] WebGraphicsLayer: Untie the layer updates and tile updates.
https://bugs.webkit.org/show_bug.cgi?id=81771
Reviewed by Kenneth Rohde Christiansen.
The DidRenderFrame message needs to be sent for every UpdateTileForLayer
message, but this currently has to be triggered by m_shouldSyncFrame which
is only set after sending a SyncCompositingLayerState message.
This patch makes sure that tile updates won't trigger sending the whole
layer info if it didn't change, and send the DidRenderFrame message directly.
It also makes sure that the layer info is sent before any tile update so that
the layer can be created on the UI process before any tile update is handled.
* UIProcess/WebLayerTreeRenderer.cpp:
(WebKit::WebLayerTreeRenderer::getBackingStore):
* WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
(WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):
(WebCore::WebGraphicsLayer::tiledBackingStorePaint):
(WebCore::WebGraphicsLayer::createTile):
(WebCore::WebGraphicsLayer::updateTile):
(WebCore::WebGraphicsLayer::removeTile):
* WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
(WebKit::LayerTreeHostQt::createTile):
(WebKit::LayerTreeHostQt::updateTile):
(WebKit::LayerTreeHostQt::removeTile):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (111566 => 111567)
--- trunk/Source/WebKit2/ChangeLog 2012-03-21 17:23:30 UTC (rev 111566)
+++ trunk/Source/WebKit2/ChangeLog 2012-03-21 17:25:07 UTC (rev 111567)
@@ -1,5 +1,34 @@
2012-03-21 Jocelyn Turcotte <[email protected]>
+ [Qt] WebGraphicsLayer: Untie the layer updates and tile updates.
+ https://bugs.webkit.org/show_bug.cgi?id=81771
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ The DidRenderFrame message needs to be sent for every UpdateTileForLayer
+ message, but this currently has to be triggered by m_shouldSyncFrame which
+ is only set after sending a SyncCompositingLayerState message.
+ This patch makes sure that tile updates won't trigger sending the whole
+ layer info if it didn't change, and send the DidRenderFrame message directly.
+
+ It also makes sure that the layer info is sent before any tile update so that
+ the layer can be created on the UI process before any tile update is handled.
+
+ * UIProcess/WebLayerTreeRenderer.cpp:
+ (WebKit::WebLayerTreeRenderer::getBackingStore):
+ * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
+ (WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):
+ (WebCore::WebGraphicsLayer::tiledBackingStorePaint):
+ (WebCore::WebGraphicsLayer::createTile):
+ (WebCore::WebGraphicsLayer::updateTile):
+ (WebCore::WebGraphicsLayer::removeTile):
+ * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
+ (WebKit::LayerTreeHostQt::createTile):
+ (WebKit::LayerTreeHostQt::updateTile):
+ (WebKit::LayerTreeHostQt::removeTile):
+
+2012-03-21 Jocelyn Turcotte <[email protected]>
+
[Qt] Don't clip the contents rendering to the contents size.
https://bugs.webkit.org/show_bug.cgi?id=81770
Modified: trunk/Source/WebKit2/UIProcess/WebLayerTreeRenderer.cpp (111566 => 111567)
--- trunk/Source/WebKit2/UIProcess/WebLayerTreeRenderer.cpp 2012-03-21 17:23:30 UTC (rev 111566)
+++ trunk/Source/WebKit2/UIProcess/WebLayerTreeRenderer.cpp 2012-03-21 17:25:07 UTC (rev 111567)
@@ -274,8 +274,8 @@
PassRefPtr<LayerBackingStore> WebLayerTreeRenderer::getBackingStore(WebLayerID id)
{
- ensureLayer(id);
TextureMapperLayer* layer = toTextureMapperLayer(layerByID(id));
+ ASSERT(layer);
RefPtr<LayerBackingStore> backingStore = static_cast<LayerBackingStore*>(layer->backingStore().get());
if (!backingStore) {
backingStore = LayerBackingStore::create();
Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebGraphicsLayer.cpp (111566 => 111567)
--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebGraphicsLayer.cpp 2012-03-21 17:23:30 UTC (rev 111566)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebGraphicsLayer.cpp 2012-03-21 17:25:07 UTC (rev 111567)
@@ -430,35 +430,37 @@
void WebGraphicsLayer::syncCompositingStateForThisLayerOnly()
{
- updateContentBuffers();
- if (!m_modified)
- return;
+ if (m_modified) {
+ computeTransformedVisibleRect();
- computeTransformedVisibleRect();
- m_layerInfo.name = name();
- m_layerInfo.anchorPoint = anchorPoint();
- m_layerInfo.backfaceVisible = backfaceVisibility();
- m_layerInfo.childrenTransform = childrenTransform();
- m_layerInfo.contentsOpaque = contentsOpaque();
- m_layerInfo.contentsRect = contentsRect();
- m_layerInfo.drawsContent = drawsContent();
- m_layerInfo.mask = toWebLayerID(maskLayer());
- m_layerInfo.masksToBounds = masksToBounds();
- m_layerInfo.opacity = opacity();
- m_layerInfo.parent = toWebLayerID(parent());
- m_layerInfo.pos = position();
- m_layerInfo.preserves3D = preserves3D();
- m_layerInfo.replica = toWebLayerID(replicaLayer());
- m_layerInfo.size = size();
- m_layerInfo.transform = transform();
- m_contentNeedsDisplay = false;
- m_layerInfo.children.clear();
+ m_layerInfo.name = name();
+ m_layerInfo.anchorPoint = anchorPoint();
+ m_layerInfo.backfaceVisible = backfaceVisibility();
+ m_layerInfo.childrenTransform = childrenTransform();
+ m_layerInfo.contentsOpaque = contentsOpaque();
+ m_layerInfo.contentsRect = contentsRect();
+ m_layerInfo.drawsContent = drawsContent();
+ m_layerInfo.mask = toWebLayerID(maskLayer());
+ m_layerInfo.masksToBounds = masksToBounds();
+ m_layerInfo.opacity = opacity();
+ m_layerInfo.parent = toWebLayerID(parent());
+ m_layerInfo.pos = position();
+ m_layerInfo.preserves3D = preserves3D();
+ m_layerInfo.replica = toWebLayerID(replicaLayer());
+ m_layerInfo.size = size();
+ m_layerInfo.transform = transform();
+ m_contentNeedsDisplay = false;
+ m_layerInfo.children.clear();
- for (size_t i = 0; i < children().size(); ++i)
- m_layerInfo.children.append(toWebLayerID(children()[i]));
+ for (size_t i = 0; i < children().size(); ++i)
+ m_layerInfo.children.append(toWebLayerID(children()[i]));
- m_webGraphicsLayerClient->didSyncCompositingStateForLayer(m_layerInfo);
+ m_webGraphicsLayerClient->didSyncCompositingStateForLayer(m_layerInfo);
+ }
+
+ updateContentBuffers();
+
m_modified = false;
m_layerInfo.imageIsUpdated = false;
if (m_hasPendingAnimations)
@@ -514,7 +516,6 @@
{
if (rect.isEmpty())
return;
- m_modified = true;
paintGraphicsLayerContents(*context, rect);
}
@@ -558,19 +559,16 @@
}
void WebGraphicsLayer::createTile(int tileID, const UpdateInfo& updateInfo)
{
- m_modified = true;
m_webGraphicsLayerClient->createTile(id(), tileID, updateInfo);
}
void WebGraphicsLayer::updateTile(int tileID, const UpdateInfo& updateInfo)
{
- m_modified = true;
m_webGraphicsLayerClient->updateTile(id(), tileID, updateInfo);
}
void WebGraphicsLayer::removeTile(int tileID)
{
- m_modified = true;
m_webGraphicsLayerClient->removeTile(id(), tileID);
}
Modified: trunk/Source/WebKit2/WebProcess/WebPage/qt/LayerTreeHostQt.cpp (111566 => 111567)
--- trunk/Source/WebKit2/WebProcess/WebPage/qt/LayerTreeHostQt.cpp 2012-03-21 17:23:30 UTC (rev 111566)
+++ trunk/Source/WebKit2/WebProcess/WebPage/qt/LayerTreeHostQt.cpp 2012-03-21 17:25:07 UTC (rev 111567)
@@ -400,16 +400,19 @@
void LayerTreeHostQt::createTile(WebLayerID layerID, int tileID, const UpdateInfo& updateInfo)
{
+ m_shouldSyncFrame = true;
m_webPage->send(Messages::LayerTreeHostProxy::CreateTileForLayer(layerID, tileID, updateInfo));
}
void LayerTreeHostQt::updateTile(WebLayerID layerID, int tileID, const UpdateInfo& updateInfo)
{
+ m_shouldSyncFrame = true;
m_webPage->send(Messages::LayerTreeHostProxy::UpdateTileForLayer(layerID, tileID, updateInfo));
}
void LayerTreeHostQt::removeTile(WebLayerID layerID, int tileID)
{
+ m_shouldSyncFrame = true;
m_webPage->send(Messages::LayerTreeHostProxy::RemoveTileForLayer(layerID, tileID));
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes