| 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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 // DelegatedFrameEvictorClient implementation. | 218 // DelegatedFrameEvictorClient implementation. |
| 219 virtual void EvictDelegatedFrame() OVERRIDE; | 219 virtual void EvictDelegatedFrame() OVERRIDE; |
| 220 | 220 |
| 221 // cc::DelegatedFrameProviderClient implementation. | 221 // cc::DelegatedFrameProviderClient implementation. |
| 222 virtual void UnusedResourcesAreAvailable() OVERRIDE; | 222 virtual void UnusedResourcesAreAvailable() OVERRIDE; |
| 223 | 223 |
| 224 // cc::SurfaceFactoryClient implementation. | 224 // cc::SurfaceFactoryClient implementation. |
| 225 virtual void ReturnResources( | 225 virtual void ReturnResources( |
| 226 const cc::ReturnedResourceArray& resources) OVERRIDE; | 226 const cc::ReturnedResourceArray& resources) OVERRIDE; |
| 227 | 227 |
| 228 void DidReceiveFrameFromRenderer(); | 228 void DidReceiveFrameFromRenderer(const gfx::Rect& damage_rect); |
| 229 | 229 |
| 230 DelegatedFrameHostClient* client_; | 230 DelegatedFrameHostClient* client_; |
| 231 | 231 |
| 232 // True if this renders into a Surface, false if it renders into a delegated | 232 // True if this renders into a Surface, false if it renders into a delegated |
| 233 // layer. | 233 // layer. |
| 234 bool use_surfaces_; | 234 bool use_surfaces_; |
| 235 | 235 |
| 236 std::vector<base::Closure> on_compositing_did_commit_callbacks_; | 236 std::vector<base::Closure> on_compositing_did_commit_callbacks_; |
| 237 | 237 |
| 238 // The vsync manager we are observing for changes, if any. | 238 // The vsync manager we are observing for changes, if any. |
| 239 scoped_refptr<ui::CompositorVSyncManager> vsync_manager_; | 239 scoped_refptr<ui::CompositorVSyncManager> vsync_manager_; |
| 240 | 240 |
| 241 // The current VSync timebase and interval. These are zero until the first |
| 242 // call to OnUpdateVSyncParameters(). |
| 243 base::TimeTicks vsync_timebase_; |
| 244 base::TimeDelta vsync_interval_; |
| 245 |
| 241 // With delegated renderer, this is the last output surface, used to | 246 // With delegated renderer, this is the last output surface, used to |
| 242 // disambiguate resources with the same id coming from different output | 247 // disambiguate resources with the same id coming from different output |
| 243 // surfaces. | 248 // surfaces. |
| 244 uint32 last_output_surface_id_; | 249 uint32 last_output_surface_id_; |
| 245 | 250 |
| 246 // The number of delegated frame acks that are pending, to delay resource | 251 // The number of delegated frame acks that are pending, to delay resource |
| 247 // returns until the acks are sent. | 252 // returns until the acks are sent. |
| 248 int pending_delegated_ack_count_; | 253 int pending_delegated_ack_count_; |
| 249 | 254 |
| 250 // True after a delegated frame has been skipped, until a frame is not | 255 // True after a delegated frame has been skipped, until a frame is not |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 // YUV readback pipeline. | 306 // YUV readback pipeline. |
| 302 scoped_ptr<content::ReadbackYUVInterface> | 307 scoped_ptr<content::ReadbackYUVInterface> |
| 303 yuv_readback_pipeline_; | 308 yuv_readback_pipeline_; |
| 304 | 309 |
| 305 scoped_ptr<DelegatedFrameEvictor> delegated_frame_evictor_; | 310 scoped_ptr<DelegatedFrameEvictor> delegated_frame_evictor_; |
| 306 }; | 311 }; |
| 307 | 312 |
| 308 } // namespace content | 313 } // namespace content |
| 309 | 314 |
| 310 #endif // CONTENT_BROWSER_COMPOSITOR_DELEGATED_FRAME_HOST_H_ | 315 #endif // CONTENT_BROWSER_COMPOSITOR_DELEGATED_FRAME_HOST_H_ |
| OLD | NEW |