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

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

Issue 2835403004: Revert "Use MojoCompositorFrameSink in RendererCompositorFrameSink"
Patch Set: Rebased 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
73 virtual void OnBeginFrame(const cc::BeginFrameArgs& args) = 0; 77 virtual void OnBeginFrame(const cc::BeginFrameArgs& args) = 0;
74 virtual bool IsAutoResizeEnabled() const = 0; 78 virtual bool IsAutoResizeEnabled() const = 0;
75 }; 79 };
76 80
77 // The DelegatedFrameHost is used to host all of the RenderWidgetHostView state 81 // The DelegatedFrameHost is used to host all of the RenderWidgetHostView state
78 // and functionality that is associated with delegated frames being sent from 82 // and functionality that is associated with delegated frames being sent from
79 // the RenderWidget. The DelegatedFrameHost will push these changes through to 83 // the RenderWidget. The DelegatedFrameHost will push these changes through to
80 // the ui::Compositor associated with its DelegatedFrameHostClient. 84 // the ui::Compositor associated with its DelegatedFrameHostClient.
81 class CONTENT_EXPORT DelegatedFrameHost 85 class CONTENT_EXPORT DelegatedFrameHost
82 : public ui::CompositorObserver, 86 : public ui::CompositorObserver,
(...skipping 28 matching lines...) Expand all
111 // cc::CompositorFrameSinkSupportClient implementation. 115 // cc::CompositorFrameSinkSupportClient implementation.
112 void DidReceiveCompositorFrameAck( 116 void DidReceiveCompositorFrameAck(
113 const cc::ReturnedResourceArray& resources) override; 117 const cc::ReturnedResourceArray& resources) override;
114 void OnBeginFrame(const cc::BeginFrameArgs& args) override; 118 void OnBeginFrame(const cc::BeginFrameArgs& args) override;
115 void ReclaimResources(const cc::ReturnedResourceArray& resources) override; 119 void ReclaimResources(const cc::ReturnedResourceArray& resources) override;
116 void WillDrawSurface(const cc::LocalSurfaceId& id, 120 void WillDrawSurface(const cc::LocalSurfaceId& id,
117 const gfx::Rect& damage_rect) override; 121 const gfx::Rect& damage_rect) override;
118 122
119 // Public interface exposed to RenderWidgetHostView. 123 // Public interface exposed to RenderWidgetHostView.
120 124
121 void DidCreateNewRendererCompositorFrameSink( 125 void DidCreateNewRendererCompositorFrameSink();
122 cc::mojom::MojoCompositorFrameSinkClient* renderer_compositor_frame_sink);
123 void SubmitCompositorFrame(const cc::LocalSurfaceId& local_surface_id, 126 void SubmitCompositorFrame(const cc::LocalSurfaceId& local_surface_id,
124 cc::CompositorFrame frame); 127 cc::CompositorFrame frame);
125 void ClearDelegatedFrame(); 128 void ClearDelegatedFrame();
126 void WasHidden(); 129 void WasHidden();
127 void WasShown(const ui::LatencyInfo& latency_info); 130 void WasShown(const ui::LatencyInfo& latency_info);
128 void WasResized(); 131 void WasResized();
129 bool HasSavedFrame(); 132 bool HasSavedFrame();
130 gfx::Size GetRequestedRendererSize() const; 133 gfx::Size GetRequestedRendererSize() const;
131 void SetCompositor(ui::Compositor* compositor); 134 void SetCompositor(ui::Compositor* compositor);
132 void ResetCompositor(); 135 void ResetCompositor();
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 // YUV readback pipeline. 317 // YUV readback pipeline.
315 std::unique_ptr<display_compositor::ReadbackYUVInterface> 318 std::unique_ptr<display_compositor::ReadbackYUVInterface>
316 yuv_readback_pipeline_; 319 yuv_readback_pipeline_;
317 320
318 bool needs_begin_frame_ = false; 321 bool needs_begin_frame_ = false;
319 uint32_t latest_confirmed_begin_frame_source_id_ = 0; 322 uint32_t latest_confirmed_begin_frame_source_id_ = 0;
320 uint64_t latest_confirmed_begin_frame_sequence_number_ = 323 uint64_t latest_confirmed_begin_frame_sequence_number_ =
321 cc::BeginFrameArgs::kInvalidFrameNumber; 324 cc::BeginFrameArgs::kInvalidFrameNumber;
322 325
323 bool has_frame_ = false; 326 bool has_frame_ = false;
324 cc::mojom::MojoCompositorFrameSinkClient* renderer_compositor_frame_sink_ =
325 nullptr;
326 327
327 std::unique_ptr<viz::FrameEvictor> frame_evictor_; 328 std::unique_ptr<viz::FrameEvictor> frame_evictor_;
328 }; 329 };
329 330
330 } // namespace content 331 } // namespace content
331 332
332 #endif // CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_HOST_H_ 333 #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