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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 SynchronousCompositorOutputSurface* output_surface, | 50 SynchronousCompositorOutputSurface* output_surface, |
51 SynchronousCompositorExternalBeginFrameSource* begin_frame_source, | 51 SynchronousCompositorExternalBeginFrameSource* begin_frame_source, |
52 ui::SynchronousInputHandlerProxy* synchronous_input_handler_proxy); | 52 ui::SynchronousInputHandlerProxy* synchronous_input_handler_proxy); |
53 void DidDestroyRendererObjects(); | 53 void DidDestroyRendererObjects(); |
54 | 54 |
55 // SynchronousCompositorExternalBeginFrameSourceClient overrides. | 55 // SynchronousCompositorExternalBeginFrameSourceClient overrides. |
56 void OnNeedsBeginFramesChange(bool needs_begin_frames) override; | 56 void OnNeedsBeginFramesChange(bool needs_begin_frames) override; |
57 | 57 |
58 // SynchronousCompositorOutputSurfaceClient overrides. | 58 // SynchronousCompositorOutputSurfaceClient overrides. |
59 void Invalidate() override; | 59 void Invalidate() override; |
60 void SwapBuffers(cc::CompositorFrame* frame) override; | 60 void SwapBuffers(uint32_t output_surface_id, |
| 61 cc::CompositorFrame* frame) override; |
61 | 62 |
62 // SynchronousCompositor overrides. | 63 // SynchronousCompositor overrides. |
63 scoped_ptr<cc::CompositorFrame> DemandDrawHw( | 64 SynchronousCompositor::Frame DemandDrawHw( |
64 const gfx::Size& surface_size, | 65 const gfx::Size& surface_size, |
65 const gfx::Transform& transform, | 66 const gfx::Transform& transform, |
66 const gfx::Rect& viewport, | 67 const gfx::Rect& viewport, |
67 const gfx::Rect& clip, | 68 const gfx::Rect& clip, |
68 const gfx::Rect& viewport_rect_for_tile_priority, | 69 const gfx::Rect& viewport_rect_for_tile_priority, |
69 const gfx::Transform& transform_for_tile_priority) override; | 70 const gfx::Transform& transform_for_tile_priority) override; |
70 bool DemandDrawSw(SkCanvas* canvas) override; | 71 bool DemandDrawSw(SkCanvas* canvas) override; |
71 void ReturnResources(const cc::CompositorFrameAck& frame_ack) override; | 72 void ReturnResources(uint32_t output_surface_id, |
| 73 const cc::CompositorFrameAck& frame_ack) override; |
72 void SetMemoryPolicy(size_t bytes_limit) override; | 74 void SetMemoryPolicy(size_t bytes_limit) override; |
73 void DidChangeRootLayerScrollOffset( | 75 void DidChangeRootLayerScrollOffset( |
74 const gfx::ScrollOffset& root_offset) override; | 76 const gfx::ScrollOffset& root_offset) override; |
75 void SetIsActive(bool is_active) override; | 77 void SetIsActive(bool is_active) override; |
76 void OnComputeScroll(base::TimeTicks animation_time) override; | 78 void OnComputeScroll(base::TimeTicks animation_time) override; |
77 | 79 |
78 // SynchronousCompositorBase overrides. | 80 // SynchronousCompositorBase overrides. |
79 void BeginFrame(const cc::BeginFrameArgs& args) override; | 81 void BeginFrame(const cc::BeginFrameArgs& args) override; |
80 InputEventAckState HandleInputEvent( | 82 InputEventAckState HandleInputEvent( |
81 const blink::WebInputEvent& input_event) override; | 83 const blink::WebInputEvent& input_event) override; |
(...skipping 27 matching lines...) Expand all Loading... |
109 RenderWidgetHostViewAndroid* const rwhva_; | 111 RenderWidgetHostViewAndroid* const rwhva_; |
110 const int routing_id_; | 112 const int routing_id_; |
111 SynchronousCompositorClient* const compositor_client_; | 113 SynchronousCompositorClient* const compositor_client_; |
112 SynchronousCompositorOutputSurface* output_surface_; | 114 SynchronousCompositorOutputSurface* output_surface_; |
113 SynchronousCompositorExternalBeginFrameSource* begin_frame_source_; | 115 SynchronousCompositorExternalBeginFrameSource* begin_frame_source_; |
114 ui::SynchronousInputHandlerProxy* synchronous_input_handler_proxy_; | 116 ui::SynchronousInputHandlerProxy* synchronous_input_handler_proxy_; |
115 bool registered_with_client_; | 117 bool registered_with_client_; |
116 bool is_active_; | 118 bool is_active_; |
117 bool renderer_needs_begin_frames_; | 119 bool renderer_needs_begin_frames_; |
118 bool need_animate_input_; | 120 bool need_animate_input_; |
119 scoped_ptr<cc::CompositorFrame> frame_holder_; | 121 SynchronousCompositor::Frame 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 |