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

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

Issue 2774373002: Use MojoCompositorFrameSink in RendererCompositorFrameSink (Closed)
Patch Set: Fixed mac Created 3 years, 8 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 // Returns the color that the resize gutters should be drawn with. Takes the 64 // Returns the color that the resize gutters should be drawn with. Takes the
65 // suggested color from the current page background. 65 // suggested color from the current page background.
66 virtual SkColor DelegatedFrameHostGetGutterColor(SkColor color) const = 0; 66 virtual SkColor DelegatedFrameHostGetGutterColor(SkColor color) const = 0;
67 virtual gfx::Size DelegatedFrameHostDesiredSizeInDIP() const = 0; 67 virtual gfx::Size DelegatedFrameHostDesiredSizeInDIP() const = 0;
68 68
69 virtual bool DelegatedFrameCanCreateResizeLock() const = 0; 69 virtual bool DelegatedFrameCanCreateResizeLock() const = 0;
70 virtual std::unique_ptr<CompositorResizeLock> 70 virtual std::unique_ptr<CompositorResizeLock>
71 DelegatedFrameHostCreateResizeLock() = 0; 71 DelegatedFrameHostCreateResizeLock() = 0;
72 72
73 virtual void DelegatedFrameHostSendReclaimCompositorResources(
74 bool is_swap_ack,
75 const cc::ReturnedResourceArray& resources) = 0;
76
77 virtual void OnBeginFrame(const cc::BeginFrameArgs& args) = 0; 73 virtual void OnBeginFrame(const cc::BeginFrameArgs& args) = 0;
78 virtual bool IsAutoResizeEnabled() const = 0; 74 virtual bool IsAutoResizeEnabled() const = 0;
79 }; 75 };
80 76
81 // The DelegatedFrameHost is used to host all of the RenderWidgetHostView state 77 // The DelegatedFrameHost is used to host all of the RenderWidgetHostView state
82 // and functionality that is associated with delegated frames being sent from 78 // and functionality that is associated with delegated frames being sent from
83 // the RenderWidget. The DelegatedFrameHost will push these changes through to 79 // the RenderWidget. The DelegatedFrameHost will push these changes through to
84 // the ui::Compositor associated with its DelegatedFrameHostClient. 80 // the ui::Compositor associated with its DelegatedFrameHostClient.
85 class CONTENT_EXPORT DelegatedFrameHost 81 class CONTENT_EXPORT DelegatedFrameHost
86 : public ui::CompositorObserver, 82 : public ui::CompositorObserver,
(...skipping 26 matching lines...) Expand all
113 109
114 // cc::CompositorFrameSinkSupportClient implementation. 110 // cc::CompositorFrameSinkSupportClient implementation.
115 void DidReceiveCompositorFrameAck() override; 111 void DidReceiveCompositorFrameAck() override;
116 void OnBeginFrame(const cc::BeginFrameArgs& args) override; 112 void OnBeginFrame(const cc::BeginFrameArgs& args) override;
117 void ReclaimResources(const cc::ReturnedResourceArray& resources) override; 113 void ReclaimResources(const cc::ReturnedResourceArray& resources) override;
118 void WillDrawSurface(const cc::LocalSurfaceId& id, 114 void WillDrawSurface(const cc::LocalSurfaceId& id,
119 const gfx::Rect& damage_rect) override; 115 const gfx::Rect& damage_rect) override;
120 116
121 // Public interface exposed to RenderWidgetHostView. 117 // Public interface exposed to RenderWidgetHostView.
122 118
123 void DidCreateNewRendererCompositorFrameSink(); 119 void DidCreateNewRendererCompositorFrameSink(
120 cc::mojom::MojoCompositorFrameSinkClient* renderer_compositor_frame_sink);
124 void SubmitCompositorFrame(const cc::LocalSurfaceId& local_surface_id, 121 void SubmitCompositorFrame(const cc::LocalSurfaceId& local_surface_id,
125 cc::CompositorFrame frame); 122 cc::CompositorFrame frame);
126 void ClearDelegatedFrame(); 123 void ClearDelegatedFrame();
127 void WasHidden(); 124 void WasHidden();
128 void WasShown(const ui::LatencyInfo& latency_info); 125 void WasShown(const ui::LatencyInfo& latency_info);
129 void WasResized(); 126 void WasResized();
130 bool HasSavedFrame(); 127 bool HasSavedFrame();
131 gfx::Size GetRequestedRendererSize() const; 128 gfx::Size GetRequestedRendererSize() const;
132 void SetCompositor(ui::Compositor* compositor); 129 void SetCompositor(ui::Compositor* compositor);
133 void ResetCompositor(); 130 void ResetCompositor();
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 // YUV readback pipeline. 312 // YUV readback pipeline.
316 std::unique_ptr<display_compositor::ReadbackYUVInterface> 313 std::unique_ptr<display_compositor::ReadbackYUVInterface>
317 yuv_readback_pipeline_; 314 yuv_readback_pipeline_;
318 315
319 bool needs_begin_frame_ = false; 316 bool needs_begin_frame_ = false;
320 uint32_t latest_confirmed_begin_frame_source_id_ = 0; 317 uint32_t latest_confirmed_begin_frame_source_id_ = 0;
321 uint64_t latest_confirmed_begin_frame_sequence_number_ = 318 uint64_t latest_confirmed_begin_frame_sequence_number_ =
322 cc::BeginFrameArgs::kInvalidFrameNumber; 319 cc::BeginFrameArgs::kInvalidFrameNumber;
323 320
324 bool has_frame_ = false; 321 bool has_frame_ = false;
322 cc::mojom::MojoCompositorFrameSinkClient* renderer_compositor_frame_sink_ =
323 nullptr;
325 324
326 std::unique_ptr<DelegatedFrameEvictor> delegated_frame_evictor_; 325 std::unique_ptr<DelegatedFrameEvictor> delegated_frame_evictor_;
327 }; 326 };
328 327
329 } // namespace content 328 } // namespace content
330 329
331 #endif // CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_HOST_H_ 330 #endif // CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698