Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(158)

Side by Side Diff: content/browser/renderer_host/delegated_frame_host.h

Issue 2147873003: cc: Dedup IPCs to return resources to client (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 // Returns the color that the resize gutters should be drawn with. Takes the 62 // Returns the color that the resize gutters should be drawn with. Takes the
63 // suggested color from the current page background. 63 // suggested color from the current page background.
64 virtual SkColor DelegatedFrameHostGetGutterColor(SkColor color) const = 0; 64 virtual SkColor DelegatedFrameHostGetGutterColor(SkColor color) const = 0;
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(
73 int output_surface_id,
74 const cc::CompositorFrameAck& ack) = 0;
75 virtual void DelegatedFrameHostSendReclaimCompositorResources( 72 virtual void DelegatedFrameHostSendReclaimCompositorResources(
76 int output_surface_id, 73 int output_surface_id,
77 const cc::CompositorFrameAck& ack) = 0; 74 bool is_swap_ack,
75 const cc::ReturnedResourceArray& resources) = 0;
78 virtual void DelegatedFrameHostOnLostCompositorResources() = 0; 76 virtual void DelegatedFrameHostOnLostCompositorResources() = 0;
79 77
80 virtual void DelegatedFrameHostUpdateVSyncParameters( 78 virtual void DelegatedFrameHostUpdateVSyncParameters(
81 const base::TimeTicks& timebase, 79 const base::TimeTicks& timebase,
82 const base::TimeDelta& interval) = 0; 80 const base::TimeDelta& interval) = 0;
83 virtual void SetBeginFrameSource(cc::BeginFrameSource* source) = 0; 81 virtual void SetBeginFrameSource(cc::BeginFrameSource* source) = 0;
84 virtual bool IsAutoResizeEnabled() const = 0; 82 virtual bool IsAutoResizeEnabled() const = 0;
85 }; 83 };
86 84
87 // The DelegatedFrameHost is used to host all of the RenderWidgetHostView state 85 // The DelegatedFrameHost is used to host all of the RenderWidgetHostView state
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 base::WeakPtr<DelegatedFrameHost> rwhva, 230 base::WeakPtr<DelegatedFrameHost> rwhva,
233 const base::Callback<void(bool)>& callback, 231 const base::Callback<void(bool)>& callback,
234 scoped_refptr<OwnedMailbox> subscriber_texture, 232 scoped_refptr<OwnedMailbox> subscriber_texture,
235 std::unique_ptr<cc::SingleReleaseCallback> release_callback, 233 std::unique_ptr<cc::SingleReleaseCallback> release_callback,
236 bool result); 234 bool result);
237 static void ReturnSubscriberTexture( 235 static void ReturnSubscriberTexture(
238 base::WeakPtr<DelegatedFrameHost> rwhva, 236 base::WeakPtr<DelegatedFrameHost> rwhva,
239 scoped_refptr<OwnedMailbox> subscriber_texture, 237 scoped_refptr<OwnedMailbox> subscriber_texture,
240 const gpu::SyncToken& sync_token); 238 const gpu::SyncToken& sync_token);
241 239
242 void SendDelegatedFrameAck(uint32_t output_surface_id); 240 void SendReclaimCompositorResources(uint32_t output_surface_id,
241 bool is_swap_ack);
243 void SurfaceDrawn(uint32_t output_surface_id, cc::SurfaceDrawStatus drawn); 242 void SurfaceDrawn(uint32_t output_surface_id, cc::SurfaceDrawStatus drawn);
244 void SendReturnedDelegatedResources(uint32_t output_surface_id);
245 243
246 // Called to consult the current |frame_subscriber_|, to determine and maybe 244 // Called to consult the current |frame_subscriber_|, to determine and maybe
247 // initiate a copy-into-video-frame request. 245 // initiate a copy-into-video-frame request.
248 void AttemptFrameSubscriberCapture(const gfx::Rect& damage_rect); 246 void AttemptFrameSubscriberCapture(const gfx::Rect& damage_rect);
249 247
250 DelegatedFrameHostClient* const client_; 248 DelegatedFrameHostClient* const client_;
251 ui::Compositor* compositor_; 249 ui::Compositor* compositor_;
252 250
253 // The vsync manager we are observing for changes, if any. 251 // The vsync manager we are observing for changes, if any.
254 scoped_refptr<ui::CompositorVSyncManager> vsync_manager_; 252 scoped_refptr<ui::CompositorVSyncManager> vsync_manager_;
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 // YUV readback pipeline. 326 // YUV readback pipeline.
329 std::unique_ptr<display_compositor::ReadbackYUVInterface> 327 std::unique_ptr<display_compositor::ReadbackYUVInterface>
330 yuv_readback_pipeline_; 328 yuv_readback_pipeline_;
331 329
332 std::unique_ptr<DelegatedFrameEvictor> delegated_frame_evictor_; 330 std::unique_ptr<DelegatedFrameEvictor> delegated_frame_evictor_;
333 }; 331 };
334 332
335 } // namespace content 333 } // namespace content
336 334
337 #endif // CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_HOST_H_ 335 #endif // CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_HOST_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/browser_compositor_view_mac.mm ('k') | content/browser/renderer_host/delegated_frame_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698