| Index: webkit/compositor_bindings/web_layer_tree_view_impl.h
|
| diff --git a/webkit/compositor_bindings/web_layer_tree_view_impl.h b/webkit/compositor_bindings/web_layer_tree_view_impl.h
|
| index 4817221b658e88b23297fff10682e36d40524d03..dd3aa7391d257d68fcfd9d84570431063429787d 100644
|
| --- a/webkit/compositor_bindings/web_layer_tree_view_impl.h
|
| +++ b/webkit/compositor_bindings/web_layer_tree_view_impl.h
|
| @@ -2,8 +2,8 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef WebLayerTreeViewImpl_h
|
| -#define WebLayerTreeViewImpl_h
|
| +#ifndef WEBKIT_COMPOSITOR_BINDINGS_WEB_LAYER_TREE_VIEW_IMPL_H_
|
| +#define WEBKIT_COMPOSITOR_BINDINGS_WEB_LAYER_TREE_VIEW_IMPL_H_
|
|
|
| #include "base/memory/scoped_ptr.h"
|
| #include "cc/layer_tree_host_client.h"
|
| @@ -21,65 +21,78 @@ class WebLayer;
|
| class WebLayerTreeViewClient;
|
| class WebLayerTreeViewClientAdapter;
|
|
|
| -class WebLayerTreeViewImpl : public WebLayerTreeView, public cc::LayerTreeHostClient {
|
| -public:
|
| - WEBKIT_COMPOSITOR_BINDINGS_EXPORT explicit WebLayerTreeViewImpl(
|
| - WebLayerTreeViewClient*);
|
| - virtual ~WebLayerTreeViewImpl();
|
| +class WebLayerTreeViewImpl : public WebLayerTreeView,
|
| + public cc::LayerTreeHostClient {
|
| + public:
|
| + WEBKIT_COMPOSITOR_BINDINGS_EXPORT explicit WebLayerTreeViewImpl(
|
| + WebLayerTreeViewClient* client);
|
| + virtual ~WebLayerTreeViewImpl();
|
|
|
| - WEBKIT_COMPOSITOR_BINDINGS_EXPORT bool initialize(
|
| - const Settings&, scoped_ptr<cc::Thread> implThread);
|
| + WEBKIT_COMPOSITOR_BINDINGS_EXPORT bool initialize(
|
| + const Settings& settings, scoped_ptr<cc::Thread> impl_thread);
|
|
|
| - // WebLayerTreeView implementation.
|
| - virtual void setSurfaceReady() OVERRIDE;
|
| - virtual void setRootLayer(const WebLayer&) OVERRIDE;
|
| - virtual void clearRootLayer() OVERRIDE;
|
| - virtual void setViewportSize(const WebSize& layoutViewportSize, const WebSize& deviceViewportSize = WebSize()) OVERRIDE;
|
| - virtual WebSize layoutViewportSize() const OVERRIDE;
|
| - virtual WebSize deviceViewportSize() const OVERRIDE;
|
| - virtual WebFloatPoint adjustEventPointForPinchZoom(const WebFloatPoint& point) const OVERRIDE;
|
| - virtual void setDeviceScaleFactor(float) OVERRIDE;
|
| - virtual float deviceScaleFactor() const OVERRIDE;
|
| - virtual void setBackgroundColor(WebColor) OVERRIDE;
|
| - virtual void setHasTransparentBackground(bool) OVERRIDE;
|
| - virtual void setVisible(bool) OVERRIDE;
|
| - virtual void setPageScaleFactorAndLimits(float pageScaleFactor, float minimum, float maximum) OVERRIDE;
|
| - virtual void startPageScaleAnimation(const WebPoint& destination, bool useAnchor, float newPageScale, double durationSec) OVERRIDE;
|
| - virtual void setNeedsAnimate() OVERRIDE;
|
| - virtual void setNeedsRedraw() OVERRIDE;
|
| - virtual bool commitRequested() const OVERRIDE;
|
| - virtual void composite() OVERRIDE;
|
| - virtual void updateAnimations(double frameBeginTime) OVERRIDE;
|
| - virtual void didStopFlinging() OVERRIDE;
|
| - virtual bool compositeAndReadback(void *pixels, const WebRect&) OVERRIDE;
|
| - virtual void finishAllRendering() OVERRIDE;
|
| - virtual void setDeferCommits(bool deferCommits) OVERRIDE;
|
| - virtual void renderingStats(WebRenderingStats&) const OVERRIDE;
|
| - virtual void setShowFPSCounter(bool show);
|
| - virtual void setShowPaintRects(bool show);
|
| - virtual void setContinuousPaintingEnabled(bool);
|
| + WEBKIT_COMPOSITOR_BINDINGS_EXPORT cc::LayerTreeHost* layer_tree_host() const;
|
|
|
| - // cc::LayerTreeHostClient implementation.
|
| - virtual void willBeginFrame() OVERRIDE;
|
| - virtual void didBeginFrame() OVERRIDE;
|
| - virtual void animate(double monotonicFrameBeginTime) OVERRIDE;
|
| - virtual void layout() OVERRIDE;
|
| - virtual void applyScrollAndScale(gfx::Vector2d scrollDelta, float pageScale) OVERRIDE;
|
| - virtual scoped_ptr<cc::OutputSurface> createOutputSurface() OVERRIDE;
|
| - virtual void didRecreateOutputSurface(bool success) OVERRIDE;
|
| - virtual scoped_ptr<cc::InputHandler> createInputHandler() OVERRIDE;
|
| - virtual void willCommit() OVERRIDE;
|
| - virtual void didCommit() OVERRIDE;
|
| - virtual void didCommitAndDrawFrame() OVERRIDE;
|
| - virtual void didCompleteSwapBuffers() OVERRIDE;
|
| - virtual void scheduleComposite() OVERRIDE;
|
| - virtual scoped_ptr<cc::FontAtlas> createFontAtlas();
|
| + // WebLayerTreeView implementation.
|
| + virtual void setSurfaceReady() OVERRIDE;
|
| + virtual void setRootLayer(const WebLayer&) OVERRIDE;
|
| + virtual void clearRootLayer() OVERRIDE;
|
| + virtual void setViewportSize(
|
| + const WebSize& layout_viewport_size,
|
| + const WebSize& deviceViewportSize = WebSize()) OVERRIDE;
|
| + virtual WebSize layoutViewportSize() const OVERRIDE;
|
| + virtual WebSize deviceViewportSize() const OVERRIDE;
|
| + virtual WebFloatPoint adjustEventPointForPinchZoom(
|
| + const WebFloatPoint& point) const OVERRIDE;
|
| + virtual void setDeviceScaleFactor(float device_scale_factor) OVERRIDE;
|
| + virtual float deviceScaleFactor() const OVERRIDE;
|
| + virtual void setBackgroundColor(WebColor) OVERRIDE;
|
| + virtual void setHasTransparentBackground(bool transparent) OVERRIDE;
|
| + virtual void setVisible(bool visible) OVERRIDE;
|
| + virtual void setPageScaleFactorAndLimits(float page_scale_factor,
|
| + float minimum,
|
| + float maximum) OVERRIDE;
|
| + virtual void startPageScaleAnimation(const WebPoint& destination,
|
| + bool use_anchor,
|
| + float new_page_scale,
|
| + double duration_sec) OVERRIDE;
|
| + virtual void setNeedsAnimate() OVERRIDE;
|
| + virtual void setNeedsRedraw() OVERRIDE;
|
| + virtual bool commitRequested() const OVERRIDE;
|
| + virtual void composite() OVERRIDE;
|
| + virtual void updateAnimations(double frame_begin_time) OVERRIDE;
|
| + virtual void didStopFlinging() OVERRIDE;
|
| + virtual bool compositeAndReadback(void* pixels,
|
| + const WebRect& viewport_rect) OVERRIDE;
|
| + virtual void finishAllRendering() OVERRIDE;
|
| + virtual void setDeferCommits(bool defer_commits) OVERRIDE;
|
| + virtual void renderingStats(WebRenderingStats& stats) const OVERRIDE;
|
| + virtual void setShowFPSCounter(bool show);
|
| + virtual void setShowPaintRects(bool show);
|
| + virtual void setContinuousPaintingEnabled(bool enabled);
|
|
|
| -private:
|
| - WebLayerTreeViewClient* m_client;
|
| - scoped_ptr<cc::LayerTreeHost> m_layerTreeHost;
|
| + // cc::LayerTreeHostClient implementation.
|
| + virtual void willBeginFrame() OVERRIDE;
|
| + virtual void didBeginFrame() OVERRIDE;
|
| + virtual void animate(double monotonicFrameBeginTime) OVERRIDE;
|
| + virtual void layout() OVERRIDE;
|
| + virtual void applyScrollAndScale(gfx::Vector2d scroll_delta,
|
| + float page_scale) OVERRIDE;
|
| + virtual scoped_ptr<cc::OutputSurface> createOutputSurface() OVERRIDE;
|
| + virtual void didRecreateOutputSurface(bool success) OVERRIDE;
|
| + virtual scoped_ptr<cc::InputHandler> createInputHandler() OVERRIDE;
|
| + virtual void willCommit() OVERRIDE;
|
| + virtual void didCommit() OVERRIDE;
|
| + virtual void didCommitAndDrawFrame() OVERRIDE;
|
| + virtual void didCompleteSwapBuffers() OVERRIDE;
|
| + virtual void scheduleComposite() OVERRIDE;
|
| + virtual scoped_ptr<cc::FontAtlas> createFontAtlas();
|
| +
|
| + private:
|
| + WebLayerTreeViewClient* client_;
|
| + scoped_ptr<cc::LayerTreeHost> layer_tree_host_;
|
| };
|
|
|
| -} // namespace WebKit
|
| +} // namespace WebKit
|
|
|
| -#endif // WebLayerTreeViewImpl_h
|
| +#endif // WEBKIT_COMPOSITOR_BINDINGS_WEB_LAYER_TREE_VIEW_IMPL_H_
|
|
|