Skip to content
  • jamesr@google.com's avatar
    [chromium] Need a way to test lost compositor context recovery · ae2928d6
    jamesr@google.com authored
    https://bugs.webkit.org/show_bug.cgi?id=66820
    
    Reviewed by Kenneth Russell.
    
    Source/WebCore:
    
    Adds support for recreating a context as if it was lost, and fixes
    compositeAndReadback() to attempt context recovery.
    
    Test: platform/chromium/compositing/lost-compositor-context.html
    
    * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
    (WebCore::CCLayerTreeHost::compositeAndReadback):
    (WebCore::CCLayerTreeHost::loseCompositorContext):
    * platform/graphics/chromium/cc/CCLayerTreeHost.h:
    
    Source/WebKit/chromium:
    
    Adds a testing-only API to simulate a lost compositor context.
    
    * public/WebView.h:
    * src/WebViewImpl.cpp:
    (WebKit::WebViewImpl::loseCompositorContext):
    * src/WebViewImpl.h:
    
    Tools:
    
    Exposes a LayoutTestController interface in chromium to simulate a
    lost compositor context.
    
    * DumpRenderTree/chromium/LayoutTestController.cpp:
    (LayoutTestController::LayoutTestController):
    (LayoutTestController::loseCompositorContext):
    * DumpRenderTree/chromium/LayoutTestController.h:
    
    LayoutTests:
    
    Adds a simple test for losing the compositor context in a recoverable
    way on a composited page. Tests that we recover without crashing and
    render the updated content on the next frame.
    
    * platform/chromium/compositing/lost-compositor-context.html: Added.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@93681 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    ae2928d6