Skip to content
  • commit-queue@webkit.org's avatar
    Coordinated Graphics: Remove tiles of a layer when they are off the viewport. · 8b3c3b4f
    commit-queue@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=102313
    
    Patch by Huang Dongsung <luxtella@company100.net> on 2012-11-19
    Reviewed by Noam Rosenthal.
    
    Source/WebKit2:
    
    Currently, we don't remove tiles of the layer with the special properties: a
    transform animation and non affine transform. If a page has a lot of layers with
    a transform animation, we will encounter OOM. So this patch removes the
    privilege of the layer.
    
    There are two changes.
    1. computeTransformedVisibleRect() calculates a layer transform using the
    current local transform which a transform animation applied.
    2. tiledBackingStoreVisibleRect() calculates a visible
    rect of all layers, even if the layer includes the property: a transform
    animation or non affine transform.
    
    Test: animations/animation-offscreen-to-onscreen.html
    
    * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
    (WebCore::CoordinatedGraphicsLayer::effectiveContentsScale):
    (WebCore::CoordinatedGraphicsLayer::tiledBackingStoreVisibleRect):
    (WebCore::CoordinatedGraphicsLayer::hasPendingVisibleChanges):
    (WebCore::CoordinatedGraphicsLayer::computeTransformedVisibleRect):
    (WebCore::CoordinatedGraphicsLayer::selfOrAncestorHasActiveTransformAnimation):
    (WebCore):
    * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
    (CoordinatedGraphicsLayer):
    
    LayoutTests:
    
    This test checks that a compositing layer is rendered if the layer is
    originally transformed off the viewport.
    
    * animations/animation-offscreen-to-onscreen-expected.png: Added.
    * animations/animation-offscreen-to-onscreen-expected.txt: Added.
    * animations/animation-offscreen-to-onscreen.html: Added.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135212 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    8b3c3b4f