| 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 const blink::WebSelectionBound& end) override; | 122 const blink::WebSelectionBound& end) override; |
| 123 virtual void clearSelection() override; | 123 virtual void clearSelection() override; |
| 124 virtual void setShowFPSCounter(bool show); | 124 virtual void setShowFPSCounter(bool show); |
| 125 virtual void setShowPaintRects(bool show); | 125 virtual void setShowPaintRects(bool show); |
| 126 virtual void setShowDebugBorders(bool show); | 126 virtual void setShowDebugBorders(bool show); |
| 127 virtual void setContinuousPaintingEnabled(bool enabled); | 127 virtual void setContinuousPaintingEnabled(bool enabled); |
| 128 virtual void setShowScrollBottleneckRects(bool show); | 128 virtual void setShowScrollBottleneckRects(bool show); |
| 129 virtual void setTopControlsContentOffset(float); | 129 virtual void setTopControlsContentOffset(float); |
| 130 | 130 |
| 131 // cc::LayerTreeHostClient implementation. | 131 // cc::LayerTreeHostClient implementation. |
| 132 virtual void WillBeginMainFrame(int frame_id) override; | 132 void WillBeginMainFrame(int frame_id) override; |
| 133 virtual void DidBeginMainFrame() override; | 133 void DidBeginMainFrame() override; |
| 134 virtual void BeginMainFrame(const cc::BeginFrameArgs& args) override; | 134 void BeginMainFrame(const cc::BeginFrameArgs& args) override; |
| 135 virtual void Layout() override; | 135 void Layout() override; |
| 136 virtual void ApplyViewportDeltas(const gfx::Vector2d& inner_delta, | 136 void ApplyViewportDeltas(const gfx::Vector2d& inner_delta, |
| 137 const gfx::Vector2d& outer_delta, | 137 const gfx::Vector2d& outer_delta, |
| 138 float page_scale, | 138 float page_scale, |
| 139 float top_controls_delta) override; | 139 float top_controls_delta) override; |
| 140 virtual void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta, | 140 void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta, |
| 141 float page_scale, | 141 float page_scale, |
| 142 float top_controls_delta) override; | 142 float top_controls_delta) override; |
| 143 virtual void RequestNewOutputSurface(bool fallback) override; | 143 void RequestNewOutputSurface(bool fallback) override; |
| 144 virtual void DidInitializeOutputSurface() override; | 144 void DidInitializeOutputSurface() override; |
| 145 virtual void WillCommit() override; | 145 void WillCommit() override; |
| 146 virtual void DidCommit() override; | 146 void DidCommit() override; |
| 147 virtual void DidCommitAndDrawFrame() override; | 147 void DidCommitAndDrawFrame() override; |
| 148 virtual void DidCompleteSwapBuffers() override; | 148 void DidCompleteSwapBuffers() override; |
| 149 virtual void RateLimitSharedMainThreadContext() override; | 149 void RateLimitSharedMainThreadContext() override; |
| 150 | 150 |
| 151 // cc::LayerTreeHostSingleThreadClient implementation. | 151 // cc::LayerTreeHostSingleThreadClient implementation. |
| 152 virtual void ScheduleAnimation() override; | 152 void ScheduleAnimation() override; |
| 153 virtual void DidPostSwapBuffers() override; | 153 void DidPostSwapBuffers() override; |
| 154 virtual void DidAbortSwapBuffers() override; | 154 void DidAbortSwapBuffers() override; |
| 155 | 155 |
| 156 private: | 156 private: |
| 157 RenderWidgetCompositor(RenderWidget* widget, bool threaded); | 157 RenderWidgetCompositor(RenderWidget* widget, bool threaded); |
| 158 | 158 |
| 159 void Initialize(cc::LayerTreeSettings settings); | 159 void Initialize(cc::LayerTreeSettings settings); |
| 160 | 160 |
| 161 bool threaded_; | 161 bool threaded_; |
| 162 RenderWidget* widget_; | 162 RenderWidget* widget_; |
| 163 scoped_ptr<cc::LayerTreeHost> layer_tree_host_; | 163 scoped_ptr<cc::LayerTreeHost> layer_tree_host_; |
| 164 | 164 |
| 165 scoped_ptr<cc::CopyOutputRequest> temporary_copy_output_request_; | 165 scoped_ptr<cc::CopyOutputRequest> temporary_copy_output_request_; |
| 166 | 166 |
| 167 bool send_v8_idle_notification_after_commit_; | 167 bool send_v8_idle_notification_after_commit_; |
| 168 base::TimeTicks begin_main_frame_time_; | 168 base::TimeTicks begin_main_frame_time_; |
| 169 // The time interval between BeginMainFrame calls, provided by the scheduler. | 169 // The time interval between BeginMainFrame calls, provided by the scheduler. |
| 170 base::TimeDelta begin_main_frame_interval_; | 170 base::TimeDelta begin_main_frame_interval_; |
| 171 }; | 171 }; |
| 172 | 172 |
| 173 } // namespace content | 173 } // namespace content |
| 174 | 174 |
| 175 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ | 175 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ |
| OLD | NEW |