| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_COMPOSITOR_DELEGATED_FRAME_HOST_H_ | 5 #ifndef CONTENT_BROWSER_COMPOSITOR_DELEGATED_FRAME_HOST_H_ |
| 6 #define CONTENT_BROWSER_COMPOSITOR_DELEGATED_FRAME_HOST_H_ | 6 #define CONTENT_BROWSER_COMPOSITOR_DELEGATED_FRAME_HOST_H_ |
| 7 | 7 |
| 8 #include "cc/layers/delegated_frame_provider.h" | 8 #include "cc/layers/delegated_frame_provider.h" |
| 9 #include "cc/layers/delegated_frame_resource_collection.h" | 9 #include "cc/layers/delegated_frame_resource_collection.h" |
| 10 #include "cc/output/copy_output_result.h" | 10 #include "cc/output/copy_output_result.h" |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 | 205 |
| 206 void SendDelegatedFrameAck(uint32 output_surface_id); | 206 void SendDelegatedFrameAck(uint32 output_surface_id); |
| 207 void SendReturnedDelegatedResources(uint32 output_surface_id); | 207 void SendReturnedDelegatedResources(uint32 output_surface_id); |
| 208 | 208 |
| 209 // DelegatedFrameEvictorClient implementation. | 209 // DelegatedFrameEvictorClient implementation. |
| 210 virtual void EvictDelegatedFrame() OVERRIDE; | 210 virtual void EvictDelegatedFrame() OVERRIDE; |
| 211 | 211 |
| 212 // cc::DelegatedFrameProviderClient implementation. | 212 // cc::DelegatedFrameProviderClient implementation. |
| 213 virtual void UnusedResourcesAreAvailable() OVERRIDE; | 213 virtual void UnusedResourcesAreAvailable() OVERRIDE; |
| 214 | 214 |
| 215 void DidReceiveFrameFromRenderer(); | 215 void DidReceiveFrameFromRenderer(const gfx::Rect& damage_rect); |
| 216 | 216 |
| 217 DelegatedFrameHostClient* client_; | 217 DelegatedFrameHostClient* client_; |
| 218 | 218 |
| 219 std::vector<base::Closure> on_compositing_did_commit_callbacks_; | 219 std::vector<base::Closure> on_compositing_did_commit_callbacks_; |
| 220 | 220 |
| 221 // The vsync manager we are observing for changes, if any. | 221 // The vsync manager we are observing for changes, if any. |
| 222 scoped_refptr<ui::CompositorVSyncManager> vsync_manager_; | 222 scoped_refptr<ui::CompositorVSyncManager> vsync_manager_; |
| 223 | 223 |
| 224 // The current VSync timebase and interval. These are zero until the first |
| 225 // call to OnUpdateVSyncParameters(). |
| 226 base::TimeTicks vsync_timebase_; |
| 227 base::TimeDelta vsync_interval_; |
| 228 |
| 224 // With delegated renderer, this is the last output surface, used to | 229 // With delegated renderer, this is the last output surface, used to |
| 225 // disambiguate resources with the same id coming from different output | 230 // disambiguate resources with the same id coming from different output |
| 226 // surfaces. | 231 // surfaces. |
| 227 uint32 last_output_surface_id_; | 232 uint32 last_output_surface_id_; |
| 228 | 233 |
| 229 // The number of delegated frame acks that are pending, to delay resource | 234 // The number of delegated frame acks that are pending, to delay resource |
| 230 // returns until the acks are sent. | 235 // returns until the acks are sent. |
| 231 int pending_delegated_ack_count_; | 236 int pending_delegated_ack_count_; |
| 232 | 237 |
| 233 // True after a delegated frame has been skipped, until a frame is not | 238 // True after a delegated frame has been skipped, until a frame is not |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 // YUV readback pipeline. | 282 // YUV readback pipeline. |
| 278 scoped_ptr<content::ReadbackYUVInterface> | 283 scoped_ptr<content::ReadbackYUVInterface> |
| 279 yuv_readback_pipeline_; | 284 yuv_readback_pipeline_; |
| 280 | 285 |
| 281 scoped_ptr<DelegatedFrameEvictor> delegated_frame_evictor_; | 286 scoped_ptr<DelegatedFrameEvictor> delegated_frame_evictor_; |
| 282 }; | 287 }; |
| 283 | 288 |
| 284 } // namespace content | 289 } // namespace content |
| 285 | 290 |
| 286 #endif // CONTENT_BROWSER_COMPOSITOR_DELEGATED_FRAME_HOST_H_ | 291 #endif // CONTENT_BROWSER_COMPOSITOR_DELEGATED_FRAME_HOST_H_ |
| OLD | NEW |