Skip to content
  • mrobinson@webkit.org's avatar
    [GTK] Add an accelerated compositing implementation for WebKit2 · b847741b
    mrobinson@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=86037
    
    Reviewed by Alejandro G. Castro.
    
    Source/WebCore:
    
    No new tests. These changes are covered by the compositing tests, which
    we will gradually try to turn on for the bots.
    
    Add a new GLContext method for getting to current default framebuffer size, which
    is quite useful for preventing composited content quivering while resizing.
    
    * platform/graphics/cairo/GLContext.h:
    * platform/graphics/glx/GLContextGLX.cpp:
    (WebCore::GLContextGLX::defaultFrameBufferSize): Added this implementation for X11
    which asks the X server for the window size.
    * platform/graphics/glx/GLContextGLX.h:
    
    Source/WebKit2:
    
    Add an implementation of LayerTreeHost for GTK+ that uses TextureMapperGL.
    Later this implementation will fall back to using the ImageBuffer TextureMapper.
    
    * GNUmakefile.am: Add new files to the compilation.
    * Shared/LayerTreeContext.h:
    (LayerTreeContext): The GTK+ version of the LayerTreeContext just holds window handle.
    * Shared/gtk/LayerTreeContextGtk.cpp: Copied from Source/WebKit2/WebProcess/WebPage/LayerTreeHost.cpp.
    * WebProcess/WebPage/gtk/LayerTreeHostGtk.h: Added.
    * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp: Added.
    Add this LayerTreeHost implementation that just creates a GL context from the widget X11 window ID.
    Later implementations might find a more cross-platform solution.
    * WebProcess/WebPage/gtk/WebPageGtk.cpp:
    (WebKit::WebPage::platformInitialize): Initialize the native window handle to be zero.
    (WebKit::WebPage::widgetMapped): When mapping the widget, try to get the native window
    handle and send it to the WebProcess.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@120262 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    b847741b