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

Side by Side Diff: content/browser/compositor/mus_browser_compositor_output_surface.h

Issue 2527283003: cc: Introduce BeginFrame sequence numbers and acknowledgements.
Patch Set: Address Brian's comments. Created 4 years 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_COMPOSITOR_MUS_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ 5 #ifndef CONTENT_BROWSER_COMPOSITOR_MUS_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
6 #define CONTENT_BROWSER_COMPOSITOR_MUS_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ 6 #define CONTENT_BROWSER_COMPOSITOR_MUS_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 MusBrowserCompositorOutputSurface( 51 MusBrowserCompositorOutputSurface(
52 aura::Window* window, 52 aura::Window* window,
53 scoped_refptr<ContextProviderCommandBuffer> context, 53 scoped_refptr<ContextProviderCommandBuffer> context,
54 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, 54 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
55 const UpdateVSyncParametersCallback& update_vsync_parameters_callback, 55 const UpdateVSyncParametersCallback& update_vsync_parameters_callback,
56 std::unique_ptr<display_compositor::CompositorOverlayCandidateValidator> 56 std::unique_ptr<display_compositor::CompositorOverlayCandidateValidator>
57 overlay_candidate_validator); 57 overlay_candidate_validator);
58 58
59 ~MusBrowserCompositorOutputSurface() override; 59 ~MusBrowserCompositorOutputSurface() override;
60 60
61 cc::BeginFrameSource* GetBeginFrameSource();
62
61 protected: 63 protected:
62 // cc::OutputSurface implementation. 64 // cc::OutputSurface implementation.
63 void SwapBuffers(cc::OutputSurfaceFrame frame) override; 65 void SwapBuffers(cc::OutputSurfaceFrame frame) override;
64 66
65 // cc::CompositorFrameSinkClient: 67 // cc::CompositorFrameSinkClient:
66 void SetBeginFrameSource(cc::BeginFrameSource* source) override; 68 void SetBeginFrameSource(cc::BeginFrameSource* source) override;
67 void ReclaimResources(const cc::ReturnedResourceArray& resources) override; 69 void ReclaimResources(const cc::ReturnedResourceArray& resources) override;
68 void SetTreeActivationCallback(const base::Closure& callback) override; 70 void SetTreeActivationCallback(const base::Closure& callback) override;
69 void DidReceiveCompositorFrameAck() override; 71 void DidReceiveCompositorFrameAck() override;
70 void DidLoseCompositorFrameSink() override; 72 void DidLoseCompositorFrameSink() override;
(...skipping 11 matching lines...) Expand all
82 const gpu::Mailbox& GetMailboxFromResourceId(uint32_t id); 84 const gpu::Mailbox& GetMailboxFromResourceId(uint32_t id);
83 85
84 // TODO(mfomitchev): Remove once we complete the switch to Aura-Mus. 86 // TODO(mfomitchev): Remove once we complete the switch to Aura-Mus.
85 ui::Window* ui_window_; 87 ui::Window* ui_window_;
86 std::unique_ptr<ui::WindowCompositorFrameSink> ui_compositor_frame_sink_; 88 std::unique_ptr<ui::WindowCompositorFrameSink> ui_compositor_frame_sink_;
87 89
88 aura::Window* window_; 90 aura::Window* window_;
89 std::unique_ptr<aura::WindowCompositorFrameSink> compositor_frame_sink_; 91 std::unique_ptr<aura::WindowCompositorFrameSink> compositor_frame_sink_;
90 std::vector<uint32_t> free_resource_ids_; 92 std::vector<uint32_t> free_resource_ids_;
91 std::vector<gpu::Mailbox> mailboxes_; 93 std::vector<gpu::Mailbox> mailboxes_;
94 cc::BeginFrameSource* begin_frame_source_;
92 95
93 DISALLOW_COPY_AND_ASSIGN(MusBrowserCompositorOutputSurface); 96 DISALLOW_COPY_AND_ASSIGN(MusBrowserCompositorOutputSurface);
94 }; 97 };
95 98
96 } // namespace content 99 } // namespace content
97 100
98 #endif // CONTENT_BROWSER_COMPOSITOR_MUS_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ 101 #endif // CONTENT_BROWSER_COMPOSITOR_MUS_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698