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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 static std::unique_ptr<RenderWidgetCompositor> Create( | 59 static std::unique_ptr<RenderWidgetCompositor> Create( |
60 RenderWidgetCompositorDelegate* delegate, | 60 RenderWidgetCompositorDelegate* delegate, |
61 CompositorDependencies* compositor_deps); | 61 CompositorDependencies* compositor_deps); |
62 | 62 |
63 ~RenderWidgetCompositor() override; | 63 ~RenderWidgetCompositor() override; |
64 | 64 |
65 static cc::LayerTreeSettings GenerateLayerTreeSettings( | 65 static cc::LayerTreeSettings GenerateLayerTreeSettings( |
66 const base::CommandLine& cmd, | 66 const base::CommandLine& cmd, |
67 CompositorDependencies* compositor_deps, | 67 CompositorDependencies* compositor_deps, |
68 float device_scale_factor, | 68 float device_scale_factor, |
| 69 bool is_for_subframe, |
69 const ScreenInfo& screen_info); | 70 const ScreenInfo& screen_info); |
70 static std::unique_ptr<cc::LayerTreeHost> CreateLayerTreeHost( | 71 static std::unique_ptr<cc::LayerTreeHost> CreateLayerTreeHost( |
71 cc::LayerTreeHostClient* client, | 72 cc::LayerTreeHostClient* client, |
72 cc::LayerTreeHostSingleThreadClient* single_thread_client, | 73 cc::LayerTreeHostSingleThreadClient* single_thread_client, |
73 cc::MutatorHost* mutator_host, | 74 cc::MutatorHost* mutator_host, |
74 CompositorDependencies* deps, | 75 CompositorDependencies* deps, |
75 float device_scale_factor, | 76 float device_scale_factor, |
76 const ScreenInfo& screen_info); | 77 const ScreenInfo& screen_info); |
77 | 78 |
78 void Initialize(std::unique_ptr<cc::LayerTreeHost> layer_tree_host, | 79 void Initialize(std::unique_ptr<cc::LayerTreeHost> layer_tree_host, |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 bool has_scrolled_by_touch) override; | 192 bool has_scrolled_by_touch) override; |
192 void RequestNewCompositorFrameSink() override; | 193 void RequestNewCompositorFrameSink() override; |
193 void DidInitializeCompositorFrameSink() override; | 194 void DidInitializeCompositorFrameSink() override; |
194 void DidFailToInitializeCompositorFrameSink() override; | 195 void DidFailToInitializeCompositorFrameSink() override; |
195 void WillCommit() override; | 196 void WillCommit() override; |
196 void DidCommit() override; | 197 void DidCommit() override; |
197 void DidCommitAndDrawFrame() override; | 198 void DidCommitAndDrawFrame() override; |
198 void DidReceiveCompositorFrameAck() override; | 199 void DidReceiveCompositorFrameAck() override; |
199 void DidCompletePageScaleAnimation() override; | 200 void DidCompletePageScaleAnimation() override; |
200 | 201 |
| 202 bool IsForSubframe() override; |
| 203 |
201 // cc::LayerTreeHostSingleThreadClient implementation. | 204 // cc::LayerTreeHostSingleThreadClient implementation. |
202 void RequestScheduleAnimation() override; | 205 void RequestScheduleAnimation() override; |
203 void DidSubmitCompositorFrame() override; | 206 void DidSubmitCompositorFrame() override; |
204 void DidLoseCompositorFrameSink() override; | 207 void DidLoseCompositorFrameSink() override; |
205 | 208 |
206 enum { | 209 enum { |
207 COMPOSITOR_FRAME_SINK_RETRIES_BEFORE_FALLBACK = 4, | 210 COMPOSITOR_FRAME_SINK_RETRIES_BEFORE_FALLBACK = 4, |
208 MAX_COMPOSITOR_FRAME_SINK_RETRIES = 5, | 211 MAX_COMPOSITOR_FRAME_SINK_RETRIES = 5, |
209 }; | 212 }; |
210 | 213 |
(...skipping 25 matching lines...) Expand all Loading... |
236 blink::WebLayoutAndPaintAsyncCallback* layout_and_paint_async_callback_; | 239 blink::WebLayoutAndPaintAsyncCallback* layout_and_paint_async_callback_; |
237 | 240 |
238 cc::FrameSinkId frame_sink_id_; | 241 cc::FrameSinkId frame_sink_id_; |
239 | 242 |
240 base::WeakPtrFactory<RenderWidgetCompositor> weak_factory_; | 243 base::WeakPtrFactory<RenderWidgetCompositor> weak_factory_; |
241 }; | 244 }; |
242 | 245 |
243 } // namespace content | 246 } // namespace content |
244 | 247 |
245 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ | 248 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ |
OLD | NEW |