| 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 void OnBeginFrame(const viz::BeginFrameArgs& args) override; | 111 void OnBeginFrame(const viz::BeginFrameArgs& args) override; |
| 112 void ReclaimResources( | 112 void ReclaimResources( |
| 113 const std::vector<viz::ReturnedResource>& resources) override; | 113 const std::vector<viz::ReturnedResource>& resources) override; |
| 114 void WillDrawSurface(const viz::LocalSurfaceId& id, | 114 void WillDrawSurface(const viz::LocalSurfaceId& id, |
| 115 const gfx::Rect& damage_rect) override; | 115 const gfx::Rect& damage_rect) override; |
| 116 void OnBeginFramePausedChanged(bool paused) override; | 116 void OnBeginFramePausedChanged(bool paused) override; |
| 117 | 117 |
| 118 // Public interface exposed to RenderWidgetHostView. | 118 // Public interface exposed to RenderWidgetHostView. |
| 119 | 119 |
| 120 void DidCreateNewRendererCompositorFrameSink( | 120 void DidCreateNewRendererCompositorFrameSink( |
| 121 viz::mojom::CompositorFrameSinkClient* renderer_compositor_frame_sink); | 121 viz::mojom::CompositorFrameSinkClient* renderer_compositor_frame_sink, |
| 122 viz::mojom::TargetFrameForInputDelegate*); |
| 122 void SubmitCompositorFrame(const viz::LocalSurfaceId& local_surface_id, | 123 void SubmitCompositorFrame(const viz::LocalSurfaceId& local_surface_id, |
| 123 cc::CompositorFrame frame); | 124 cc::CompositorFrame frame); |
| 124 void ClearDelegatedFrame(); | 125 void ClearDelegatedFrame(); |
| 125 void WasHidden(); | 126 void WasHidden(); |
| 126 void WasShown(const ui::LatencyInfo& latency_info); | 127 void WasShown(const ui::LatencyInfo& latency_info); |
| 127 void WasResized(); | 128 void WasResized(); |
| 128 bool HasSavedFrame(); | 129 bool HasSavedFrame(); |
| 129 gfx::Size GetRequestedRendererSize() const; | 130 gfx::Size GetRequestedRendererSize() const; |
| 130 void SetCompositor(ui::Compositor* compositor); | 131 void SetCompositor(ui::Compositor* compositor); |
| 131 void ResetCompositor(); | 132 void ResetCompositor(); |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 bool result); | 239 bool result); |
| 239 static void ReturnSubscriberTexture( | 240 static void ReturnSubscriberTexture( |
| 240 base::WeakPtr<DelegatedFrameHost> rwhva, | 241 base::WeakPtr<DelegatedFrameHost> rwhva, |
| 241 scoped_refptr<OwnedMailbox> subscriber_texture, | 242 scoped_refptr<OwnedMailbox> subscriber_texture, |
| 242 const gpu::SyncToken& sync_token); | 243 const gpu::SyncToken& sync_token); |
| 243 | 244 |
| 244 // Called to consult the current |frame_subscriber_|, to determine and maybe | 245 // Called to consult the current |frame_subscriber_|, to determine and maybe |
| 245 // initiate a copy-into-video-frame request. | 246 // initiate a copy-into-video-frame request. |
| 246 void AttemptFrameSubscriberCapture(const gfx::Rect& damage_rect); | 247 void AttemptFrameSubscriberCapture(const gfx::Rect& damage_rect); |
| 247 | 248 |
| 248 void CreateCompositorFrameSinkSupport(); | 249 void CreateCompositorFrameSinkSupport( |
| 250 viz::mojom::TargetFrameForInputDelegate* = nullptr); |
| 249 void ResetCompositorFrameSinkSupport(); | 251 void ResetCompositorFrameSinkSupport(); |
| 250 | 252 |
| 251 const viz::FrameSinkId frame_sink_id_; | 253 const viz::FrameSinkId frame_sink_id_; |
| 252 viz::LocalSurfaceId local_surface_id_; | 254 viz::LocalSurfaceId local_surface_id_; |
| 253 DelegatedFrameHostClient* const client_; | 255 DelegatedFrameHostClient* const client_; |
| 254 ui::Compositor* compositor_; | 256 ui::Compositor* compositor_; |
| 255 | 257 |
| 256 // The vsync manager we are observing for changes, if any. | 258 // The vsync manager we are observing for changes, if any. |
| 257 scoped_refptr<ui::CompositorVSyncManager> vsync_manager_; | 259 scoped_refptr<ui::CompositorVSyncManager> vsync_manager_; |
| 258 | 260 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 bool has_frame_ = false; | 318 bool has_frame_ = false; |
| 317 viz::mojom::CompositorFrameSinkClient* renderer_compositor_frame_sink_ = | 319 viz::mojom::CompositorFrameSinkClient* renderer_compositor_frame_sink_ = |
| 318 nullptr; | 320 nullptr; |
| 319 | 321 |
| 320 std::unique_ptr<viz::FrameEvictor> frame_evictor_; | 322 std::unique_ptr<viz::FrameEvictor> frame_evictor_; |
| 321 }; | 323 }; |
| 322 | 324 |
| 323 } // namespace content | 325 } // namespace content |
| 324 | 326 |
| 325 #endif // CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_HOST_H_ | 327 #endif // CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_HOST_H_ |
| OLD | NEW |