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

Side by Side Diff: ui/gfx/compositor/compositor_cc.h

Issue 8222028: Use WebKit compositor in ui::Layer (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: rebase,fixes Created 9 years, 2 months 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef UI_GFX_COMPOSITOR_COMPOSITOR_CC_H_
6 #define UI_GFX_COMPOSITOR_COMPOSITOR_CC_H_
7 #pragma once
8
9 #include "base/compiler_specific.h"
10 #include "base/memory/scoped_ptr.h"
jonathan.backer 2011/10/18 15:28:26 necessary?
piman 2011/10/19 17:53:23 Gone.
11 #include "base/memory/ref_counted.h"
jonathan.backer 2011/10/18 15:28:26 necessary?
piman 2011/10/19 17:53:23 Gone.
12 #include "ui/gfx/compositor/compositor.h"
13 #include "ui/gfx/size.h"
14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebLayer.h"
15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebLayerClient.h"
16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebLayerTreeView.h"
17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebLayerTreeViewClien t.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
18
19 namespace gfx {
20 class Rect;
21 }
22
23 namespace ui {
24
25 class COMPOSITOR_EXPORT TextureCC : public Texture {
26 public:
27 TextureCC();
28
29 virtual void SetCanvas(const SkCanvas& canvas,
30 const gfx::Point& origin,
31 const gfx::Size& overall_size) OVERRIDE;
32
33 virtual void Draw(const ui::TextureDrawParams& params,
34 const gfx::Rect& clip_bounds_in_texture) OVERRIDE;
35
36 private:
37 DISALLOW_COPY_AND_ASSIGN(TextureCC);
38 };
39
40 class COMPOSITOR_EXPORT CompositorCC : public Compositor,
41 public WebKit::WebLayerTreeViewClient,
42 public WebKit::WebLayerClient {
43 public:
44 CompositorCC(CompositorDelegate* delegate,
45 gfx::AcceleratedWidget widget,
46 const gfx::Size& size);
47 virtual ~CompositorCC();
48
49 static void InitializeThread();
50 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
51
52 protected:
53 virtual void OnWidgetSizeChanged() OVERRIDE;
Ben Goodger (Google) 2011/10/16 22:39:51 // Compositor
piman 2011/10/19 17:53:23 Done.
54 virtual void OnRootLayerChanged() OVERRIDE;
55 virtual void DrawTree() OVERRIDE;
56 virtual Texture* CreateTexture() OVERRIDE;
57 virtual void OnNotifyStart(bool clear) OVERRIDE;
58 virtual void OnNotifyEnd() OVERRIDE;
59 virtual void Blur(const gfx::Rect& bounds) OVERRIDE;
60 virtual void ScheduleDraw() OVERRIDE;
61
62 // WebLayerTreeViewClient
63 virtual void animateAndLayout(double frameBeginTime) OVERRIDE;
64 virtual void applyScrollDelta(const WebKit::WebSize&) OVERRIDE;
65 virtual WebKit::WebGraphicsContext3D* createContext3D() OVERRIDE;
66 virtual void didRebindGraphicsContext(bool success) OVERRIDE;
67 virtual void scheduleComposite() OVERRIDE;
68
69 // WebLayerClient
70 virtual void notifyNeedsComposite() OVERRIDE;
71
72 private:
73 gfx::AcceleratedWidget widget_;
74 WebKit::WebLayer root_web_layer_;
75 WebKit::WebLayerTreeView host_;
76
77 DISALLOW_COPY_AND_ASSIGN(CompositorCC);
78 };
79
80 } // namespace ui
81
82 #endif // UI_GFX_COMPOSITOR_COMPOSITOR_CC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698