OLD | NEW |
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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 // cc::LayerTreeHostClient implementation. | 129 // cc::LayerTreeHostClient implementation. |
130 virtual void WillBeginMainFrame(int frame_id) OVERRIDE; | 130 virtual void WillBeginMainFrame(int frame_id) OVERRIDE; |
131 virtual void DidBeginMainFrame() OVERRIDE; | 131 virtual void DidBeginMainFrame() OVERRIDE; |
132 virtual void BeginMainFrame(const cc::BeginFrameArgs& args) OVERRIDE; | 132 virtual void BeginMainFrame(const cc::BeginFrameArgs& args) OVERRIDE; |
133 virtual void Layout() OVERRIDE; | 133 virtual void Layout() OVERRIDE; |
134 virtual void ApplyScrollAndScale(const gfx::Vector2d& scroll_delta, | 134 virtual void ApplyScrollAndScale(const gfx::Vector2d& scroll_delta, |
135 float page_scale) OVERRIDE; | 135 float page_scale) OVERRIDE; |
136 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface(bool fallback) | 136 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface(bool fallback) |
137 OVERRIDE; | 137 OVERRIDE; |
138 virtual void DidInitializeOutputSurface() OVERRIDE; | 138 virtual void DidInitializeOutputSurface() OVERRIDE; |
| 139 virtual void DidLoseOutputSurface() OVERRIDE {} |
139 virtual void WillCommit() OVERRIDE; | 140 virtual void WillCommit() OVERRIDE; |
140 virtual void DidCommit() OVERRIDE; | 141 virtual void DidCommit() OVERRIDE; |
141 virtual void DidCommitAndDrawFrame() OVERRIDE; | 142 virtual void DidCommitAndDrawFrame() OVERRIDE; |
142 virtual void DidCompleteSwapBuffers() OVERRIDE; | 143 virtual void DidCompleteSwapBuffers() OVERRIDE; |
143 virtual void RateLimitSharedMainThreadContext() OVERRIDE; | 144 virtual void RateLimitSharedMainThreadContext() OVERRIDE; |
144 | 145 |
145 // cc::LayerTreeHostSingleThreadClient implementation. | 146 // cc::LayerTreeHostSingleThreadClient implementation. |
146 virtual void ScheduleAnimation() OVERRIDE; | 147 virtual void ScheduleAnimation() OVERRIDE; |
147 virtual void DidPostSwapBuffers() OVERRIDE; | 148 virtual void DidPostSwapBuffers() OVERRIDE; |
148 virtual void DidAbortSwapBuffers() OVERRIDE; | 149 virtual void DidAbortSwapBuffers() OVERRIDE; |
149 | 150 |
150 private: | 151 private: |
151 RenderWidgetCompositor(RenderWidget* widget, bool threaded); | 152 RenderWidgetCompositor(RenderWidget* widget, bool threaded); |
152 | 153 |
153 void Initialize(cc::LayerTreeSettings settings); | 154 void Initialize(cc::LayerTreeSettings settings); |
154 | 155 |
155 bool threaded_; | 156 bool threaded_; |
156 RenderWidget* widget_; | 157 RenderWidget* widget_; |
157 scoped_ptr<cc::LayerTreeHost> layer_tree_host_; | 158 scoped_ptr<cc::LayerTreeHost> layer_tree_host_; |
158 | 159 |
159 bool send_v8_idle_notification_after_commit_; | 160 bool send_v8_idle_notification_after_commit_; |
160 base::TimeTicks begin_main_frame_time_; | 161 base::TimeTicks begin_main_frame_time_; |
161 // The time interval between BeginMainFrame calls, provided by the scheduler. | 162 // The time interval between BeginMainFrame calls, provided by the scheduler. |
162 base::TimeDelta begin_main_frame_interval_; | 163 base::TimeDelta begin_main_frame_interval_; |
163 }; | 164 }; |
164 | 165 |
165 } // namespace content | 166 } // namespace content |
166 | 167 |
167 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ | 168 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ |
OLD | NEW |