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 "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
13 | 13 |
14 namespace cc { | 14 namespace cc { |
15 class SoftwareOutputDevice; | 15 class SoftwareOutputDevice; |
16 } | 16 } |
17 | 17 |
18 namespace display_compositor { | 18 namespace viz { |
19 class CompositorOverlayCandidateValidator; | 19 class CompositorOverlayCandidateValidator; |
20 } | 20 } |
21 | 21 |
22 namespace gfx { | 22 namespace gfx { |
23 enum class SwapResult; | 23 enum class SwapResult; |
24 } | 24 } |
25 | 25 |
26 namespace content { | 26 namespace content { |
27 class ReflectorImpl; | 27 class ReflectorImpl; |
28 | 28 |
(...skipping 17 matching lines...) Expand all Loading... |
46 | 46 |
47 #if defined(OS_MACOSX) | 47 #if defined(OS_MACOSX) |
48 virtual void SetSurfaceSuspendedForRecycle(bool suspended) = 0; | 48 virtual void SetSurfaceSuspendedForRecycle(bool suspended) = 0; |
49 #endif | 49 #endif |
50 | 50 |
51 protected: | 51 protected: |
52 // Constructor used by the accelerated implementation. | 52 // Constructor used by the accelerated implementation. |
53 BrowserCompositorOutputSurface( | 53 BrowserCompositorOutputSurface( |
54 scoped_refptr<cc::ContextProvider> context, | 54 scoped_refptr<cc::ContextProvider> context, |
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<viz::CompositorOverlayCandidateValidator> |
57 overlay_candidate_validator); | 57 overlay_candidate_validator); |
58 | 58 |
59 // Constructor used by the software implementation. | 59 // Constructor used by the software implementation. |
60 BrowserCompositorOutputSurface( | 60 BrowserCompositorOutputSurface( |
61 std::unique_ptr<cc::SoftwareOutputDevice> software_device, | 61 std::unique_ptr<cc::SoftwareOutputDevice> software_device, |
62 const UpdateVSyncParametersCallback& update_vsync_parameters_callback); | 62 const UpdateVSyncParametersCallback& update_vsync_parameters_callback); |
63 | 63 |
64 // Constructor used by the Vulkan implementation. | 64 // Constructor used by the Vulkan implementation. |
65 BrowserCompositorOutputSurface( | 65 BrowserCompositorOutputSurface( |
66 const scoped_refptr<cc::VulkanContextProvider>& vulkan_context_provider, | 66 const scoped_refptr<cc::VulkanContextProvider>& vulkan_context_provider, |
67 const UpdateVSyncParametersCallback& update_vsync_parameters_callback); | 67 const UpdateVSyncParametersCallback& update_vsync_parameters_callback); |
68 | 68 |
69 const UpdateVSyncParametersCallback update_vsync_parameters_callback_; | 69 const UpdateVSyncParametersCallback update_vsync_parameters_callback_; |
70 ReflectorImpl* reflector_; | 70 ReflectorImpl* reflector_; |
71 | 71 |
72 private: | 72 private: |
73 std::unique_ptr<display_compositor::CompositorOverlayCandidateValidator> | 73 std::unique_ptr<viz::CompositorOverlayCandidateValidator> |
74 overlay_candidate_validator_; | 74 overlay_candidate_validator_; |
75 | 75 |
76 DISALLOW_COPY_AND_ASSIGN(BrowserCompositorOutputSurface); | 76 DISALLOW_COPY_AND_ASSIGN(BrowserCompositorOutputSurface); |
77 }; | 77 }; |
78 | 78 |
79 } // namespace content | 79 } // namespace content |
80 | 80 |
81 #endif // CONTENT_BROWSER_COMPOSITOR_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ | 81 #endif // CONTENT_BROWSER_COMPOSITOR_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ |
OLD | NEW |