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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 void DidOverscroll(const DidOverscrollParams& params); | 92 void DidOverscroll(const DidOverscrollParams& params); |
93 void DidStopFlinging(); | 93 void DidStopFlinging(); |
94 | 94 |
95 private: | 95 private: |
96 friend class WebContentsUserData<SynchronousCompositorImpl>; | 96 friend class WebContentsUserData<SynchronousCompositorImpl>; |
97 friend class SynchronousCompositor; | 97 friend class SynchronousCompositor; |
98 explicit SynchronousCompositorImpl(WebContents* contents); | 98 explicit SynchronousCompositorImpl(WebContents* contents); |
99 ~SynchronousCompositorImpl() override; | 99 ~SynchronousCompositorImpl() override; |
100 | 100 |
101 void SetClient(SynchronousCompositorClient* compositor_client); | 101 void SetClient(SynchronousCompositorClient* compositor_client); |
| 102 void RegisterWithClient(); |
102 void UpdateFrameMetaData(const cc::CompositorFrameMetadata& frame_info); | 103 void UpdateFrameMetaData(const cc::CompositorFrameMetadata& frame_info); |
103 void DidActivatePendingTree(); | 104 void DidActivatePendingTree(); |
104 void DeliverMessages(); | 105 void DeliverMessages(); |
105 bool CalledOnValidThread() const; | 106 bool CalledOnValidThread() const; |
106 void UpdateNeedsBeginFrames(); | 107 void UpdateNeedsBeginFrames(); |
107 void SetInputHandler(cc::InputHandler* input_handler); | 108 void SetInputHandler(cc::InputHandler* input_handler); |
108 | 109 |
109 SynchronousCompositorClient* compositor_client_; | 110 SynchronousCompositorClient* compositor_client_; |
110 SynchronousCompositorOutputSurface* output_surface_; | 111 SynchronousCompositorOutputSurface* output_surface_; |
111 SynchronousCompositorExternalBeginFrameSource* begin_frame_source_; | 112 SynchronousCompositorExternalBeginFrameSource* begin_frame_source_; |
112 WebContents* contents_; | 113 WebContents* contents_; |
113 const int routing_id_; | 114 const int routing_id_; |
114 cc::InputHandler* input_handler_; | 115 cc::InputHandler* input_handler_; |
| 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 | 119 |
118 base::WeakPtrFactory<SynchronousCompositorImpl> weak_ptr_factory_; | 120 base::WeakPtrFactory<SynchronousCompositorImpl> weak_ptr_factory_; |
119 | 121 |
120 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorImpl); | 122 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorImpl); |
121 }; | 123 }; |
122 | 124 |
123 } // namespace content | 125 } // namespace content |
124 | 126 |
125 #endif // CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_IMPL_H_ | 127 #endif // CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_IMPL_H_ |
OLD | NEW |