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

Side by Side Diff: content/renderer/gpu/render_widget_compositor.h

Issue 342413005: Revert of Make SingleThreadProxy a SchedulerClient (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ 5 #ifndef CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_
6 #define CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ 6 #define CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 28 matching lines...) Expand all
39 // Attempt to construct and initialize a compositor instance for the widget 39 // Attempt to construct and initialize a compositor instance for the widget
40 // with the given settings. Returns NULL if initialization fails. 40 // with the given settings. Returns NULL if initialization fails.
41 static scoped_ptr<RenderWidgetCompositor> Create(RenderWidget* widget, 41 static scoped_ptr<RenderWidgetCompositor> Create(RenderWidget* widget,
42 bool threaded); 42 bool threaded);
43 43
44 virtual ~RenderWidgetCompositor(); 44 virtual ~RenderWidgetCompositor();
45 45
46 const base::WeakPtr<cc::InputHandler>& GetInputHandler(); 46 const base::WeakPtr<cc::InputHandler>& GetInputHandler();
47 void SetSuppressScheduleComposite(bool suppress); 47 void SetSuppressScheduleComposite(bool suppress);
48 bool BeginMainFrameRequested() const; 48 bool BeginMainFrameRequested() const;
49 void UpdateAnimations(base::TimeTicks time);
49 void SetNeedsDisplayOnAllLayers(); 50 void SetNeedsDisplayOnAllLayers();
50 void SetRasterizeOnlyVisibleContent(); 51 void SetRasterizeOnlyVisibleContent();
51 void UpdateTopControlsState(cc::TopControlsState constraints, 52 void UpdateTopControlsState(cc::TopControlsState constraints,
52 cc::TopControlsState current, 53 cc::TopControlsState current,
53 bool animate); 54 bool animate);
54 void SetOverdrawBottomHeight(float overdraw_bottom_height); 55 void SetOverdrawBottomHeight(float overdraw_bottom_height);
55 void SetNeedsRedrawRect(gfx::Rect damage_rect); 56 void SetNeedsRedrawRect(gfx::Rect damage_rect);
56 // Like setNeedsRedraw but forces the frame to be drawn, without early-outs. 57 // Like setNeedsRedraw but forces the frame to be drawn, without early-outs.
57 // Redraw will be forced after the next commit 58 // Redraw will be forced after the next commit
58 void SetNeedsForcedRedraw(); 59 void SetNeedsForcedRedraw();
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface(bool fallback) 131 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface(bool fallback)
131 OVERRIDE; 132 OVERRIDE;
132 virtual void DidInitializeOutputSurface() OVERRIDE; 133 virtual void DidInitializeOutputSurface() OVERRIDE;
133 virtual void WillCommit() OVERRIDE; 134 virtual void WillCommit() OVERRIDE;
134 virtual void DidCommit() OVERRIDE; 135 virtual void DidCommit() OVERRIDE;
135 virtual void DidCommitAndDrawFrame() OVERRIDE; 136 virtual void DidCommitAndDrawFrame() OVERRIDE;
136 virtual void DidCompleteSwapBuffers() OVERRIDE; 137 virtual void DidCompleteSwapBuffers() OVERRIDE;
137 virtual void RateLimitSharedMainThreadContext() OVERRIDE; 138 virtual void RateLimitSharedMainThreadContext() OVERRIDE;
138 139
139 // cc::LayerTreeHostSingleThreadClient implementation. 140 // cc::LayerTreeHostSingleThreadClient implementation.
141 virtual void ScheduleComposite() OVERRIDE;
142 virtual void ScheduleAnimation() OVERRIDE;
140 virtual void DidPostSwapBuffers() OVERRIDE; 143 virtual void DidPostSwapBuffers() OVERRIDE;
141 virtual void DidAbortSwapBuffers() OVERRIDE; 144 virtual void DidAbortSwapBuffers() OVERRIDE;
142 145
143 private: 146 private:
144 RenderWidgetCompositor(RenderWidget* widget, bool threaded); 147 RenderWidgetCompositor(RenderWidget* widget, bool threaded);
145 148
146 void Initialize(cc::LayerTreeSettings settings); 149 void Initialize(cc::LayerTreeSettings settings);
147 150
148 bool threaded_; 151 bool threaded_;
152 bool suppress_schedule_composite_;
149 RenderWidget* widget_; 153 RenderWidget* widget_;
150 scoped_ptr<cc::LayerTreeHost> layer_tree_host_; 154 scoped_ptr<cc::LayerTreeHost> layer_tree_host_;
151 }; 155 };
152 156
153 } // namespace content 157 } // namespace content
154 158
155 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ 159 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/compositor_impl_android.cc ('k') | content/renderer/gpu/render_widget_compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698