Changeset 104720 in webkit


Ignore:
Timestamp:
Jan 11, 2012 10:06:57 AM (12 years ago)
Author:
noam.rosenthal@nokia.com
Message:

[Qt][WK2] Directly-composited images sometimes appear with a wrong geometry
https://bugs.webkit.org/show_bug.cgi?id=75882

Reviewed by Simon Hausmann.

When assigning a directly composited image to a TextureMapperNode in WebKit2, we take
contentsRect() onto account. However, contentsRect() might be changed after the image
is already assigned.
We have to reassign the image when contentsRect() changes. This is a pretty cheap
operation, since the image is already converted to a texture and we simply change the
geometric values.

  • UIProcess/qt/LayerTreeHostProxyQt.cpp:

(WebKit::LayerTreeHostProxy::syncLayerParameters):

  • WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:

(WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):

Location:
trunk/Source/WebKit2
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r104709 r104720  
     12012-01-11  No'am Rosenthal  <noam.rosenthal@nokia.com>
     2
     3        [Qt][WK2] Directly-composited images sometimes appear with a wrong geometry
     4        https://bugs.webkit.org/show_bug.cgi?id=75882
     5
     6        Reviewed by Simon Hausmann.
     7
     8        When assigning a directly composited image to a TextureMapperNode in WebKit2, we take
     9        contentsRect() onto account. However, contentsRect() might be changed after the image
     10        is already assigned.
     11        We have to reassign the image when contentsRect() changes. This is a pretty cheap
     12        operation, since the image is already converted to a texture and we simply change the
     13        geometric values.
     14
     15        * UIProcess/qt/LayerTreeHostProxyQt.cpp:
     16        (WebKit::LayerTreeHostProxy::syncLayerParameters):
     17        * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
     18        (WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):
     19
    1202012-01-11  Kenneth Rohde Christiansen  <kenneth@webkit.org>
    221
  • trunk/Source/WebKit2/UIProcess/qt/LayerTreeHostProxyQt.cpp

    r104651 r104720  
    246246    LayerMap::iterator it = m_layers.find(id);
    247247    GraphicsLayer* layer = it->second;
     248    bool needsToUpdateImageTiles = layerInfo.imageIsUpdated || layerInfo.contentsRect != layer->contentsRect();
    248249
    249250    layer->setName(layerInfo.name);
     
    262263    layer->setDrawsContent(layerInfo.drawsContent);
    263264
    264     if (layerInfo.imageIsUpdated)
     265    if (needsToUpdateImageTiles)
    265266        assignImageToLayer(layer, layerInfo.imageBackingStoreID);
    266267
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebGraphicsLayer.cpp

    r104370 r104720  
    416416    m_layerInfo.contentsOpaque = contentsOpaque();
    417417    m_layerInfo.contentsRect = contentsRect();
    418 
    419     // In the shadow layer tree we create in the UI process, layers with directly composited images are always considered to draw content.
    420     // Otherwise, we'd have to check whether an layer with drawsContent==false has a directly composited image multiple times.
    421     m_layerInfo.drawsContent = drawsContent() || m_image;
     418    m_layerInfo.drawsContent = drawsContent();
    422419    m_layerInfo.mask = toWebLayerID(maskLayer());
    423420    m_layerInfo.masksToBounds = masksToBounds();
Note: See TracChangeset for help on using the changeset viewer.