| 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 26 matching lines...) Expand all Loading... |
| 108 RenderWidgetHostViewAndroid* const rwhva_; | 110 RenderWidgetHostViewAndroid* const rwhva_; |
| 109 const int routing_id_; | 111 const int routing_id_; |
| 110 SynchronousCompositorClient* const compositor_client_; | 112 SynchronousCompositorClient* const compositor_client_; |
| 111 SynchronousCompositorOutputSurface* output_surface_; | 113 SynchronousCompositorOutputSurface* output_surface_; |
| 112 SynchronousCompositorExternalBeginFrameSource* begin_frame_source_; | 114 SynchronousCompositorExternalBeginFrameSource* begin_frame_source_; |
| 113 ui::SynchronousInputHandlerProxy* synchronous_input_handler_proxy_; | 115 ui::SynchronousInputHandlerProxy* synchronous_input_handler_proxy_; |
| 114 bool registered_with_client_; | 116 bool registered_with_client_; |
| 115 bool is_active_; | 117 bool is_active_; |
| 116 bool renderer_needs_begin_frames_; | 118 bool renderer_needs_begin_frames_; |
| 117 bool need_animate_input_; | 119 bool need_animate_input_; |
| 118 scoped_ptr<cc::CompositorFrame> frame_holder_; | 120 SynchronousCompositor::Frame frame_holder_; |
| 119 | 121 |
| 120 base::WeakPtrFactory<SynchronousCompositorImpl> weak_ptr_factory_; | 122 base::WeakPtrFactory<SynchronousCompositorImpl> weak_ptr_factory_; |
| 121 | 123 |
| 122 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorImpl); | 124 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorImpl); |
| 123 }; | 125 }; |
| 124 | 126 |
| 125 } // namespace content | 127 } // namespace content |
| 126 | 128 |
| 127 #endif // CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_IMPL_H_ | 129 #endif // CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_IMPL_H_ |
| OLD | NEW |