| 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_RENDERER_HOST_DELEGATED_FRAME_HOST_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_HOST_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_HOST_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_HOST_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 virtual gfx::Size DelegatedFrameHostDesiredSizeInDIP() const = 0; | 65 virtual gfx::Size DelegatedFrameHostDesiredSizeInDIP() const = 0; |
| 66 | 66 |
| 67 virtual bool DelegatedFrameCanCreateResizeLock() const = 0; | 67 virtual bool DelegatedFrameCanCreateResizeLock() const = 0; |
| 68 virtual std::unique_ptr<ResizeLock> DelegatedFrameHostCreateResizeLock( | 68 virtual std::unique_ptr<ResizeLock> DelegatedFrameHostCreateResizeLock( |
| 69 bool defer_compositor_lock) = 0; | 69 bool defer_compositor_lock) = 0; |
| 70 virtual void DelegatedFrameHostResizeLockWasReleased() = 0; | 70 virtual void DelegatedFrameHostResizeLockWasReleased() = 0; |
| 71 | 71 |
| 72 virtual void DelegatedFrameHostSendCompositorSwapAck( | 72 virtual void DelegatedFrameHostSendCompositorSwapAck( |
| 73 int output_surface_id, | 73 int output_surface_id, |
| 74 const cc::CompositorFrameAck& ack) = 0; | 74 const cc::CompositorFrameAck& ack) = 0; |
| 75 virtual void DelegatedFrameHostSendReclaimCompositorResources( | |
| 76 int output_surface_id, | |
| 77 const cc::CompositorFrameAck& ack) = 0; | |
| 78 virtual void DelegatedFrameHostOnLostCompositorResources() = 0; | 75 virtual void DelegatedFrameHostOnLostCompositorResources() = 0; |
| 79 | 76 |
| 80 virtual void DelegatedFrameHostUpdateVSyncParameters( | 77 virtual void DelegatedFrameHostUpdateVSyncParameters( |
| 81 const base::TimeTicks& timebase, | 78 const base::TimeTicks& timebase, |
| 82 const base::TimeDelta& interval) = 0; | 79 const base::TimeDelta& interval) = 0; |
| 83 virtual void SetBeginFrameSource(cc::BeginFrameSource* source) = 0; | 80 virtual void SetBeginFrameSource(cc::BeginFrameSource* source) = 0; |
| 84 }; | 81 }; |
| 85 | 82 |
| 86 // The DelegatedFrameHost is used to host all of the RenderWidgetHostView state | 83 // The DelegatedFrameHost is used to host all of the RenderWidgetHostView state |
| 87 // and functionality that is associated with delegated frames being sent from | 84 // and functionality that is associated with delegated frames being sent from |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 scoped_refptr<OwnedMailbox> subscriber_texture, | 230 scoped_refptr<OwnedMailbox> subscriber_texture, |
| 234 std::unique_ptr<cc::SingleReleaseCallback> release_callback, | 231 std::unique_ptr<cc::SingleReleaseCallback> release_callback, |
| 235 bool result); | 232 bool result); |
| 236 static void ReturnSubscriberTexture( | 233 static void ReturnSubscriberTexture( |
| 237 base::WeakPtr<DelegatedFrameHost> rwhva, | 234 base::WeakPtr<DelegatedFrameHost> rwhva, |
| 238 scoped_refptr<OwnedMailbox> subscriber_texture, | 235 scoped_refptr<OwnedMailbox> subscriber_texture, |
| 239 const gpu::SyncToken& sync_token); | 236 const gpu::SyncToken& sync_token); |
| 240 | 237 |
| 241 void SendDelegatedFrameAck(uint32_t output_surface_id); | 238 void SendDelegatedFrameAck(uint32_t output_surface_id); |
| 242 void SurfaceDrawn(uint32_t output_surface_id, cc::SurfaceDrawStatus drawn); | 239 void SurfaceDrawn(uint32_t output_surface_id, cc::SurfaceDrawStatus drawn); |
| 243 void SendReturnedDelegatedResources(uint32_t output_surface_id); | |
| 244 | 240 |
| 245 // Called to consult the current |frame_subscriber_|, to determine and maybe | 241 // Called to consult the current |frame_subscriber_|, to determine and maybe |
| 246 // initiate a copy-into-video-frame request. | 242 // initiate a copy-into-video-frame request. |
| 247 void AttemptFrameSubscriberCapture(const gfx::Rect& damage_rect); | 243 void AttemptFrameSubscriberCapture(const gfx::Rect& damage_rect); |
| 248 | 244 |
| 249 DelegatedFrameHostClient* const client_; | 245 DelegatedFrameHostClient* const client_; |
| 250 ui::Compositor* compositor_; | 246 ui::Compositor* compositor_; |
| 251 | 247 |
| 252 // The vsync manager we are observing for changes, if any. | 248 // The vsync manager we are observing for changes, if any. |
| 253 scoped_refptr<ui::CompositorVSyncManager> vsync_manager_; | 249 scoped_refptr<ui::CompositorVSyncManager> vsync_manager_; |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 // YUV readback pipeline. | 323 // YUV readback pipeline. |
| 328 std::unique_ptr<display_compositor::ReadbackYUVInterface> | 324 std::unique_ptr<display_compositor::ReadbackYUVInterface> |
| 329 yuv_readback_pipeline_; | 325 yuv_readback_pipeline_; |
| 330 | 326 |
| 331 std::unique_ptr<DelegatedFrameEvictor> delegated_frame_evictor_; | 327 std::unique_ptr<DelegatedFrameEvictor> delegated_frame_evictor_; |
| 332 }; | 328 }; |
| 333 | 329 |
| 334 } // namespace content | 330 } // namespace content |
| 335 | 331 |
| 336 #endif // CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_HOST_H_ | 332 #endif // CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_HOST_H_ |
| OLD | NEW |