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

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

Issue 2511273002: Decouple BrowserCompositorOutputSurface from BeginFrameSource. (Closed)
Patch Set: Another attempt to fix the crash Created 4 years, 1 month 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 virtual void SetBeginFrameSource(cc::BeginFrameSource* source) = 0; 74 virtual void SetBeginFrameSource(cc::BeginFrameSource* source) = 0;
75 virtual bool IsAutoResizeEnabled() const = 0; 75 virtual bool IsAutoResizeEnabled() const = 0;
76 }; 76 };
77 77
78 // The DelegatedFrameHost is used to host all of the RenderWidgetHostView state 78 // The DelegatedFrameHost is used to host all of the RenderWidgetHostView state
79 // and functionality that is associated with delegated frames being sent from 79 // and functionality that is associated with delegated frames being sent from
80 // the RenderWidget. The DelegatedFrameHost will push these changes through to 80 // the RenderWidget. The DelegatedFrameHost will push these changes through to
81 // the ui::Compositor associated with its DelegatedFrameHostClient. 81 // the ui::Compositor associated with its DelegatedFrameHostClient.
82 class CONTENT_EXPORT DelegatedFrameHost 82 class CONTENT_EXPORT DelegatedFrameHost
83 : public ui::CompositorObserver, 83 : public ui::CompositorObserver,
84 public ui::CompositorVSyncManager::Observer, 84 public cc::VSyncObserver,
85 public ui::ContextFactoryObserver, 85 public ui::ContextFactoryObserver,
86 public DelegatedFrameEvictorClient, 86 public DelegatedFrameEvictorClient,
87 public cc::SurfaceFactoryClient, 87 public cc::SurfaceFactoryClient,
88 public base::SupportsWeakPtr<DelegatedFrameHost> { 88 public base::SupportsWeakPtr<DelegatedFrameHost> {
89 public: 89 public:
90 DelegatedFrameHost(const cc::FrameSinkId& frame_sink_id, 90 DelegatedFrameHost(const cc::FrameSinkId& frame_sink_id,
91 DelegatedFrameHostClient* client); 91 DelegatedFrameHostClient* client);
92 ~DelegatedFrameHost() override; 92 ~DelegatedFrameHost() override;
93 93
94 // ui::CompositorObserver implementation. 94 // ui::CompositorObserver implementation.
95 void OnCompositingDidCommit(ui::Compositor* compositor) override; 95 void OnCompositingDidCommit(ui::Compositor* compositor) override;
96 void OnCompositingStarted(ui::Compositor* compositor, 96 void OnCompositingStarted(ui::Compositor* compositor,
97 base::TimeTicks start_time) override; 97 base::TimeTicks start_time) override;
98 void OnCompositingEnded(ui::Compositor* compositor) override; 98 void OnCompositingEnded(ui::Compositor* compositor) override;
99 void OnCompositingLockStateChanged(ui::Compositor* compositor) override; 99 void OnCompositingLockStateChanged(ui::Compositor* compositor) override;
100 void OnCompositingShuttingDown(ui::Compositor* compositor) override; 100 void OnCompositingShuttingDown(ui::Compositor* compositor) override;
101 101
102 // ui::CompositorVSyncManager::Observer implementation. 102 // cc::VSyncObserver implementation.
103 void OnUpdateVSyncParameters(base::TimeTicks timebase, 103 void OnUpdateVSyncParameters(base::TimeTicks timebase,
104 base::TimeDelta interval) override; 104 base::TimeDelta interval) override;
105 105
106 // ImageTransportFactoryObserver implementation. 106 // ImageTransportFactoryObserver implementation.
107 void OnLostResources() override; 107 void OnLostResources() override;
108 108
109 // DelegatedFrameEvictorClient implementation. 109 // DelegatedFrameEvictorClient implementation.
110 void EvictDelegatedFrame() override; 110 void EvictDelegatedFrame() override;
111 111
112 // cc::SurfaceFactoryClient implementation. 112 // cc::SurfaceFactoryClient implementation.
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 // YUV readback pipeline. 330 // YUV readback pipeline.
331 std::unique_ptr<display_compositor::ReadbackYUVInterface> 331 std::unique_ptr<display_compositor::ReadbackYUVInterface>
332 yuv_readback_pipeline_; 332 yuv_readback_pipeline_;
333 333
334 std::unique_ptr<DelegatedFrameEvictor> delegated_frame_evictor_; 334 std::unique_ptr<DelegatedFrameEvictor> delegated_frame_evictor_;
335 }; 335 };
336 336
337 } // namespace content 337 } // namespace content
338 338
339 #endif // CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_HOST_H_ 339 #endif // CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698