OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_IMPL_H_ |
6 #define CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_IMPL_H_ | 6 #define CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_IMPL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 SynchronousCompositorOutputSurface* output_surface, | 53 SynchronousCompositorOutputSurface* output_surface, |
54 SynchronousCompositorExternalBeginFrameSource* begin_frame_source, | 54 SynchronousCompositorExternalBeginFrameSource* begin_frame_source, |
55 ui::SynchronousInputHandlerProxy* synchronous_input_handler_proxy); | 55 ui::SynchronousInputHandlerProxy* synchronous_input_handler_proxy); |
56 void DidDestroyRendererObjects(); | 56 void DidDestroyRendererObjects(); |
57 | 57 |
58 // SynchronousCompositorExternalBeginFrameSourceClient overrides. | 58 // SynchronousCompositorExternalBeginFrameSourceClient overrides. |
59 void OnNeedsBeginFramesChange(bool needs_begin_frames) override; | 59 void OnNeedsBeginFramesChange(bool needs_begin_frames) override; |
60 | 60 |
61 // SynchronousCompositorOutputSurfaceClient overrides. | 61 // SynchronousCompositorOutputSurfaceClient overrides. |
62 void Invalidate() override; | 62 void Invalidate() override; |
| 63 void SwapBuffers(cc::CompositorFrame* frame) override; |
63 | 64 |
64 // SynchronousCompositor overrides. | 65 // SynchronousCompositor overrides. |
65 scoped_ptr<cc::CompositorFrame> DemandDrawHw( | 66 scoped_ptr<cc::CompositorFrame> DemandDrawHw( |
66 const gfx::Size& surface_size, | 67 const gfx::Size& surface_size, |
67 const gfx::Transform& transform, | 68 const gfx::Transform& transform, |
68 const gfx::Rect& viewport, | 69 const gfx::Rect& viewport, |
69 const gfx::Rect& clip, | 70 const gfx::Rect& clip, |
70 const gfx::Rect& viewport_rect_for_tile_priority, | 71 const gfx::Rect& viewport_rect_for_tile_priority, |
71 const gfx::Transform& transform_for_tile_priority) override; | 72 const gfx::Transform& transform_for_tile_priority) override; |
72 bool DemandDrawSw(SkCanvas* canvas) override; | 73 bool DemandDrawSw(SkCanvas* canvas) override; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 RenderWidgetHostViewAndroid* const rwhva_; | 111 RenderWidgetHostViewAndroid* const rwhva_; |
111 const int routing_id_; | 112 const int routing_id_; |
112 SynchronousCompositorClient* const compositor_client_; | 113 SynchronousCompositorClient* const compositor_client_; |
113 SynchronousCompositorOutputSurface* output_surface_; | 114 SynchronousCompositorOutputSurface* output_surface_; |
114 SynchronousCompositorExternalBeginFrameSource* begin_frame_source_; | 115 SynchronousCompositorExternalBeginFrameSource* begin_frame_source_; |
115 ui::SynchronousInputHandlerProxy* synchronous_input_handler_proxy_; | 116 ui::SynchronousInputHandlerProxy* synchronous_input_handler_proxy_; |
116 bool registered_with_client_; | 117 bool registered_with_client_; |
117 bool is_active_; | 118 bool is_active_; |
118 bool renderer_needs_begin_frames_; | 119 bool renderer_needs_begin_frames_; |
119 bool need_animate_input_; | 120 bool need_animate_input_; |
| 121 scoped_ptr<cc::CompositorFrame> frame_holder_; |
120 | 122 |
121 base::WeakPtrFactory<SynchronousCompositorImpl> weak_ptr_factory_; | 123 base::WeakPtrFactory<SynchronousCompositorImpl> weak_ptr_factory_; |
122 | 124 |
123 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorImpl); | 125 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorImpl); |
124 }; | 126 }; |
125 | 127 |
126 } // namespace content | 128 } // namespace content |
127 | 129 |
128 #endif // CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_IMPL_H_ | 130 #endif // CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_IMPL_H_ |
OLD | NEW |