Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(320)

Unified Diff: ui/compositor/compositor.h

Issue 11415089: ui/compositor: use cc/ directly instead of webkit (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix mac Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/compositor/compositor.h
diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h
index 10f8efcab6fb67f5283fc757076654a060d97308..5029b5038ab7235fc379a9ae5aafc157ba5130de 100644
--- a/ui/compositor/compositor.h
+++ b/ui/compositor/compositor.h
@@ -9,9 +9,7 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/observer_list.h"
-#include "third_party/WebKit/Source/Platform/chromium/public/WebLayer.h"
-#include "third_party/WebKit/Source/Platform/chromium/public/WebLayerTreeView.h"
-#include "third_party/WebKit/Source/Platform/chromium/public/WebLayerTreeViewClient.h"
+#include "cc/layer_tree_host_client.h"
#include "ui/compositor/compositor_export.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/size.h"
@@ -20,6 +18,11 @@
class SkBitmap;
+namespace cc {
+class Layer;
+class LayerTreeHost;
+}
+
namespace gfx {
class GLContext;
class GLSurface;
@@ -28,6 +31,10 @@ class Point;
class Rect;
}
+namespace WebKit {
+class WebGraphicsContext3D;
+}
+
namespace ui {
class Compositor;
@@ -159,7 +166,7 @@ class COMPOSITOR_EXPORT CompositorLock
// appropriately transformed texture for each transformed view in the widget's
// view hierarchy.
class COMPOSITOR_EXPORT Compositor
- : NON_EXPORTED_BASE(public WebKit::WebLayerTreeViewClient) {
+ : NON_EXPORTED_BASE(public cc::LayerTreeHostClient) {
public:
Compositor(CompositorDelegate* delegate,
gfx::AcceleratedWidget widget);
@@ -235,17 +242,23 @@ class COMPOSITOR_EXPORT Compositor
// Signals swap has aborted (e.g. lost context).
void OnSwapBuffersAborted();
- // WebLayerTreeViewClient implementation.
- virtual void updateAnimations(double frameBeginTime);
- virtual void layout();
- virtual void applyScrollAndScale(const WebKit::WebSize& scrollDelta,
- float scaleFactor);
- virtual WebKit::WebCompositorOutputSurface* createOutputSurface();
- virtual void didRecreateOutputSurface(bool success);
- virtual void didCommit();
- virtual void didCommitAndDrawFrame();
- virtual void didCompleteSwapBuffers();
- virtual void scheduleComposite();
+ // LayerTreeHostClient implementation.
+ virtual void willBeginFrame() OVERRIDE;
+ virtual void didBeginFrame() OVERRIDE;
+ virtual void animate(double frameBeginTime) OVERRIDE;
+ virtual void layout() OVERRIDE;
+ virtual void applyScrollAndScale(gfx::Vector2d scrollDelta,
+ float pageScale) OVERRIDE;
+ virtual scoped_ptr<WebKit::WebCompositorOutputSurface>
+ 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;
+
int last_started_frame() { return last_started_frame_; }
int last_ended_frame() { return last_ended_frame_; }
@@ -274,8 +287,8 @@ class COMPOSITOR_EXPORT Compositor
ObserverList<CompositorObserver> observer_list_;
gfx::AcceleratedWidget widget_;
- scoped_ptr<WebKit::WebLayer> root_web_layer_;
- scoped_ptr<WebKit::WebLayerTreeView> host_;
+ scoped_refptr<cc::Layer> root_web_layer_;
+ scoped_ptr<cc::LayerTreeHost> host_;
// Used to verify that we have at most one draw swap in flight.
scoped_ptr<PostedSwapQueue> posted_swaps_;
« cc/proxy.h ('K') | « ui/compositor/DEPS ('k') | ui/compositor/compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698