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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 void WillBeginMainFrame() override; | 174 void WillBeginMainFrame() override; |
175 void DidBeginMainFrame() override; | 175 void DidBeginMainFrame() override; |
176 void BeginMainFrame(const cc::BeginFrameArgs& args) override; | 176 void BeginMainFrame(const cc::BeginFrameArgs& args) override; |
177 void BeginMainFrameNotExpectedSoon() override; | 177 void BeginMainFrameNotExpectedSoon() override; |
178 void UpdateLayerTreeHost() override; | 178 void UpdateLayerTreeHost() override; |
179 void ApplyViewportDeltas(const gfx::Vector2dF& inner_delta, | 179 void ApplyViewportDeltas(const gfx::Vector2dF& inner_delta, |
180 const gfx::Vector2dF& outer_delta, | 180 const gfx::Vector2dF& outer_delta, |
181 const gfx::Vector2dF& elastic_overscroll_delta, | 181 const gfx::Vector2dF& elastic_overscroll_delta, |
182 float page_scale, | 182 float page_scale, |
183 float top_controls_delta) override; | 183 float top_controls_delta) override; |
184 void RequestNewOutputSurface() override; | 184 void RequestNewCompositorFrameSink() override; |
185 void DidInitializeOutputSurface() override; | 185 void DidInitializeCompositorFrameSink() override; |
186 void DidFailToInitializeOutputSurface() override; | 186 void DidFailToInitializeCompositorFrameSink() override; |
187 void WillCommit() override; | 187 void WillCommit() override; |
188 void DidCommit() override; | 188 void DidCommit() override; |
189 void DidCommitAndDrawFrame() override; | 189 void DidCommitAndDrawFrame() override; |
190 void DidCompleteSwapBuffers() override; | 190 void DidCompleteSwapBuffers() override; |
191 void DidCompletePageScaleAnimation() override; | 191 void DidCompletePageScaleAnimation() override; |
192 | 192 |
193 // cc::LayerTreeHostSingleThreadClient implementation. | 193 // cc::LayerTreeHostSingleThreadClient implementation. |
194 void RequestScheduleAnimation() override; | 194 void RequestScheduleAnimation() override; |
195 void DidPostSwapBuffers() override; | 195 void DidPostSwapBuffers() override; |
196 void DidAbortSwapBuffers() override; | 196 void DidAbortSwapBuffers() override; |
197 | 197 |
198 // cc::RemoteProtoChannel implementation. | 198 // cc::RemoteProtoChannel implementation. |
199 void SetProtoReceiver(ProtoReceiver* receiver) override; | 199 void SetProtoReceiver(ProtoReceiver* receiver) override; |
200 void SendCompositorProto(const cc::proto::CompositorMessage& proto) override; | 200 void SendCompositorProto(const cc::proto::CompositorMessage& proto) override; |
201 | 201 |
202 enum { | 202 enum { |
203 OUTPUT_SURFACE_RETRIES_BEFORE_FALLBACK = 4, | 203 COMPOSITOR_FRAME_SINK_RETRIES_BEFORE_FALLBACK = 4, |
204 MAX_OUTPUT_SURFACE_RETRIES = 5, | 204 MAX_COMPOSITOR_FRAME_SINK_RETRIES = 5, |
205 }; | 205 }; |
206 | 206 |
207 protected: | 207 protected: |
208 friend class RenderViewImplScaleFactorTest; | 208 friend class RenderViewImplScaleFactorTest; |
209 | 209 |
210 RenderWidgetCompositor(RenderWidgetCompositorDelegate* delegate, | 210 RenderWidgetCompositor(RenderWidgetCompositorDelegate* delegate, |
211 CompositorDependencies* compositor_deps); | 211 CompositorDependencies* compositor_deps); |
212 | 212 |
213 void Initialize(float device_scale_factor); | 213 void Initialize(float device_scale_factor); |
214 cc::LayerTreeHostInterface* layer_tree_host() { | 214 cc::LayerTreeHostInterface* layer_tree_host() { |
(...skipping 16 matching lines...) Expand all Loading... |
231 blink::WebLayoutAndPaintAsyncCallback* layout_and_paint_async_callback_; | 231 blink::WebLayoutAndPaintAsyncCallback* layout_and_paint_async_callback_; |
232 | 232 |
233 cc::RemoteProtoChannel::ProtoReceiver* remote_proto_channel_receiver_; | 233 cc::RemoteProtoChannel::ProtoReceiver* remote_proto_channel_receiver_; |
234 | 234 |
235 base::WeakPtrFactory<RenderWidgetCompositor> weak_factory_; | 235 base::WeakPtrFactory<RenderWidgetCompositor> weak_factory_; |
236 }; | 236 }; |
237 | 237 |
238 } // namespace content | 238 } // namespace content |
239 | 239 |
240 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ | 240 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ |
OLD | NEW |