Title: [102342] trunk/Source/WebKit2
- Revision
- 102342
- Author
- [email protected]
- Date
- 2011-12-08 08:16:55 -0800 (Thu, 08 Dec 2011)
Log Message
[Qt] [WK2] Directly composited images doesn't render
https://bugs.webkit.org/show_bug.cgi?id=74058
Patch by Viatcheslav Ostapenko <[email protected]> on 2011-12-08
Reviewed by Noam Rosenthal.
Attach image to WebGraphicsLayer even if layerTreeTileClient is not set
and create/assign remote image tiles later during sync.
* WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
(WebCore::WebGraphicsLayer::setContentsNeedsDisplay):
(WebCore::WebGraphicsLayer::setContentsToImage):
(WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (102341 => 102342)
--- trunk/Source/WebKit2/ChangeLog 2011-12-08 16:06:52 UTC (rev 102341)
+++ trunk/Source/WebKit2/ChangeLog 2011-12-08 16:16:55 UTC (rev 102342)
@@ -1,3 +1,18 @@
+2011-12-08 Viatcheslav Ostapenko <[email protected]>
+
+ [Qt] [WK2] Directly composited images doesn't render
+ https://bugs.webkit.org/show_bug.cgi?id=74058
+
+ Reviewed by Noam Rosenthal.
+
+ Attach image to WebGraphicsLayer even if layerTreeTileClient is not set
+ and create/assign remote image tiles later during sync.
+
+ * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
+ (WebCore::WebGraphicsLayer::setContentsNeedsDisplay):
+ (WebCore::WebGraphicsLayer::setContentsToImage):
+ (WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):
+
2011-12-08 Simon Hausmann <[email protected]>
REGRESSION(r102334): Various Qt WK2 layout tests crash
Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebGraphicsLayer.cpp (102341 => 102342)
--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebGraphicsLayer.cpp 2011-12-08 16:06:52 UTC (rev 102341)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebGraphicsLayer.cpp 2011-12-08 16:16:55 UTC (rev 102342)
@@ -317,8 +317,9 @@
void WebGraphicsLayer::setContentsNeedsDisplay()
{
+ RefPtr<Image> image = m_image;
setContentsToImage(0);
- setContentsToImage(m_image.get());
+ setContentsToImage(image.get());
}
void WebGraphicsLayer::setContentsToImage(Image* image)
@@ -326,15 +327,20 @@
if (image == m_image)
return;
WebLayerTreeTileClient* client = layerTreeTileClient();
- if (!client)
- return;
+ int64_t newID = 0;
+ if (client) {
+ // We adopt first, in case this is the same frame - that way we avoid destroying and recreating the image.
+ newID = client->adoptImageBackingStore(image);
+ client->releaseImageBackingStore(m_layerInfo.imageBackingStoreID);
+ notifyChange();
+ if (m_layerInfo.imageBackingStoreID && newID == m_layerInfo.imageBackingStoreID)
+ return;
+ } else {
+ // If client not set yet there should be no backing store ID.
+ ASSERT(!m_layerInfo.imageBackingStoreID);
+ notifyChange();
+ }
- // We adopt first, in case this is the same frame - that way we avoid destroying and recreating the image.
- int64_t newID = client->adoptImageBackingStore(image);
- client->releaseImageBackingStore(m_layerInfo.imageBackingStoreID);
- notifyChange();
- if (newID == m_layerInfo.imageBackingStoreID)
- return;
m_layerInfo.imageBackingStoreID = newID;
m_image = image;
m_layerInfo.imageIsUpdated = true;
@@ -421,6 +427,9 @@
for (size_t i = 0; i < children().size(); ++i)
m_layerInfo.children.append(toWebLayerID(children()[i]));
+ if (m_layerInfo.imageIsUpdated && m_image && !m_layerInfo.imageBackingStoreID)
+ m_layerInfo.imageBackingStoreID = layerTreeTileClient()->adoptImageBackingStore(m_image.get());
+
m_layerTreeTileClient->didSyncCompositingStateForLayer(m_layerInfo);
m_modified = false;
m_layerInfo.imageIsUpdated = false;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes