| 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 <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 const gfx::Transform& transform, | 66 const gfx::Transform& transform, |
| 67 gfx::Rect viewport, | 67 gfx::Rect viewport, |
| 68 gfx::Rect clip, | 68 gfx::Rect clip, |
| 69 gfx::Rect viewport_rect_for_tile_priority, | 69 gfx::Rect viewport_rect_for_tile_priority, |
| 70 const gfx::Transform& transform_for_tile_priority) override; | 70 const gfx::Transform& transform_for_tile_priority) override; |
| 71 virtual bool DemandDrawSw(SkCanvas* canvas) override; | 71 virtual bool DemandDrawSw(SkCanvas* canvas) override; |
| 72 virtual void ReturnResources( | 72 virtual void ReturnResources( |
| 73 const cc::CompositorFrameAck& frame_ack) override; | 73 const cc::CompositorFrameAck& frame_ack) override; |
| 74 virtual void SetMemoryPolicy(size_t bytes_limit) override; | 74 virtual void SetMemoryPolicy(size_t bytes_limit) override; |
| 75 virtual void DidChangeRootLayerScrollOffset() override; | 75 virtual void DidChangeRootLayerScrollOffset() override; |
| 76 virtual void OnVSync(base::TimeTicks frame_time, |
| 77 base::TimeDelta vsync_period) override; |
| 76 | 78 |
| 77 // LayerScrollOffsetDelegate | 79 // LayerScrollOffsetDelegate |
| 78 virtual gfx::ScrollOffset GetTotalScrollOffset() override; | 80 virtual gfx::ScrollOffset GetTotalScrollOffset() override; |
| 79 virtual void UpdateRootLayerState( | 81 virtual void UpdateRootLayerState( |
| 80 const gfx::ScrollOffset& total_scroll_offset, | 82 const gfx::ScrollOffset& total_scroll_offset, |
| 81 const gfx::ScrollOffset& max_scroll_offset, | 83 const gfx::ScrollOffset& max_scroll_offset, |
| 82 const gfx::SizeF& scrollable_size, | 84 const gfx::SizeF& scrollable_size, |
| 83 float page_scale_factor, | 85 float page_scale_factor, |
| 84 float min_page_scale_factor, | 86 float min_page_scale_factor, |
| 85 float max_page_scale_factor) override; | 87 float max_page_scale_factor) override; |
| 86 virtual bool IsExternalFlingActive() const override; | 88 virtual bool IsExternalFlingActive() const override; |
| 87 | 89 |
| 88 void SetInputHandler(cc::InputHandler* input_handler); | 90 void SetInputHandler(cc::InputHandler* input_handler); |
| 89 void DidOverscroll(const DidOverscrollParams& params); | 91 void DidOverscroll(const DidOverscrollParams& params); |
| 90 void DidStopFlinging(); | 92 void DidStopFlinging(); |
| 91 | 93 |
| 92 private: | 94 private: |
| 93 friend class WebContentsUserData<SynchronousCompositorImpl>; | 95 friend class WebContentsUserData<SynchronousCompositorImpl>; |
| 94 friend class SynchronousCompositor; | 96 friend class SynchronousCompositor; |
| 95 explicit SynchronousCompositorImpl(WebContents* contents); | 97 explicit SynchronousCompositorImpl(WebContents* contents); |
| 96 virtual ~SynchronousCompositorImpl(); | 98 virtual ~SynchronousCompositorImpl(); |
| 97 | 99 |
| 98 void SetClient(SynchronousCompositorClient* compositor_client); | 100 void SetClient(SynchronousCompositorClient* compositor_client); |
| 99 void UpdateFrameMetaData(const cc::CompositorFrameMetadata& frame_info); | 101 void UpdateFrameMetaData(const cc::CompositorFrameMetadata& frame_info); |
| 100 void NotifyDidDestroyCompositorToClient(); | 102 void NotifyDidDestroyCompositorToClient(); |
| 103 void DidInvalidateOutputSurface(); |
| 101 void DidActivatePendingTree(); | 104 void DidActivatePendingTree(); |
| 102 void DeliverMessages(); | 105 void DeliverMessages(); |
| 103 bool CalledOnValidThread() const; | 106 bool CalledOnValidThread() const; |
| 104 | 107 |
| 105 SynchronousCompositorClient* compositor_client_; | 108 SynchronousCompositorClient* compositor_client_; |
| 106 SynchronousCompositorOutputSurface* output_surface_; | 109 SynchronousCompositorOutputSurface* output_surface_; |
| 107 SynchronousCompositorExternalBeginFrameSource* begin_frame_source_; | 110 SynchronousCompositorExternalBeginFrameSource* begin_frame_source_; |
| 108 WebContents* contents_; | 111 WebContents* contents_; |
| 109 const int routing_id_; | 112 const int routing_id_; |
| 110 cc::InputHandler* input_handler_; | 113 cc::InputHandler* input_handler_; |
| 111 bool invoking_composite_; | 114 bool invoking_composite_; |
| 112 | 115 |
| 113 base::WeakPtrFactory<SynchronousCompositorImpl> weak_ptr_factory_; | 116 base::WeakPtrFactory<SynchronousCompositorImpl> weak_ptr_factory_; |
| 114 | 117 |
| 115 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorImpl); | 118 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorImpl); |
| 116 }; | 119 }; |
| 117 | 120 |
| 118 } // namespace content | 121 } // namespace content |
| 119 | 122 |
| 120 #endif // CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_IMPL_H_ | 123 #endif // CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_IMPL_H_ |
| OLD | NEW |