Changeset 196803 in webkit


Ignore:
Timestamp:
Feb 18, 2016 11:27:28 PM (8 years ago)
Author:
yoon@igalia.com
Message:

[GTK] Limit the number of tiles according to the visible area
https://bugs.webkit.org/show_bug.cgi?id=126122

Reviewed by Carlos Garcia Campos.

Source/WebCore:

TextureMapperTiledBackingStore creates tiles for whole layer bounds, which
means it creates the huge amount of textures if there is an excessively big
layer. Not only it wastes the memory and the CPU time, it even can crash GPU
drivers.

This patch modifies TextureMapperTiledBackingStore to take into account the
visible area with a coverage multiplier when creating tiles.

  • platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:

(WebCore::GraphicsLayerTextureMapper::GraphicsLayerTextureMapper):
Set a flag to recalculate the visible area of the layer when there are
geometric changes.
(WebCore::GraphicsLayerTextureMapper::setContentsToImage):
(WebCore::GraphicsLayerTextureMapper::flushCompositingStateForThisLayerOnly):
(WebCore::GraphicsLayerTextureMapper::updateBackingStoreIncludingSubLayers):
(WebCore::GraphicsLayerTextureMapper::updateBackingStoreIfNeeded):
(WebCore::GraphicsLayerTextureMapper::markVisibleRectAsDirty):
(WebCore::GraphicsLayerTextureMapper::selfOrAncestorHasActiveTransformAnimation):
(WebCore::GraphicsLayerTextureMapper::computeTransformedVisibleRect):
Compute the inverse transform matrix to map a global visible are to
the local visible area.
(WebCore::clampToContentsRectIfRectIsInfinite):
(WebCore::GraphicsLayerTextureMapper::transformedVisibleRect):

  • platform/graphics/texmap/TextureMapperTiledBackingStore.cpp:

(WebCore::TextureMapperTiledBackingStore::paintToTextureMapper):
In HiDPI, the directly composited image is uploaded to the unscaled
texture to reduce memory usages. So we should apply device scale
factor to render it correctly.
(WebCore::TextureMapperTiledBackingStore::createOrDestroyTilesIfNeeded):
Create tiles which covered by visible rect with a coverage multiplier.

Source/WebKit2:

  • WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:

(WebKit::LayerTreeHostGtk::initialize): Because we creates
nonCompositingLayer with a size of current view, we should not apply
the currently visible rect when creating / deleting tiles.
(WebKit::LayerTreeHostGtk::flushPendingLayerChanges): Passes the current
visible rect to the GraphicsLayers.

Location:
trunk/Source
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r196802 r196803  
     12016-02-18  Gwang Yoon Hwang  <yoon@igalia.com>
     2
     3        [GTK] Limit the number of tiles according to the visible area
     4        https://bugs.webkit.org/show_bug.cgi?id=126122
     5
     6        Reviewed by Carlos Garcia Campos.
     7
     8        TextureMapperTiledBackingStore creates tiles for whole layer bounds, which
     9        means it creates the huge amount of textures if there is an excessively big
     10        layer.  Not only it wastes the memory and the CPU time, it even can crash GPU
     11        drivers.
     12
     13        This patch modifies TextureMapperTiledBackingStore to take into account the
     14        visible area with a coverage multiplier when creating tiles.
     15
     16        * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
     17        (WebCore::GraphicsLayerTextureMapper::GraphicsLayerTextureMapper):
     18        Set a flag to recalculate the visible area of the layer when there are
     19        geometric changes.
     20        (WebCore::GraphicsLayerTextureMapper::setContentsToImage):
     21        (WebCore::GraphicsLayerTextureMapper::flushCompositingStateForThisLayerOnly):
     22        (WebCore::GraphicsLayerTextureMapper::updateBackingStoreIncludingSubLayers):
     23        (WebCore::GraphicsLayerTextureMapper::updateBackingStoreIfNeeded):
     24        (WebCore::GraphicsLayerTextureMapper::markVisibleRectAsDirty):
     25        (WebCore::GraphicsLayerTextureMapper::selfOrAncestorHasActiveTransformAnimation):
     26        (WebCore::GraphicsLayerTextureMapper::computeTransformedVisibleRect):
     27        Compute the inverse transform matrix to map a global visible are to
     28        the local visible area.
     29        (WebCore::clampToContentsRectIfRectIsInfinite):
     30        (WebCore::GraphicsLayerTextureMapper::transformedVisibleRect):
     31        * platform/graphics/texmap/TextureMapperTiledBackingStore.cpp:
     32        (WebCore::TextureMapperTiledBackingStore::paintToTextureMapper):
     33        In HiDPI, the directly composited image is uploaded to the unscaled
     34        texture to reduce memory usages. So we should apply device scale
     35        factor to render it correctly.
     36        (WebCore::TextureMapperTiledBackingStore::createOrDestroyTilesIfNeeded):
     37        Create tiles which covered by visible rect with a coverage multiplier.
     38
    1392016-02-18  Brent Fulgham  <bfulgham@apple.com>
    240
  • trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp

    r194445 r196803  
    4949    , m_animationStartTime(0)
    5050    , m_isScrollable(false)
     51    , m_isNonCompositingLayer(false)
     52    , m_isVisibleRectDirty(true)
    5153{
    5254}
     
    168170    GraphicsLayer::setPosition(value);
    169171    notifyChange(PositionChange);
     172    markVisibleRectAsDirty();
    170173}
    171174
     
    176179    GraphicsLayer::setAnchorPoint(value);
    177180    notifyChange(AnchorPointChange);
     181    markVisibleRectAsDirty();
    178182}
    179183
     
    187191        maskLayer()->setSize(value);
    188192    notifyChange(SizeChange);
     193    markVisibleRectAsDirty();
    189194}
    190195
     
    196201    GraphicsLayer::setTransform(value);
    197202    notifyChange(TransformChange);
     203    markVisibleRectAsDirty();
    198204}
    199205
     
    204210    GraphicsLayer::setChildrenTransform(value);
    205211    notifyChange(ChildrenTransformChange);
     212    markVisibleRectAsDirty();
    206213}
    207214
     
    212219    GraphicsLayer::setPreserves3D(value);
    213220    notifyChange(Preserves3DChange);
     221    markVisibleRectAsDirty();
    214222}
    215223
     
    220228    GraphicsLayer::setMasksToBounds(value);
    221229    notifyChange(MasksToBoundsChange);
     230    markVisibleRectAsDirty();
    222231}
    223232
     
    302311        m_compositedImage->setContentsToImage(image);
    303312        m_compositedImage->updateContentsScale(pageScaleFactor() * deviceScaleFactor());
     313        m_compositedImage->updateContentsSize(image->size());
    304314    } else {
    305315        m_compositedNativeImagePtr = nullptr;
     
    370380    commitLayerChanges();
    371381    m_layer.syncAnimations();
     382    if (!m_isNonCompositingLayer)
     383        computeTransformedVisibleRect();
    372384}
    373385
     
    513525}
    514526
    515 void GraphicsLayerTextureMapper::updateBackingStoreIncludingSubLayers()
     527void GraphicsLayerTextureMapper::updateBackingStoreIncludingSubLayers(const FloatRect& visibleContentRect)
    516528{
    517529    if (!m_layer.textureMapper())
    518530        return;
    519531
    520     updateBackingStoreIfNeeded();
     532    updateBackingStoreIfNeeded(visibleContentRect);
    521533
    522534    if (maskLayer())
    523         downcast<GraphicsLayerTextureMapper>(*maskLayer()).updateBackingStoreIfNeeded();
     535        downcast<GraphicsLayerTextureMapper>(*maskLayer()).updateBackingStoreIfNeeded(visibleContentRect);
    524536    if (replicaLayer())
    525         downcast<GraphicsLayerTextureMapper>(*replicaLayer()).updateBackingStoreIfNeeded();
     537        downcast<GraphicsLayerTextureMapper>(*replicaLayer()).updateBackingStoreIfNeeded(visibleContentRect);
    526538    for (auto* child : children())
    527         downcast<GraphicsLayerTextureMapper>(*child).updateBackingStoreIncludingSubLayers();
    528 }
    529 
    530 void GraphicsLayerTextureMapper::updateBackingStoreIfNeeded()
     539        downcast<GraphicsLayerTextureMapper>(*child).updateBackingStoreIncludingSubLayers(visibleContentRect);
     540}
     541
     542void GraphicsLayerTextureMapper::updateBackingStoreIfNeeded(const FloatRect& visibleContentRect)
    531543{
    532544    TextureMapper* textureMapper = m_layer.textureMapper();
     
    548560    TextureMapperTiledBackingStore* backingStore = static_cast<TextureMapperTiledBackingStore*>(m_backingStore.get());
    549561    backingStore->updateContentsScale(pageScaleFactor() * deviceScaleFactor());
     562    backingStore->updateContentsSize(m_size);
    550563
    551564    dirtyRect.scale(pageScaleFactor() * deviceScaleFactor());
    552     backingStore->updateContents(*textureMapper, this, m_size, dirtyRect, BitmapTexture::UpdateCanModifyOriginalImageData);
     565    backingStore->updateContents(*textureMapper, this, transformedVisibleRect(visibleContentRect), dirtyRect, BitmapTexture::UpdateCanModifyOriginalImageData);
    553566
    554567    m_needsDisplay = false;
     
    627640}
    628641
     642void GraphicsLayerTextureMapper::markVisibleRectAsDirty()
     643{
     644    m_isVisibleRectDirty = true;
     645
     646    if (maskLayer())
     647        downcast<GraphicsLayerTextureMapper>(*maskLayer()).markVisibleRectAsDirty();
     648    if (replicaLayer())
     649        downcast<GraphicsLayerTextureMapper>(*replicaLayer()).markVisibleRectAsDirty();
     650    for (auto* child : children())
     651        downcast<GraphicsLayerTextureMapper>(*child).markVisibleRectAsDirty();
     652}
     653
     654bool GraphicsLayerTextureMapper::selfOrAncestorHasActiveTransformAnimation() const
     655{
     656    if (m_animations.hasActiveAnimationsOfType(AnimatedPropertyTransform))
     657        return true;
     658
     659    if (!parent())
     660        return false;
     661
     662    return downcast<GraphicsLayerTextureMapper>(*parent()).selfOrAncestorHasActiveTransformAnimation();
     663}
     664
     665void GraphicsLayerTextureMapper::computeTransformedVisibleRect()
     666{
     667    if (!m_isVisibleRectDirty && !selfOrAncestorHasActiveTransformAnimation())
     668        return;
     669
     670    m_isVisibleRectDirty = false;
     671    TransformationMatrix currentTransform = transform();
     672    if (selfOrAncestorHasActiveTransformAnimation())
     673        client().getCurrentTransform(this, currentTransform);
     674    m_layerTransform.setLocalTransform(currentTransform);
     675
     676    m_layerTransform.setAnchorPoint(m_anchorPoint);
     677    m_layerTransform.setPosition(m_position);
     678    m_layerTransform.setSize(m_size);
     679
     680    m_layerTransform.setFlattening(!preserves3D());
     681    m_layerTransform.setChildrenTransform(childrenTransform());
     682    m_layerTransform.combineTransforms(parent() ? downcast<GraphicsLayerTextureMapper>(*parent()).m_layerTransform.combinedForChildren() : TransformationMatrix());
     683
     684    m_cachedInverseTransform = m_layerTransform.combined().inverse().valueOr(TransformationMatrix());
     685}
     686
     687static void clampToContentsRectIfRectIsInfinite(FloatRect& rect, const FloatSize& contentsSize)
     688{
     689    if (rect.width() >= LayoutUnit::nearlyMax() || rect.width() <= LayoutUnit::nearlyMin()) {
     690        rect.setX(0);
     691        rect.setWidth(contentsSize.width());
     692    }
     693
     694    if (rect.height() >= LayoutUnit::nearlyMax() || rect.height() <= LayoutUnit::nearlyMin()) {
     695        rect.setY(0);
     696        rect.setHeight(contentsSize.height());
     697    }
     698}
     699
     700FloatRect GraphicsLayerTextureMapper::transformedVisibleRect(const FloatRect& visibleContentRect)
     701{
     702    if (m_isNonCompositingLayer)
     703        return FloatRect(FloatPoint::zero(), m_size);
     704
     705    // Non-invertible layers are not visible.
     706    if (!m_layerTransform.combined().isInvertible())
     707        return IntRect();
     708
     709    // Return a projection of the visible rect (surface coordinates) onto the layer's plane (layer coordinates).
     710    // The resulting quad might be squewed and the visible rect is the bounding box of this quad,
     711    // so it might spread further than the real visible area (and then even more amplified by the cover rect multiplier).
     712    ASSERT(m_cachedInverseTransform == m_layerTransform.combined().inverse().valueOr(TransformationMatrix()));
     713    FloatRect rect = m_cachedInverseTransform.clampedBoundsOfProjectedQuad(FloatQuad(visibleContentRect));
     714    clampToContentsRectIfRectIsInfinite(rect, size());
     715    return rect;
     716}
     717
    629718}
    630719#endif
  • trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.h

    r193630 r196803  
    8787    virtual void flushCompositingStateForThisLayerOnly(bool) override;
    8888
    89     void updateBackingStoreIncludingSubLayers();
     89    void updateBackingStoreIncludingSubLayers(const FloatRect&);
    9090
    9191    TextureMapperLayer& layer() { return m_layer; }
     
    103103
    104104    void setAnimations(const TextureMapperAnimations&);
     105    void setAsNonCompositingLayer() { m_isNonCompositingLayer = true; }
    105106
    106107private:
     
    114115    void commitLayerChanges();
    115116    void updateDebugBorderAndRepaintCount();
    116     void updateBackingStoreIfNeeded();
     117    void updateBackingStoreIfNeeded(const FloatRect&);
    117118    void prepareBackingStoreIfNeeded();
    118119    bool shouldHaveBackingStore() const;
     120
     121    bool selfOrAncestorHasActiveTransformAnimation() const;
     122    void computeTransformedVisibleRect();
     123    void markVisibleRectAsDirty();
     124    FloatRect transformedVisibleRect(const FloatRect&);
    119125
    120126    // This set of flags help us defer which properties of the layer have been
     
    183189    IntSize m_committedScrollOffset;
    184190    bool m_isScrollable;
     191
     192    bool m_isNonCompositingLayer;
     193    bool m_isVisibleRectDirty;
     194    GraphicsLayerTransform m_layerTransform;
     195    TransformationMatrix m_cachedInverseTransform;
    185196};
    186197
  • trunk/Source/WebCore/platform/graphics/texmap/TextureMapperTiledBackingStore.cpp

    r194103 r196803  
    3636        return;
    3737
    38     updateContents(textureMapper, m_image.get(), m_image->size(), enclosingIntRect(m_image->rect()), BitmapTexture::UpdateCannotModifyOriginalImageData);
     38    updateContents(textureMapper, m_image.get(), m_image->rect(), enclosingIntRect(m_image->rect()), BitmapTexture::UpdateCannotModifyOriginalImageData);
    3939
    4040    if (m_image->imageObserver())
     
    4545TransformationMatrix TextureMapperTiledBackingStore::adjustedTransformForRect(const FloatRect& targetRect)
    4646{
    47     return TransformationMatrix::rectToRect(rect(), targetRect);
     47    FloatRect scaledContentsRect(FloatPoint::zero(), m_contentsSize);
     48    scaledContentsRect.scale(m_contentsScale);
     49    return TransformationMatrix::rectToRect(scaledContentsRect, targetRect);
    4850}
    4951
    5052void TextureMapperTiledBackingStore::paintToTextureMapper(TextureMapper& textureMapper, const FloatRect& targetRect, const TransformationMatrix& transform, float opacity)
    5153{
     54    FloatRect scaledTargetRect(targetRect);
     55    if (m_image)
     56        scaledTargetRect.scale(m_contentsScale);
     57
    5258    updateContentsFromImageIfNeeded(textureMapper);
    53     TransformationMatrix adjustedTransform = transform * adjustedTransformForRect(targetRect);
    54     for (auto& tile : m_tiles)
    55         tile.paint(textureMapper, adjustedTransform, opacity, calculateExposedTileEdges(rect(), tile.rect()));
     59    TransformationMatrix adjustedTransform = transform * adjustedTransformForRect(scaledTargetRect);
     60    FloatRect scaledContentsRect(FloatPoint::zero(), m_contentsSize);
     61    scaledContentsRect.scale(m_contentsScale);
     62    for (auto& tile : m_tiles)
     63        tile.paint(textureMapper, adjustedTransform, opacity, calculateExposedTileEdges(scaledContentsRect, tile.rect()));
    5664}
    5765
     
    7987}
    8088
    81 void TextureMapperTiledBackingStore::createOrDestroyTilesIfNeeded(const FloatSize& size, const IntSize& tileSize, bool hasAlpha)
    82 {
    83     if (size == m_size && !m_isScaleDirty)
    84         return;
    85 
    86     m_size = size;
     89void TextureMapperTiledBackingStore::updateContentsSize(const FloatSize& size)
     90{
     91    if (m_contentsSize == size)
     92        return;
     93
     94    m_isSizeDirty = true;
     95    m_contentsSize = size;
     96}
     97
     98void TextureMapperTiledBackingStore::createOrDestroyTilesIfNeeded(const FloatRect& visibleRect, const IntSize& tileSize, bool hasAlpha)
     99{
     100    if (visibleRect == m_visibleRect && !m_isScaleDirty && !m_isSizeDirty)
     101        return;
     102
     103    m_visibleRect = visibleRect;
    87104    m_isScaleDirty = false;
    88 
    89     FloatSize scaledSize(m_size);
    90     if (!m_image)
    91         scaledSize.scale(m_contentsScale);
     105    m_isSizeDirty = false;
     106
     107    FloatRect scaledContentsRect(FloatRect(FloatPoint::zero(), m_contentsSize));
     108    FloatRect scaledVisibleRect(m_visibleRect);
     109
     110    static const float coverRectMultiplier = 1.2;
     111    FloatPoint delta(scaledVisibleRect.center());
     112    delta.scale(1 - coverRectMultiplier, 1 - coverRectMultiplier);
     113
     114    scaledVisibleRect.scale(coverRectMultiplier);
     115    scaledVisibleRect.moveBy(delta);
     116    if (!m_image) {
     117        scaledContentsRect.scale(m_contentsScale);
     118        scaledVisibleRect.scale(m_contentsScale);
     119    }
    92120
    93121    Vector<FloatRect> tileRectsToAdd;
     
    97125    // This method recycles tiles. We check which tiles we need to add, which to remove, and use as many
    98126    // removable tiles as replacement for new tiles when possible.
    99     for (float y = 0; y < scaledSize.height(); y += tileSize.height()) {
    100         for (float x = 0; x < scaledSize.width(); x += tileSize.width()) {
     127    for (float y = 0; y < scaledContentsRect.height(); y += tileSize.height()) {
     128        for (float x = 0; x < scaledContentsRect.width(); x += tileSize.width()) {
    101129            FloatRect tileRect(x, y, tileSize.width(), tileSize.height());
    102             tileRect.intersect(rect());
    103             tileRectsToAdd.append(tileRect);
     130            tileRect.intersect(scaledContentsRect);
     131            if (tileRect.intersects(scaledVisibleRect))
     132                tileRectsToAdd.append(tileRect);
    104133        }
    105134    }
     
    151180}
    152181
    153 void TextureMapperTiledBackingStore::updateContents(TextureMapper& textureMapper, Image* image, const FloatSize& totalSize, const IntRect& dirtyRect, BitmapTexture::UpdateContentsFlag updateContentsFlag)
    154 {
    155     createOrDestroyTilesIfNeeded(totalSize, textureMapper.maxTextureSize(), !image->currentFrameKnownToBeOpaque());
     182void TextureMapperTiledBackingStore::updateContents(TextureMapper& textureMapper, Image* image, const FloatRect& visibleRect, const IntRect& dirtyRect, BitmapTexture::UpdateContentsFlag updateContentsFlag)
     183{
     184    createOrDestroyTilesIfNeeded(visibleRect, textureMapper.maxTextureSize(), !image->currentFrameKnownToBeOpaque());
    156185    for (auto& tile : m_tiles)
    157186        tile.updateContents(textureMapper, image, dirtyRect, updateContentsFlag);
    158187}
    159188
    160 void TextureMapperTiledBackingStore::updateContents(TextureMapper& textureMapper, GraphicsLayer* sourceLayer, const FloatSize& totalSize, const IntRect& dirtyRect, BitmapTexture::UpdateContentsFlag updateContentsFlag)
    161 {
    162     createOrDestroyTilesIfNeeded(totalSize, textureMapper.maxTextureSize(), true);
     189void TextureMapperTiledBackingStore::updateContents(TextureMapper& textureMapper, GraphicsLayer* sourceLayer, const FloatRect& visibleRect, const IntRect& dirtyRect, BitmapTexture::UpdateContentsFlag updateContentsFlag)
     190{
     191    createOrDestroyTilesIfNeeded(visibleRect, textureMapper.maxTextureSize(), true);
    163192    for (auto& tile : m_tiles)
    164193        tile.updateContents(textureMapper, sourceLayer, dirtyRect, updateContentsFlag, m_contentsScale);
  • trunk/Source/WebCore/platform/graphics/texmap/TextureMapperTiledBackingStore.h

    r194103 r196803  
    4444
    4545    void updateContentsScale(float);
    46     void updateContents(TextureMapper&, Image*, const FloatSize&, const IntRect&, BitmapTexture::UpdateContentsFlag);
    47     void updateContents(TextureMapper&, GraphicsLayer*, const FloatSize&, const IntRect&, BitmapTexture::UpdateContentsFlag);
     46    void updateContentsSize(const FloatSize&);
     47
     48    void updateContents(TextureMapper&, Image*, const FloatRect& visibleRect, const IntRect& dirtyRect, BitmapTexture::UpdateContentsFlag);
     49    void updateContents(TextureMapper&, GraphicsLayer*, const FloatRect& visibleRect, const IntRect& dirtyRect, BitmapTexture::UpdateContentsFlag);
    4850
    4951    void setContentsToImage(Image* image) { m_image = image; }
     
    5254    TextureMapperTiledBackingStore() { }
    5355
    54     void createOrDestroyTilesIfNeeded(const FloatSize& backingStoreSize, const IntSize& tileSize, bool hasAlpha);
     56    void createOrDestroyTilesIfNeeded(const FloatRect& visibleRect, const IntSize& tileSize, bool hasAlpha);
    5557    void updateContentsFromImageIfNeeded(TextureMapper&);
    5658    TransformationMatrix adjustedTransformForRect(const FloatRect&);
    57     inline FloatRect rect() const
    58     {
    59         FloatRect rect(FloatPoint::zero(), m_size);
    60         rect.scale(m_contentsScale);
    61         return rect;
    62     }
    6359
    6460    Vector<TextureMapperTile> m_tiles;
    65     FloatSize m_size;
     61    FloatSize m_contentsSize;
     62    FloatRect m_visibleRect;
     63    FloatRect m_scaledvisibleRect;
    6664    RefPtr<Image> m_image;
    6765    float m_contentsScale { 1 };
    6866    bool m_isScaleDirty { false };
     67    bool m_isSizeDirty { false };
    6968};
    7069
  • trunk/Source/WebKit2/ChangeLog

    r196786 r196803  
     12016-02-18  Gwang Yoon Hwang  <yoon@igalia.com>
     2
     3        [GTK] Limit the number of tiles according to the visible area
     4        https://bugs.webkit.org/show_bug.cgi?id=126122
     5
     6        Reviewed by Carlos Garcia Campos.
     7
     8        * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
     9        (WebKit::LayerTreeHostGtk::initialize): Because we creates
     10        nonCompositingLayer with a size of current view, we should not apply
     11        the currently visible rect when creating / deleting tiles.
     12        (WebKit::LayerTreeHostGtk::flushPendingLayerChanges): Passes the current
     13        visible rect to the GraphicsLayers.
     14
    1152016-02-18  Brady Eidson  <beidson@apple.com>
    216
  • trunk/Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp

    r194496 r196803  
    173173    // The non-composited contents are a child of the root layer.
    174174    m_nonCompositedContentLayer = GraphicsLayer::create(graphicsLayerFactory(), *this);
     175    downcast<GraphicsLayerTextureMapper>(*m_nonCompositedContentLayer).setAsNonCompositingLayer();
    175176    m_nonCompositedContentLayer->setDrawsContent(true);
    176177    m_nonCompositedContentLayer->setContentsOpaque(m_webPage->drawsBackground());
     
    323324        m_viewOverlayRootLayer->flushCompositingState(FloatRect(FloatPoint(), m_rootLayer->size()), viewportIsStable);
    324325
    325     downcast<GraphicsLayerTextureMapper>(*m_rootLayer).updateBackingStoreIncludingSubLayers();
     326    FloatRect visibleRect(m_webPage->mainFrame()->view()->scrollPosition(), m_webPage->size());
     327    downcast<GraphicsLayerTextureMapper>(*m_rootLayer).updateBackingStoreIncludingSubLayers(visibleRect);
    326328    return true;
    327329}
Note: See TracChangeset for help on using the changeset viewer.