2010-07-01 Simon Fraser <simon.fraser@apple.com>
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 1 Jul 2010 22:23:37 +0000 (22:23 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 1 Jul 2010 22:23:37 +0000 (22:23 +0000)
commitb7d030c2cec119dd37ef72d22691c5745dd6fefa
treea764b90dd0b719c9850193a392ffd77385b772af
parent59586489d15114d4fe1fd4759195f0cd97c53f7c
2010-07-01  Simon Fraser  <simon.fraser@apple.com>

        Reviewed by Anders Carlsson.

        Get accelerated compositing working with webkit2
        https://bugs.webkit.org/show_bug.cgi?id=41084

        Add a new kind of DrawingArea, which is a LayerBackedDrawingArea, which will be used
        when the page goes into accelerated compositing mode. It is not wired up yet.

        * Shared/CoreIPCSupport/DrawingAreaProxyMessageKinds.h: New 'attach' and 'detach' messages
        related to accelerated compositing.

        * UIProcess/API/mac/WKView.mm:
        (-[WKView _startAcceleratedCompositing:]):
        (-[WKView _stopAcceleratedCompositing]):
        * UIProcess/API/mac/WKViewInternal.h:
        Add a subview of the WKView which has layer-backing enabled, and put the drawing area's
        layer inside of that.

        * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
        (WebKit::ChunkedUpdateDrawingAreaProxy::attachCompositingContext):
        (WebKit::ChunkedUpdateDrawingAreaProxy::detachCompositingContext): These methods will never be called
        on the ChunkedUpdateDrawingArea. Stub them out.

        * UIProcess/DrawingAreaProxy.h:
        Add attachCompositingContext() and detachCompositingContext() methods, and a new drawing area
        type to the enum.

        * UIProcess/LayerBackedDrawingAreaProxy.cpp: Added.
        * UIProcess/LayerBackedDrawingAreaProxy.h: Added.
        * UIProcess/mac/LayerBackedDrawingAreaProxyMac.mm: Added.

        * WebKit2.xcodeproj/project.pbxproj: Add LayerBackedDrawingArea files.

        * WebProcess/WebPage/ChunkedUpdateDrawingArea.h: Add virtual methods stubs.

        * WebProcess/WebPage/DrawingArea.cpp:
        (WebKit::DrawingArea::create): Create a LayerBackedDrawingArea if asked.
        * WebProcess/WebPage/DrawingArea.h: New LayerBackedDrawingAreaType type, and new virtual
        methods related to accelerated compositing.

        * WebProcess/WebPage/LayerBackedDrawingArea.cpp: Added.
        * WebProcess/WebPage/LayerBackedDrawingArea.h: Added.
        * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@62303 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed:
WebKit2/ChangeLog
WebKit2/Shared/CoreIPCSupport/DrawingAreaProxyMessageKinds.h
WebKit2/UIProcess/API/mac/WKView.mm
WebKit2/UIProcess/API/mac/WKViewInternal.h
WebKit2/UIProcess/ChunkedUpdateDrawingAreaProxy.h
WebKit2/UIProcess/DrawingAreaProxy.h
WebKit2/UIProcess/LayerBackedDrawingAreaProxy.cpp [new file with mode: 0644]
WebKit2/UIProcess/LayerBackedDrawingAreaProxy.h [new file with mode: 0644]
WebKit2/UIProcess/mac/LayerBackedDrawingAreaProxyMac.mm [new file with mode: 0644]
WebKit2/WebKit2.xcodeproj/project.pbxproj
WebKit2/WebProcess/WebPage/ChunkedUpdateDrawingArea.h
WebKit2/WebProcess/WebPage/DrawingArea.cpp
WebKit2/WebProcess/WebPage/DrawingArea.h
WebKit2/WebProcess/WebPage/LayerBackedDrawingArea.cpp [new file with mode: 0644]
WebKit2/WebProcess/WebPage/LayerBackedDrawingArea.h [new file with mode: 0644]
WebKit2/WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm [new file with mode: 0644]