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

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

Issue 8890050: Attempt 3 at: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Da fix Created 9 years 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
« no previous file with comments | « ui/gfx/compositor/compositor.gyp ('k') | ui/gfx/compositor/compositor_cc.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_GFX_COMPOSITOR_COMPOSITOR_CC_H_ 5 #ifndef UI_GFX_COMPOSITOR_COMPOSITOR_CC_H_
6 #define UI_GFX_COMPOSITOR_COMPOSITOR_CC_H_ 6 #define UI_GFX_COMPOSITOR_COMPOSITOR_CC_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/singleton.h" 10 #include "base/memory/singleton.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 NON_EXPORTED_BASE(public WebKit::WebLayerClient) { 83 NON_EXPORTED_BASE(public WebKit::WebLayerClient) {
84 public: 84 public:
85 CompositorCC(CompositorDelegate* delegate, 85 CompositorCC(CompositorDelegate* delegate,
86 gfx::AcceleratedWidget widget, 86 gfx::AcceleratedWidget widget,
87 const gfx::Size& size); 87 const gfx::Size& size);
88 virtual ~CompositorCC(); 88 virtual ~CompositorCC();
89 89
90 static void Initialize(bool useThread); 90 static void Initialize(bool useThread);
91 static void Terminate(); 91 static void Terminate();
92 92
93 // If necessary enables the test context. If the test context is enabled the
94 // compositor does not render anything to screen.
95 static void EnableTestContextIfNecessary();
96
97 protected: 93 protected:
98 // Compositor implementation. 94 // Compositor implementation.
99 virtual Texture* CreateTexture() OVERRIDE; 95 virtual Texture* CreateTexture() OVERRIDE;
100 virtual void Blur(const gfx::Rect& bounds) OVERRIDE; 96 virtual void Blur(const gfx::Rect& bounds) OVERRIDE;
101 virtual void ScheduleDraw() OVERRIDE; 97 virtual void ScheduleDraw() OVERRIDE;
102 virtual void OnNotifyStart(bool clear) OVERRIDE; 98 virtual void OnNotifyStart(bool clear) OVERRIDE;
103 virtual void OnNotifyEnd() OVERRIDE; 99 virtual void OnNotifyEnd() OVERRIDE;
104 virtual void OnWidgetSizeChanged() OVERRIDE; 100 virtual void OnWidgetSizeChanged() OVERRIDE;
105 virtual void OnRootLayerChanged() OVERRIDE; 101 virtual void OnRootLayerChanged() OVERRIDE;
106 virtual void DrawTree() OVERRIDE; 102 virtual void DrawTree() OVERRIDE;
107 virtual bool ReadPixels(SkBitmap* bitmap, const gfx::Rect& bounds) OVERRIDE; 103 virtual bool ReadPixels(SkBitmap* bitmap, const gfx::Rect& bounds) OVERRIDE;
108 104
109 // WebLayerTreeViewClient implementation. 105 // WebLayerTreeViewClient implementation.
110 virtual void animateAndLayout(double frameBeginTime); 106 virtual void animateAndLayout(double frameBeginTime);
111 virtual void applyScrollAndScale(const WebKit::WebSize& scrollDelta, 107 virtual void applyScrollAndScale(const WebKit::WebSize& scrollDelta,
112 float scaleFactor); 108 float scaleFactor);
113 virtual void applyScrollDelta(const WebKit::WebSize&); 109 virtual void applyScrollDelta(const WebKit::WebSize&);
114 virtual WebKit::WebGraphicsContext3D* createContext3D(); 110 virtual WebKit::WebGraphicsContext3D* createContext3D();
115 virtual void didRebindGraphicsContext(bool success); 111 virtual void didRebindGraphicsContext(bool success);
116 virtual void scheduleComposite(); 112 virtual void scheduleComposite();
117 113
118 // WebLayerClient implementation. 114 // WebLayerClient implementation.
119 virtual void notifyNeedsComposite(); 115 virtual void notifyNeedsComposite();
120 116
121 private: 117 private:
122 gfx::AcceleratedWidget widget_; 118 gfx::AcceleratedWidget widget_;
123 WebKit::WebLayer root_web_layer_; 119 WebKit::WebLayer root_web_layer_;
124 WebKit::WebLayerTreeView host_; 120 WebKit::WebLayerTreeView host_;
125 121
126 // See description above SetTestContextEnabled.
127 static bool test_context_enabled_;
128
129 DISALLOW_COPY_AND_ASSIGN(CompositorCC); 122 DISALLOW_COPY_AND_ASSIGN(CompositorCC);
130 }; 123 };
131 124
132 } // namespace ui 125 } // namespace ui
133 126
134 #endif // UI_GFX_COMPOSITOR_COMPOSITOR_CC_H_ 127 #endif // UI_GFX_COMPOSITOR_COMPOSITOR_CC_H_
OLDNEW
« no previous file with comments | « ui/gfx/compositor/compositor.gyp ('k') | ui/gfx/compositor/compositor_cc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698