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

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

Issue 1821863002: Hook up ui::Compositor to Display's BeginFrameSource (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Display member destruction order Created 4 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_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 <memory>
9
10 #include "base/macros.h" 8 #include "base/macros.h"
11 #include "base/threading/non_thread_safe.h" 9 #include "base/threading/non_thread_safe.h"
12 #include "build/build_config.h" 10 #include "build/build_config.h"
13 #include "cc/output/output_surface.h" 11 #include "cc/output/output_surface.h"
12 #include "cc/scheduler/begin_frame_source.h"
14 #include "content/common/content_export.h" 13 #include "content/common/content_export.h"
15 #include "ui/compositor/compositor_vsync_manager.h" 14 #include "ui/compositor/compositor_vsync_manager.h"
16 15
17 namespace cc { 16 namespace cc {
18 class SoftwareOutputDevice; 17 class SoftwareOutputDevice;
19 } 18 }
20 19
21 namespace gfx { 20 namespace gfx {
22 enum class SwapResult; 21 enum class SwapResult;
23 } 22 }
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 virtual void SetSurfaceSuspendedForRecycle(bool suspended) = 0; 62 virtual void SetSurfaceSuspendedForRecycle(bool suspended) = 0;
64 virtual bool SurfaceShouldNotShowFramesAfterSuspendForRecycle() const = 0; 63 virtual bool SurfaceShouldNotShowFramesAfterSuspendForRecycle() const = 0;
65 #endif 64 #endif
66 65
67 protected: 66 protected:
68 // Constructor used by the accelerated implementation. 67 // Constructor used by the accelerated implementation.
69 BrowserCompositorOutputSurface( 68 BrowserCompositorOutputSurface(
70 const scoped_refptr<cc::ContextProvider>& context, 69 const scoped_refptr<cc::ContextProvider>& context,
71 const scoped_refptr<cc::ContextProvider>& worker_context, 70 const scoped_refptr<cc::ContextProvider>& worker_context,
72 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager, 71 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager,
72 base::SingleThreadTaskRunner* task_runner,
73 std::unique_ptr<BrowserCompositorOverlayCandidateValidator> 73 std::unique_ptr<BrowserCompositorOverlayCandidateValidator>
74 overlay_candidate_validator); 74 overlay_candidate_validator);
75 75
76 // Constructor used by the software implementation. 76 // Constructor used by the software implementation.
77 BrowserCompositorOutputSurface( 77 BrowserCompositorOutputSurface(
78 std::unique_ptr<cc::SoftwareOutputDevice> software_device, 78 std::unique_ptr<cc::SoftwareOutputDevice> software_device,
79 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager); 79 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager,
80 base::SingleThreadTaskRunner* task_runner);
80 81
81 scoped_refptr<ui::CompositorVSyncManager> vsync_manager_; 82 scoped_refptr<ui::CompositorVSyncManager> vsync_manager_;
83 std::unique_ptr<cc::SyntheticBeginFrameSource> synthetic_begin_frame_source_;
82 ReflectorImpl* reflector_; 84 ReflectorImpl* reflector_;
83 85
84 // True when BeginFrame scheduling is enabled. 86 // True when BeginFrame scheduling is enabled.
85 bool use_begin_frame_scheduling_; 87 bool use_begin_frame_scheduling_;
86 88
87 private: 89 private:
88 void Initialize(); 90 void Initialize();
89 91
92 void UpdateVSyncParametersInternal(base::TimeTicks timebase,
93 base::TimeDelta interval);
94
90 std::unique_ptr<BrowserCompositorOverlayCandidateValidator> 95 std::unique_ptr<BrowserCompositorOverlayCandidateValidator>
91 overlay_candidate_validator_; 96 overlay_candidate_validator_;
92 97
93 DISALLOW_COPY_AND_ASSIGN(BrowserCompositorOutputSurface); 98 DISALLOW_COPY_AND_ASSIGN(BrowserCompositorOutputSurface);
94 }; 99 };
95 100
96 } // namespace content 101 } // namespace content
97 102
98 #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 | « components/mus/surfaces/top_level_display_client.cc ('k') | content/browser/compositor/browser_compositor_output_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698