Index: ui/gfx/compositor/compositor_cc.h |
diff --git a/ui/gfx/compositor/compositor_cc.h b/ui/gfx/compositor/compositor_cc.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..2a3be64b7680d0e3aafce4e38c64efb29d38c75a |
--- /dev/null |
+++ b/ui/gfx/compositor/compositor_cc.h |
@@ -0,0 +1,82 @@ |
+// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef UI_GFX_COMPOSITOR_COMPOSITOR_CC_H_ |
+#define UI_GFX_COMPOSITOR_COMPOSITOR_CC_H_ |
+#pragma once |
+ |
+#include "base/compiler_specific.h" |
+#include "base/memory/scoped_ptr.h" |
jonathan.backer
2011/10/18 15:28:26
necessary?
piman
2011/10/19 17:53:23
Gone.
|
+#include "base/memory/ref_counted.h" |
jonathan.backer
2011/10/18 15:28:26
necessary?
piman
2011/10/19 17:53:23
Gone.
|
+#include "ui/gfx/compositor/compositor.h" |
+#include "ui/gfx/size.h" |
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebLayer.h" |
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebLayerClient.h" |
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebLayerTreeView.h" |
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebLayerTreeViewClient.h" |
jonathan.backer
2011/10/18 15:28:26
nit: 80 column limit?
piman
2011/10/19 17:53:23
It's ok for includes (thankfully), as per http://g
|
+ |
+namespace gfx { |
+class Rect; |
+} |
+ |
+namespace ui { |
+ |
+class COMPOSITOR_EXPORT TextureCC : public Texture { |
+ public: |
+ TextureCC(); |
+ |
+ virtual void SetCanvas(const SkCanvas& canvas, |
+ const gfx::Point& origin, |
+ const gfx::Size& overall_size) OVERRIDE; |
+ |
+ virtual void Draw(const ui::TextureDrawParams& params, |
+ const gfx::Rect& clip_bounds_in_texture) OVERRIDE; |
+ |
+ private: |
+ DISALLOW_COPY_AND_ASSIGN(TextureCC); |
+}; |
+ |
+class COMPOSITOR_EXPORT CompositorCC : public Compositor, |
+ public WebKit::WebLayerTreeViewClient, |
+ public WebKit::WebLayerClient { |
+ public: |
+ CompositorCC(CompositorDelegate* delegate, |
+ gfx::AcceleratedWidget widget, |
+ const gfx::Size& size); |
+ virtual ~CompositorCC(); |
+ |
+ static void InitializeThread(); |
+ static void TerminateThread(); |
jonathan.backer
2011/10/18 15:28:26
I don't see where these are called.
piman
2011/10/19 17:53:23
They are not yet called, waiting on another webkit
|
+ |
+ protected: |
+ virtual void OnWidgetSizeChanged() OVERRIDE; |
Ben Goodger (Google)
2011/10/16 22:39:51
// Compositor
piman
2011/10/19 17:53:23
Done.
|
+ virtual void OnRootLayerChanged() OVERRIDE; |
+ virtual void DrawTree() OVERRIDE; |
+ virtual Texture* CreateTexture() OVERRIDE; |
+ virtual void OnNotifyStart(bool clear) OVERRIDE; |
+ virtual void OnNotifyEnd() OVERRIDE; |
+ virtual void Blur(const gfx::Rect& bounds) OVERRIDE; |
+ virtual void ScheduleDraw() OVERRIDE; |
+ |
+ // WebLayerTreeViewClient |
+ virtual void animateAndLayout(double frameBeginTime) OVERRIDE; |
+ virtual void applyScrollDelta(const WebKit::WebSize&) OVERRIDE; |
+ virtual WebKit::WebGraphicsContext3D* createContext3D() OVERRIDE; |
+ virtual void didRebindGraphicsContext(bool success) OVERRIDE; |
+ virtual void scheduleComposite() OVERRIDE; |
+ |
+ // WebLayerClient |
+ virtual void notifyNeedsComposite() OVERRIDE; |
+ |
+ private: |
+ gfx::AcceleratedWidget widget_; |
+ WebKit::WebLayer root_web_layer_; |
+ WebKit::WebLayerTreeView host_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(CompositorCC); |
+}; |
+ |
+} // namespace ui |
+ |
+#endif // UI_GFX_COMPOSITOR_COMPOSITOR_CC_H_ |