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