| 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 // cc::LayerTreeHostClient implementation. | 127 // cc::LayerTreeHostClient implementation. |
| 128 virtual void WillBeginMainFrame(int frame_id) OVERRIDE; | 128 virtual void WillBeginMainFrame(int frame_id) OVERRIDE; |
| 129 virtual void DidBeginMainFrame() OVERRIDE; | 129 virtual void DidBeginMainFrame() OVERRIDE; |
| 130 virtual void Animate(base::TimeTicks frame_begin_time) OVERRIDE; | 130 virtual void Animate(base::TimeTicks frame_begin_time) OVERRIDE; |
| 131 virtual void Layout() OVERRIDE; | 131 virtual void Layout() OVERRIDE; |
| 132 virtual void ApplyScrollAndScale(const gfx::Vector2d& scroll_delta, | 132 virtual void ApplyScrollAndScale(const gfx::Vector2d& scroll_delta, |
| 133 float page_scale) OVERRIDE; | 133 float page_scale) OVERRIDE; |
| 134 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface(bool fallback) | 134 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface(bool fallback) |
| 135 OVERRIDE; | 135 OVERRIDE; |
| 136 virtual void DidInitializeOutputSurface() OVERRIDE; | 136 virtual void DidInitializeOutputSurface() OVERRIDE; |
| 137 virtual void DidLoseOutputSurface() OVERRIDE {} |
| 137 virtual void WillCommit() OVERRIDE; | 138 virtual void WillCommit() OVERRIDE; |
| 138 virtual void DidCommit() OVERRIDE; | 139 virtual void DidCommit() OVERRIDE; |
| 139 virtual void DidCommitAndDrawFrame() OVERRIDE; | 140 virtual void DidCommitAndDrawFrame() OVERRIDE; |
| 140 virtual void DidCompleteSwapBuffers() OVERRIDE; | 141 virtual void DidCompleteSwapBuffers() OVERRIDE; |
| 141 virtual void RateLimitSharedMainThreadContext() OVERRIDE; | 142 virtual void RateLimitSharedMainThreadContext() OVERRIDE; |
| 142 | 143 |
| 143 // cc::LayerTreeHostSingleThreadClient implementation. | 144 // cc::LayerTreeHostSingleThreadClient implementation. |
| 144 virtual void ScheduleAnimation() OVERRIDE; | 145 virtual void ScheduleAnimation() OVERRIDE; |
| 145 virtual void DidPostSwapBuffers() OVERRIDE; | 146 virtual void DidPostSwapBuffers() OVERRIDE; |
| 146 virtual void DidAbortSwapBuffers() OVERRIDE; | 147 virtual void DidAbortSwapBuffers() OVERRIDE; |
| 147 | 148 |
| 148 private: | 149 private: |
| 149 RenderWidgetCompositor(RenderWidget* widget, bool threaded); | 150 RenderWidgetCompositor(RenderWidget* widget, bool threaded); |
| 150 | 151 |
| 151 void Initialize(cc::LayerTreeSettings settings); | 152 void Initialize(cc::LayerTreeSettings settings); |
| 152 | 153 |
| 153 bool threaded_; | 154 bool threaded_; |
| 154 RenderWidget* widget_; | 155 RenderWidget* widget_; |
| 155 scoped_ptr<cc::LayerTreeHost> layer_tree_host_; | 156 scoped_ptr<cc::LayerTreeHost> layer_tree_host_; |
| 156 }; | 157 }; |
| 157 | 158 |
| 158 } // namespace content | 159 } // namespace content |
| 159 | 160 |
| 160 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ | 161 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ |
| OLD | NEW |