OLD | NEW |
---|---|
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 "cc/scheduler/begin_frame_source.h" | 12 #include "cc/scheduler/begin_frame_source.h" |
13 #include "content/common/content_export.h" | 13 #include "content/common/content_export.h" |
14 #include "ui/compositor/compositor_vsync_manager.h" | 14 #include "ui/compositor/compositor_vsync_manager.h" |
15 #include "ui/gfx/native_widget_types.h" | |
15 | 16 |
16 namespace cc { | 17 namespace cc { |
17 class SoftwareOutputDevice; | 18 class SoftwareOutputDevice; |
18 } | 19 } |
19 | 20 |
20 namespace gfx { | 21 namespace gfx { |
21 enum class SwapResult; | 22 enum class SwapResult; |
22 } | 23 } |
23 | 24 |
24 namespace content { | 25 namespace content { |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
72 base::SingleThreadTaskRunner* task_runner, | 73 base::SingleThreadTaskRunner* task_runner, |
73 std::unique_ptr<BrowserCompositorOverlayCandidateValidator> | 74 std::unique_ptr<BrowserCompositorOverlayCandidateValidator> |
74 overlay_candidate_validator); | 75 overlay_candidate_validator); |
75 | 76 |
76 // Constructor used by the software implementation. | 77 // Constructor used by the software implementation. |
77 BrowserCompositorOutputSurface( | 78 BrowserCompositorOutputSurface( |
78 std::unique_ptr<cc::SoftwareOutputDevice> software_device, | 79 std::unique_ptr<cc::SoftwareOutputDevice> software_device, |
79 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager, | 80 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager, |
80 base::SingleThreadTaskRunner* task_runner); | 81 base::SingleThreadTaskRunner* task_runner); |
81 | 82 |
83 #if defined(ENABLE_VULKAN) | |
piman
2016/04/19 23:42:02
ditto, works without ifdef?
| |
84 // Constructor used by the Vulkan implementation. | |
85 BrowserCompositorOutputSurface( | |
86 const scoped_refptr<cc::VulkanContextProvider>& vulkan_context_provider, | |
87 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager); | |
88 #endif | |
89 | |
82 scoped_refptr<ui::CompositorVSyncManager> vsync_manager_; | 90 scoped_refptr<ui::CompositorVSyncManager> vsync_manager_; |
83 std::unique_ptr<cc::SyntheticBeginFrameSource> synthetic_begin_frame_source_; | 91 std::unique_ptr<cc::SyntheticBeginFrameSource> synthetic_begin_frame_source_; |
84 ReflectorImpl* reflector_; | 92 ReflectorImpl* reflector_; |
85 | 93 |
86 // True when BeginFrame scheduling is enabled. | 94 // True when BeginFrame scheduling is enabled. |
87 bool use_begin_frame_scheduling_; | 95 bool use_begin_frame_scheduling_; |
88 | 96 |
89 private: | 97 private: |
90 void Initialize(); | 98 void Initialize(); |
91 | 99 |
92 void UpdateVSyncParametersInternal(base::TimeTicks timebase, | 100 void UpdateVSyncParametersInternal(base::TimeTicks timebase, |
93 base::TimeDelta interval); | 101 base::TimeDelta interval); |
94 | 102 |
95 std::unique_ptr<BrowserCompositorOverlayCandidateValidator> | 103 std::unique_ptr<BrowserCompositorOverlayCandidateValidator> |
96 overlay_candidate_validator_; | 104 overlay_candidate_validator_; |
97 | 105 |
98 DISALLOW_COPY_AND_ASSIGN(BrowserCompositorOutputSurface); | 106 DISALLOW_COPY_AND_ASSIGN(BrowserCompositorOutputSurface); |
99 }; | 107 }; |
100 | 108 |
101 } // namespace content | 109 } // namespace content |
102 | 110 |
103 #endif // CONTENT_BROWSER_COMPOSITOR_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ | 111 #endif // CONTENT_BROWSER_COMPOSITOR_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ |
OLD | NEW |