OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 SERVICES_UI_SURFACES_DIRECT_OUTPUT_SURFACE_OZONE_H_ | 5 #ifndef SERVICES_UI_SURFACES_DIRECT_OUTPUT_SURFACE_OZONE_H_ |
6 #define SERVICES_UI_SURFACES_DIRECT_OUTPUT_SURFACE_OZONE_H_ | 6 #define SERVICES_UI_SURFACES_DIRECT_OUTPUT_SURFACE_OZONE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
11 #include "cc/output/context_provider.h" | 11 #include "cc/output/context_provider.h" |
12 #include "cc/output/output_surface.h" | 12 #include "cc/output/output_surface.h" |
13 #include "components/display_compositor/gl_helper.h" | 13 #include "components/display_compositor/gl_helper.h" |
14 #include "services/ui/surfaces/ozone_gpu_memory_buffer_manager.h" | |
15 #include "ui/gfx/geometry/size.h" | 14 #include "ui/gfx/geometry/size.h" |
16 #include "ui/gfx/native_widget_types.h" | 15 #include "ui/gfx/native_widget_types.h" |
17 #include "ui/gfx/swap_result.h" | 16 #include "ui/gfx/swap_result.h" |
18 #include "ui/gl/gl_surface.h" | 17 #include "ui/gl/gl_surface.h" |
19 | 18 |
20 namespace display_compositor { | 19 namespace display_compositor { |
21 class BufferQueue; | 20 class BufferQueue; |
22 } | 21 } |
23 | 22 |
24 namespace ui { | 23 namespace ui { |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 bool BindToClient(cc::OutputSurfaceClient* client) override; | 64 bool BindToClient(cc::OutputSurfaceClient* client) override; |
66 | 65 |
67 // Taken from BrowserCompositor specific API. | 66 // Taken from BrowserCompositor specific API. |
68 void OnUpdateVSyncParametersFromGpu(base::TimeTicks timebase, | 67 void OnUpdateVSyncParametersFromGpu(base::TimeTicks timebase, |
69 base::TimeDelta interval); | 68 base::TimeDelta interval); |
70 | 69 |
71 // Called when a swap completion is sent from the GPU process. | 70 // Called when a swap completion is sent from the GPU process. |
72 void OnGpuSwapBuffersCompleted(gfx::SwapResult result); | 71 void OnGpuSwapBuffersCompleted(gfx::SwapResult result); |
73 | 72 |
74 display_compositor::GLHelper gl_helper_; | 73 display_compositor::GLHelper gl_helper_; |
75 std::unique_ptr<OzoneGpuMemoryBufferManager> ozone_gpu_memory_buffer_manager_; | |
76 std::unique_ptr<display_compositor::BufferQueue> buffer_queue_; | 74 std::unique_ptr<display_compositor::BufferQueue> buffer_queue_; |
77 cc::SyntheticBeginFrameSource* const synthetic_begin_frame_source_; | 75 cc::SyntheticBeginFrameSource* const synthetic_begin_frame_source_; |
78 | 76 |
79 base::WeakPtrFactory<DirectOutputSurfaceOzone> weak_ptr_factory_; | 77 base::WeakPtrFactory<DirectOutputSurfaceOzone> weak_ptr_factory_; |
80 }; | 78 }; |
81 | 79 |
82 } // namespace ui | 80 } // namespace ui |
83 | 81 |
84 #endif // SERVICES_UI_SURFACES_DIRECT_OUTPUT_SURFACE_OZONE_H_ | 82 #endif // SERVICES_UI_SURFACES_DIRECT_OUTPUT_SURFACE_OZONE_H_ |
OLD | NEW |