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

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

Issue 423773002: Unified BeginFrame scheduling (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 virtual void WillBeginMainFrame(int frame_id) OVERRIDE; 131 virtual void WillBeginMainFrame(int frame_id) OVERRIDE;
132 virtual void DidBeginMainFrame() OVERRIDE; 132 virtual void DidBeginMainFrame() OVERRIDE;
133 virtual void BeginMainFrame(const cc::BeginFrameArgs& args) OVERRIDE; 133 virtual void BeginMainFrame(const cc::BeginFrameArgs& args) OVERRIDE;
134 virtual void Layout() OVERRIDE; 134 virtual void Layout() OVERRIDE;
135 virtual void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta, 135 virtual void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta,
136 float page_scale, 136 float page_scale,
137 float top_controls_delta) OVERRIDE; 137 float top_controls_delta) OVERRIDE;
138 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface(bool fallback) 138 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface(bool fallback)
139 OVERRIDE; 139 OVERRIDE;
140 virtual void DidInitializeOutputSurface() OVERRIDE; 140 virtual void DidInitializeOutputSurface() OVERRIDE;
141 virtual void DidLoseOutputSurface() OVERRIDE {}
141 virtual void WillCommit() OVERRIDE; 142 virtual void WillCommit() OVERRIDE;
142 virtual void DidCommit() OVERRIDE; 143 virtual void DidCommit() OVERRIDE;
143 virtual void DidCommitAndDrawFrame() OVERRIDE; 144 virtual void DidCommitAndDrawFrame() OVERRIDE;
144 virtual void DidCompleteSwapBuffers() OVERRIDE; 145 virtual void DidCompleteSwapBuffers() OVERRIDE;
145 virtual void RateLimitSharedMainThreadContext() OVERRIDE; 146 virtual void RateLimitSharedMainThreadContext() OVERRIDE;
146 147
147 // cc::LayerTreeHostSingleThreadClient implementation. 148 // cc::LayerTreeHostSingleThreadClient implementation.
148 virtual void ScheduleAnimation() OVERRIDE; 149 virtual void ScheduleAnimation() OVERRIDE;
149 virtual void DidPostSwapBuffers() OVERRIDE; 150 virtual void DidPostSwapBuffers() OVERRIDE;
150 virtual void DidAbortSwapBuffers() OVERRIDE; 151 virtual void DidAbortSwapBuffers() OVERRIDE;
151 152
152 private: 153 private:
153 RenderWidgetCompositor(RenderWidget* widget, bool threaded); 154 RenderWidgetCompositor(RenderWidget* widget, bool threaded);
154 155
155 void Initialize(cc::LayerTreeSettings settings); 156 void Initialize(cc::LayerTreeSettings settings);
156 157
157 bool threaded_; 158 bool threaded_;
158 RenderWidget* widget_; 159 RenderWidget* widget_;
159 scoped_ptr<cc::LayerTreeHost> layer_tree_host_; 160 scoped_ptr<cc::LayerTreeHost> layer_tree_host_;
160 161
161 bool send_v8_idle_notification_after_commit_; 162 bool send_v8_idle_notification_after_commit_;
162 base::TimeTicks begin_main_frame_time_; 163 base::TimeTicks begin_main_frame_time_;
163 // The time interval between BeginMainFrame calls, provided by the scheduler. 164 // The time interval between BeginMainFrame calls, provided by the scheduler.
164 base::TimeDelta begin_main_frame_interval_; 165 base::TimeDelta begin_main_frame_interval_;
165 }; 166 };
166 167
167 } // namespace content 168 } // namespace content
168 169
169 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ 170 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_
OLDNEW
« no previous file with comments | « content/renderer/gpu/compositor_output_surface.cc ('k') | content/renderer/gpu/render_widget_compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698