| Index: webkit/compositor_bindings/web_compositor_support_impl.cc
|
| diff --git a/webkit/compositor_bindings/web_compositor_support_impl.cc b/webkit/compositor_bindings/web_compositor_support_impl.cc
|
| index f63863e86342efcfe8ede6c18ba33919564c52f0..a278bcedb171df3920b1e3560577d308c090c578 100644
|
| --- a/webkit/compositor_bindings/web_compositor_support_impl.cc
|
| +++ b/webkit/compositor_bindings/web_compositor_support_impl.cc
|
| @@ -4,7 +4,6 @@
|
|
|
| #include "webkit/compositor_bindings/web_compositor_support_impl.h"
|
|
|
| -#if defined(USE_LIBCC_FOR_COMPOSITOR)
|
| #include "config.h"
|
| #include "base/memory/scoped_ptr.h"
|
| #include "webkit/compositor_bindings/WebLayerImpl.h"
|
| @@ -21,20 +20,6 @@
|
| #include "webkit/compositor_bindings/WebAnimationImpl.h"
|
| #include "webkit/compositor_bindings/WebFloatAnimationCurveImpl.h"
|
| #include "webkit/compositor_bindings/WebTransformAnimationCurveImpl.h"
|
| -#else
|
| -#include "third_party/WebKit/Source/Platform/chromium/public/WebAnimation.h"
|
| -#include "third_party/WebKit/Source/Platform/chromium/public/WebCompositor.h"
|
| -#include "third_party/WebKit/Source/Platform/chromium/public/WebContentLayer.h"
|
| -#include "third_party/WebKit/Source/Platform/chromium/public/WebExternalTextureLayer.h"
|
| -#include "third_party/WebKit/Source/Platform/chromium/public/WebFloatAnimationCurve.h"
|
| -#include "third_party/WebKit/Source/Platform/chromium/public/WebIOSurfaceLayer.h"
|
| -#include "third_party/WebKit/Source/Platform/chromium/public/WebImageLayer.h"
|
| -#include "third_party/WebKit/Source/Platform/chromium/public/WebLayer.h"
|
| -#include "third_party/WebKit/Source/Platform/chromium/public/WebScrollbarLayer.h"
|
| -#include "third_party/WebKit/Source/Platform/chromium/public/WebSolidColorLayer.h"
|
| -#include "third_party/WebKit/Source/Platform/chromium/public/WebTransformAnimationCurve.h"
|
| -#include "third_party/WebKit/Source/Platform/chromium/public/WebVideoLayer.h"
|
| -#endif
|
|
|
| using WebKit::WebAnimation;
|
| using WebKit::WebAnimationCurve;
|
| @@ -59,11 +44,7 @@ using WebKit::WebTransformAnimationCurve;
|
| using WebKit::WebVideoFrameProvider;
|
| using WebKit::WebVideoLayer;
|
|
|
| -#if defined(USE_LIBCC_FOR_COMPOSITOR)
|
| using WebKit::WebCompositorImpl;
|
| -#else
|
| -using WebKit::WebCompositor;
|
| -#endif
|
|
|
| namespace webkit {
|
|
|
| @@ -74,91 +55,51 @@ WebCompositorSupportImpl::~WebCompositorSupportImpl() {
|
| }
|
|
|
| void WebCompositorSupportImpl::initialize(WebKit::WebThread* thread) {
|
| -#if defined(USE_LIBCC_FOR_COMPOSITOR)
|
| WebCompositorImpl::initialize(thread);
|
| -#else
|
| - WebCompositor::initialize(thread);
|
| -#endif
|
| }
|
|
|
| bool WebCompositorSupportImpl::isThreadingEnabled() {
|
| -#if defined(USE_LIBCC_FOR_COMPOSITOR)
|
| return WebCompositorImpl::isThreadingEnabled();
|
| -#else
|
| - return WebCompositor::isThreadingEnabled();
|
| -#endif
|
| }
|
|
|
| void WebCompositorSupportImpl::shutdown() {
|
| -#if defined(USE_LIBCC_FOR_COMPOSITOR)
|
| WebCompositorImpl::shutdown();
|
| -#else
|
| - WebCompositor::shutdown();
|
| -#endif
|
| }
|
|
|
| void WebCompositorSupportImpl::setPerTilePaintingEnabled(bool enabled) {
|
| -#if defined(USE_LIBCC_FOR_COMPOSITOR)
|
| WebCompositorImpl::setPerTilePaintingEnabled(enabled);
|
| -#else
|
| - WebCompositor::setPerTilePaintingEnabled(enabled);
|
| -#endif
|
| }
|
|
|
| void WebCompositorSupportImpl::setPartialSwapEnabled(bool enabled) {
|
| -#if defined(USE_LIBCC_FOR_COMPOSITOR)
|
| WebCompositorImpl::setPartialSwapEnabled(enabled);
|
| -#else
|
| - WebCompositor::setPartialSwapEnabled(enabled);
|
| -#endif
|
| }
|
|
|
| void WebCompositorSupportImpl::setAcceleratedAnimationEnabled(bool enabled) {
|
| -#if defined(USE_LIBCC_FOR_COMPOSITOR)
|
| WebCompositorImpl::setAcceleratedAnimationEnabled(enabled);
|
| -#else
|
| - WebCompositor::setAcceleratedAnimationEnabled(enabled);
|
| -#endif
|
| }
|
|
|
| void WebCompositorSupportImpl::setPageScalePinchZoomEnabled(bool enabled) {
|
| -#if defined(USE_LIBCC_FOR_COMPOSITOR)
|
| WebCompositorImpl::setPageScalePinchZoomEnabled(enabled);
|
| -#else
|
| - WebCompositor::setPageScalePinchZoomEnabled(enabled);
|
| -#endif
|
| }
|
|
|
| WebLayerTreeView* WebCompositorSupportImpl::createLayerTreeView(
|
| WebLayerTreeViewClient* client, const WebLayer& root,
|
| const WebLayerTreeView::Settings& settings) {
|
| -#if defined(USE_LIBCC_FOR_COMPOSITOR)
|
| scoped_ptr<WebKit::WebLayerTreeViewImpl> layerTreeViewImpl(
|
| new WebKit::WebLayerTreeViewImpl(client));
|
| if (!layerTreeViewImpl->initialize(settings))
|
| return NULL;
|
| layerTreeViewImpl->setRootLayer(root);
|
| return layerTreeViewImpl.release();
|
| -#else
|
| - return WebLayerTreeView::create(client, root, settings);
|
| -#endif
|
| }
|
|
|
| WebLayer* WebCompositorSupportImpl::createLayer() {
|
| -#if defined(USE_LIBCC_FOR_COMPOSITOR)
|
| return new WebKit::WebLayerImpl();
|
| -#else
|
| - return WebLayer::create();
|
| -#endif
|
| }
|
|
|
| WebContentLayer* WebCompositorSupportImpl::createContentLayer(
|
| WebContentLayerClient* client) {
|
| -#if defined(USE_LIBCC_FOR_COMPOSITOR)
|
| return new WebKit::WebContentLayerImpl(client);
|
| -#else
|
| - return WebKit::WebContentLayer::create(client);
|
| -#endif
|
| }
|
|
|
| WebDelegatedRendererLayer*
|
| @@ -168,84 +109,48 @@ WebDelegatedRendererLayer*
|
|
|
| WebExternalTextureLayer* WebCompositorSupportImpl::createExternalTextureLayer(
|
| WebExternalTextureLayerClient* client) {
|
| -#if defined(USE_LIBCC_FOR_COMPOSITOR)
|
| return new WebKit::WebExternalTextureLayerImpl(client);
|
| -#else
|
| - return WebKit::WebExternalTextureLayer::create(client);
|
| -#endif
|
| }
|
|
|
| WebKit::WebIOSurfaceLayer*
|
| WebCompositorSupportImpl::createIOSurfaceLayer() {
|
| -#if defined(USE_LIBCC_FOR_COMPOSITOR)
|
| return new WebKit::WebIOSurfaceLayerImpl();
|
| -#else
|
| - return WebKit::WebIOSurfaceLayer::create();
|
| -#endif
|
| }
|
|
|
| WebKit::WebImageLayer* WebCompositorSupportImpl::createImageLayer() {
|
| -#if defined(USE_LIBCC_FOR_COMPOSITOR)
|
| return new WebKit::WebImageLayerImpl();
|
| -#else
|
| - return WebKit::WebImageLayer::create();
|
| -#endif
|
| }
|
|
|
| WebSolidColorLayer* WebCompositorSupportImpl::createSolidColorLayer() {
|
| -#if defined(USE_LIBCC_FOR_COMPOSITOR)
|
| return new WebKit::WebSolidColorLayerImpl();
|
| -#else
|
| - return WebKit::WebSolidColorLayer::create();
|
| -#endif
|
| }
|
|
|
| WebVideoLayer* WebCompositorSupportImpl::createVideoLayer(
|
| WebKit::WebVideoFrameProvider* provider) {
|
| -#if defined(USE_LIBCC_FOR_COMPOSITOR)
|
| return new WebKit::WebVideoLayerImpl(provider);
|
| -#else
|
| - return WebKit::WebVideoLayer::create(provider);
|
| -#endif
|
| }
|
|
|
| WebScrollbarLayer* WebCompositorSupportImpl::createScrollbarLayer(
|
| WebScrollbar* scrollbar,
|
| WebScrollbarThemePainter painter,
|
| WebScrollbarThemeGeometry* geometry) {
|
| -#if defined(USE_LIBCC_FOR_COMPOSITOR)
|
| return new WebKit::WebScrollbarLayerImpl(scrollbar, painter, geometry);
|
| -#else
|
| - return WebKit::WebScrollbarLayer::create(scrollbar, painter, geometry);
|
| -#endif
|
| }
|
|
|
| WebAnimation* WebCompositorSupportImpl::createAnimation(
|
| const WebKit::WebAnimationCurve& curve,
|
| WebKit::WebAnimation::TargetProperty target,
|
| int animationId) {
|
| -#if defined(USE_LIBCC_FOR_COMPOSITOR)
|
| return new WebKit::WebAnimationImpl(curve, target, animationId);
|
| -#else
|
| - return WebKit::WebAnimation::create(curve, target, animationId);
|
| -#endif
|
| }
|
|
|
| WebFloatAnimationCurve* WebCompositorSupportImpl::createFloatAnimationCurve() {
|
| -#if defined(USE_LIBCC_FOR_COMPOSITOR)
|
| return new WebKit::WebFloatAnimationCurveImpl();
|
| -#else
|
| - return WebKit::WebFloatAnimationCurve::create();
|
| -#endif
|
| }
|
|
|
| WebTransformAnimationCurve*
|
| WebCompositorSupportImpl::createTransformAnimationCurve() {
|
| -#if defined(USE_LIBCC_FOR_COMPOSITOR)
|
| return new WebKit::WebTransformAnimationCurveImpl();
|
| -#else
|
| - return WebKit::WebTransformAnimationCurve::create();
|
| -#endif
|
| }
|
|
|
| } // namespace webkit
|
|
|