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

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

Issue 2277883002: Use vsync manager regardless of begin frame settings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Mac compile OOPS Created 4 years, 4 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_COMPOSITOR_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ 5 #ifndef CONTENT_BROWSER_COMPOSITOR_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
6 #define CONTENT_BROWSER_COMPOSITOR_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ 6 #define CONTENT_BROWSER_COMPOSITOR_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/threading/non_thread_safe.h" 9 #include "base/threading/non_thread_safe.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 17 matching lines...) Expand all
28 namespace gpu { 28 namespace gpu {
29 struct GpuProcessHostedCALayerTreeParamsMac; 29 struct GpuProcessHostedCALayerTreeParamsMac;
30 } 30 }
31 31
32 namespace content { 32 namespace content {
33 class ContextProviderCommandBuffer; 33 class ContextProviderCommandBuffer;
34 class ReflectorImpl; 34 class ReflectorImpl;
35 class WebGraphicsContext3DCommandBufferImpl; 35 class WebGraphicsContext3DCommandBufferImpl;
36 36
37 class CONTENT_EXPORT BrowserCompositorOutputSurface 37 class CONTENT_EXPORT BrowserCompositorOutputSurface
38 : public cc::OutputSurface, 38 : public cc::OutputSurface {
39 public ui::CompositorVSyncManager::Observer {
40 public: 39 public:
41 ~BrowserCompositorOutputSurface() override; 40 ~BrowserCompositorOutputSurface() override;
42 41
43 // cc::OutputSurface implementation. 42 // cc::OutputSurface implementation.
44 bool BindToClient(cc::OutputSurfaceClient* client) override;
45 cc::OverlayCandidateValidator* GetOverlayCandidateValidator() const override; 43 cc::OverlayCandidateValidator* GetOverlayCandidateValidator() const override;
46 44
47 // ui::CompositorVSyncManager::Observer implementation.
48 void OnUpdateVSyncParameters(base::TimeTicks timebase,
49 base::TimeDelta interval) override;
50
51 void OnUpdateVSyncParametersFromGpu(base::TimeTicks timebase, 45 void OnUpdateVSyncParametersFromGpu(base::TimeTicks timebase,
52 base::TimeDelta interval); 46 base::TimeDelta interval);
53 47
54 void SetReflector(ReflectorImpl* reflector); 48 void SetReflector(ReflectorImpl* reflector);
55 49
56 // Called when |reflector_| was updated. 50 // Called when |reflector_| was updated.
57 virtual void OnReflectorChanged(); 51 virtual void OnReflectorChanged();
58 52
59 // Called when a swap completion is sent from the GPU process. 53 // Called when a swap completion is sent from the GPU process.
60 // The argument |params_mac| is used to communicate parameters needed on Mac 54 // The argument |params_mac| is used to communicate parameters needed on Mac
(...skipping 27 matching lines...) Expand all
88 // Constructor used by the Vulkan implementation. 82 // Constructor used by the Vulkan implementation.
89 BrowserCompositorOutputSurface( 83 BrowserCompositorOutputSurface(
90 const scoped_refptr<cc::VulkanContextProvider>& vulkan_context_provider, 84 const scoped_refptr<cc::VulkanContextProvider>& vulkan_context_provider,
91 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager, 85 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager,
92 cc::SyntheticBeginFrameSource* begin_frame_source); 86 cc::SyntheticBeginFrameSource* begin_frame_source);
93 87
94 scoped_refptr<ui::CompositorVSyncManager> vsync_manager_; 88 scoped_refptr<ui::CompositorVSyncManager> vsync_manager_;
95 cc::SyntheticBeginFrameSource* synthetic_begin_frame_source_; 89 cc::SyntheticBeginFrameSource* synthetic_begin_frame_source_;
96 ReflectorImpl* reflector_; 90 ReflectorImpl* reflector_;
97 91
98 // True when BeginFrame scheduling is enabled.
99 bool use_begin_frame_scheduling_;
100
101 private: 92 private:
102 void Initialize(); 93 void Initialize();
103 94
104 void UpdateVSyncParametersInternal(base::TimeTicks timebase,
105 base::TimeDelta interval);
106
107 std::unique_ptr<display_compositor::CompositorOverlayCandidateValidator> 95 std::unique_ptr<display_compositor::CompositorOverlayCandidateValidator>
108 overlay_candidate_validator_; 96 overlay_candidate_validator_;
109 97
110 DISALLOW_COPY_AND_ASSIGN(BrowserCompositorOutputSurface); 98 DISALLOW_COPY_AND_ASSIGN(BrowserCompositorOutputSurface);
111 }; 99 };
112 100
113 } // namespace content 101 } // namespace content
114 102
115 #endif // CONTENT_BROWSER_COMPOSITOR_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ 103 #endif // CONTENT_BROWSER_COMPOSITOR_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/compositor/browser_compositor_output_surface.cc » ('j') | ui/compositor/compositor.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698