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

Side by Side Diff: content/browser/compositor/browser_compositor_output_surface.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_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"
11 #include "cc/output/output_surface.h" 11 #include "cc/output/output_surface.h"
12 #include "content/common/content_export.h" 12 #include "content/common/content_export.h"
13 #include "ui/compositor/compositor_vsync_manager.h" 13 #include "ui/compositor/compositor_vsync_manager.h"
14 14
15 namespace cc { 15 namespace cc {
16 class SoftwareOutputDevice; 16 class SoftwareOutputDevice;
17 class SyntheticBeginFrameSource;
18 } 17 }
19 18
20 namespace display_compositor { 19 namespace display_compositor {
21 class CompositorOverlayCandidateValidator; 20 class CompositorOverlayCandidateValidator;
22 } 21 }
23 22
24 namespace gfx { 23 namespace gfx {
25 enum class SwapResult; 24 enum class SwapResult;
26 } 25 }
27 26
(...skipping 20 matching lines...) Expand all
48 47
49 #if defined(OS_MACOSX) 48 #if defined(OS_MACOSX)
50 virtual void SetSurfaceSuspendedForRecycle(bool suspended) = 0; 49 virtual void SetSurfaceSuspendedForRecycle(bool suspended) = 0;
51 #endif 50 #endif
52 51
53 protected: 52 protected:
54 // Constructor used by the accelerated implementation. 53 // Constructor used by the accelerated implementation.
55 BrowserCompositorOutputSurface( 54 BrowserCompositorOutputSurface(
56 scoped_refptr<cc::ContextProvider> context, 55 scoped_refptr<cc::ContextProvider> context,
57 scoped_refptr<ui::CompositorVSyncManager> vsync_manager, 56 scoped_refptr<ui::CompositorVSyncManager> vsync_manager,
58 cc::SyntheticBeginFrameSource* begin_frame_source,
59 std::unique_ptr<display_compositor::CompositorOverlayCandidateValidator> 57 std::unique_ptr<display_compositor::CompositorOverlayCandidateValidator>
60 overlay_candidate_validator); 58 overlay_candidate_validator);
61 59
62 // Constructor used by the software implementation. 60 // Constructor used by the software implementation.
63 BrowserCompositorOutputSurface( 61 BrowserCompositorOutputSurface(
64 std::unique_ptr<cc::SoftwareOutputDevice> software_device, 62 std::unique_ptr<cc::SoftwareOutputDevice> software_device,
65 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager, 63 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager);
66 cc::SyntheticBeginFrameSource* begin_frame_source);
67 64
68 // Constructor used by the Vulkan implementation. 65 // Constructor used by the Vulkan implementation.
69 BrowserCompositorOutputSurface( 66 BrowserCompositorOutputSurface(
70 const scoped_refptr<cc::VulkanContextProvider>& vulkan_context_provider, 67 const scoped_refptr<cc::VulkanContextProvider>& vulkan_context_provider,
71 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager, 68 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager);
72 cc::SyntheticBeginFrameSource* begin_frame_source);
73 69
74 scoped_refptr<ui::CompositorVSyncManager> vsync_manager_; 70 scoped_refptr<ui::CompositorVSyncManager> vsync_manager_;
75 cc::SyntheticBeginFrameSource* synthetic_begin_frame_source_;
76 ReflectorImpl* reflector_; 71 ReflectorImpl* reflector_;
77 72
78 private: 73 private:
79 std::unique_ptr<display_compositor::CompositorOverlayCandidateValidator> 74 std::unique_ptr<display_compositor::CompositorOverlayCandidateValidator>
80 overlay_candidate_validator_; 75 overlay_candidate_validator_;
81 76
82 DISALLOW_COPY_AND_ASSIGN(BrowserCompositorOutputSurface); 77 DISALLOW_COPY_AND_ASSIGN(BrowserCompositorOutputSurface);
83 }; 78 };
84 79
85 } // namespace content 80 } // namespace content
86 81
87 #endif // CONTENT_BROWSER_COMPOSITOR_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ 82 #endif // CONTENT_BROWSER_COMPOSITOR_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698