Skip to content
Permalink
Browse files
2010-03-18 Vangelis Kokkevis <vangelis@chromium.org>
        Reviewed by Adam Barth.

        Implement software composited graphics layers in Chromium using the Skia library.
        https://bugs.webkit.org/show_bug.cgi?id=35557
        This is an initial step in the implementation. Layer compositing is functioning
        but not optimized in any way. Subsesquent check-ins will be necessary to fine tune
        it.

        Test: No new exposed functionality so no new tests.

        * WebCore.gypi:
          Added new source files to the chromium build
        * platform/graphics/GraphicsLayer.h:
          Added necessary typedef's and forward declarations for Chromium.
        * platform/graphics/skia/GraphicsLayerSkia.cpp: Added.
        * platform/graphics/skia/GraphicsLayerSkia.h: Added.
          Declaration and implementation of the platform-specific GraphicsLayer class.
        * platform/graphics/skia/LayerRendererSkia.cpp: Added.
        * platform/graphics/skia/LayerRendererSkia.h: Added.
          Declaration and implementation of the Skia-based software compositor.
        * platform/graphics/skia/LayerSkia.cpp: Added.
        * platform/graphics/skia/LayerSkia.h: Added.
          Declaration and implementation of a compositable layer that uses a Skia canvas
          for backing store.
2010-03-18  Vangelis Kokkevis  <vangelis@chromium.org>

        Reviewed by Adam Barth.

        Adding support for the ACCELERATED_COMPOSITING render path to Chromium.
        https://bugs.webkit.org/show_bug.cgi?id=35557
        Currently compositing of layers is performed via s/w compositor which relies on Skia. This is an initial check-in
        and it's only been tested on Windows. Compiling the code requires seting "use_accelerated_compositing=1"
        to GYP_DEFINES. The update of layer contents and compositing is fairly inefficient but this will be fixed in
        subsequent check-ins.

        * src/ChromeClientImpl.cpp:
        (WebKit::ChromeClientImpl::attachRootGraphicsLayer):
        (WebKit::ChromeClientImpl::scheduleCompositingLayerSync):
        * src/ChromeClientImpl.h:
        (WebKit::ChromeClientImpl::setNeedsOneShotDrawingSynchronization):
         Added methods required by the RenderLayerCompositor

        * src/WebFrameImpl.cpp:
        (WebKit::WebFrameImpl::paintWithContext):
        (WebKit::WebFrameImpl::paint):
        * src/WebFrameImpl.h:
        Split WebFrameImpl::paint() into two methods to make it possible to call the paint
        routine with an existing GraphicsContext, which is necessary for painting the root layer into
        its own backing surface.

        * src/WebViewImpl.cpp:
        (WebKit::WebViewImpl::WebViewImpl):
        (WebKit::WebViewImpl::paint):
        Modified method to handle the accelerated compositing path. Now, when doing accelerated compositing,
        paint() results in repainting the contents of the root layer and then doing a composite operation.
        (WebKit::WebViewImpl::setRootGraphicsLayer):
        (WebKit::WebViewImpl::setAcceleratedCompositing):
        (WebKit::WebViewImpl::updateRootLayerContents):
        (WebKit::WebViewImpl::setRootLayerNeedsDisplay):
        * src/WebViewImpl.h:
        (WebKit::WebViewImpl::isAcceleratedCompositing):

Canonical link: https://commits.webkit.org/47506@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@56212 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
eseidel committed Mar 19, 2010
1 parent 9bb979a commit 051ab819fb5ae3787522bdff5ef9d8083e965253
@@ -1,3 +1,30 @@
2010-03-18 Vangelis Kokkevis <vangelis@chromium.org>

Reviewed by Adam Barth.

Implement software composited graphics layers in Chromium using the Skia library.
https://bugs.webkit.org/show_bug.cgi?id=35557
This is an initial step in the implementation. Layer compositing is functioning
but not optimized in any way. Subsesquent check-ins will be necessary to fine tune
it.

Test: No new exposed functionality so no new tests.

* WebCore.gypi:
Added new source files to the chromium build
* platform/graphics/GraphicsLayer.h:
Added necessary typedef's and forward declarations for Chromium.
* platform/graphics/skia/GraphicsLayerSkia.cpp: Added.
* platform/graphics/skia/GraphicsLayerSkia.h: Added.
Declaration and implementation of the platform-specific GraphicsLayer class.
* platform/graphics/skia/LayerRendererSkia.cpp: Added.
* platform/graphics/skia/LayerRendererSkia.h: Added.
Declaration and implementation of the Skia-based software compositor.
* platform/graphics/skia/LayerSkia.cpp: Added.
* platform/graphics/skia/LayerSkia.h: Added.
Declaration and implementation of a compositable layer that uses a Skia canvas
for backing store.

2010-03-18 Kenneth Rohde Christiansen <kenneth@webkit.org>

Reviewed by Darin Adler.
@@ -2176,10 +2176,16 @@
'platform/graphics/skia/GraphicsContextPlatformPrivate.h',
'platform/graphics/skia/GraphicsContextSkia.cpp',
'platform/graphics/skia/GraphicsContext3DSkia.cpp',
'platform/graphics/skia/GraphicsLayerSkia.cpp',
'platform/graphics/skia/GraphicsLayerSkia.h',
'platform/graphics/skia/ImageBufferSkia.cpp',
'platform/graphics/skia/ImageSkia.cpp',
'platform/graphics/skia/IntPointSkia.cpp',
'platform/graphics/skia/IntRectSkia.cpp',
'platform/graphics/skia/LayerRendererSkia.cpp',
'platform/graphics/skia/LayerRendererSkia.h',
'platform/graphics/skia/LayerSkia.cpp',
'platform/graphics/skia/LayerSkia.h',
'platform/graphics/skia/NativeImageSkia.cpp',
'platform/graphics/skia/NativeImageSkia.h',
'platform/graphics/skia/PathSkia.cpp',
@@ -63,6 +63,12 @@ typedef void* NativeLayer;
class QGraphicsItem;
typedef QGraphicsItem PlatformLayer;
typedef QGraphicsItem* NativeLayer;
#elif PLATFORM(CHROMIUM)
namespace WebCore {
class LayerSkia;
typedef LayerSkia PlatformLayer;
typedef void* NativeLayer;
}
#else
typedef void* PlatformLayer;
typedef void* NativeLayer;

0 comments on commit 051ab81

Please sign in to comment.