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 #include "content/browser/compositor/gpu_output_surface_mac.h" | 5 #include "content/browser/compositor/gpu_output_surface_mac.h" |
6 | 6 |
7 #include "cc/output/output_surface_client.h" | 7 #include "cc/output/output_surface_client.h" |
8 #include "cc/output/output_surface_frame.h" | 8 #include "cc/output/output_surface_frame.h" |
9 #include "components/display_compositor/compositor_overlay_candidate_validator.h
" | 9 #include "components/display_compositor/compositor_overlay_candidate_validator.h
" |
10 #include "content/common/gpu/client/context_provider_command_buffer.h" | 10 #include "content/common/gpu/client/context_provider_command_buffer.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 } | 45 } |
46 | 46 |
47 base::scoped_nsobject<CALayerHost> content_layer; | 47 base::scoped_nsobject<CALayerHost> content_layer; |
48 base::scoped_nsobject<CALayerHost> fullscreen_low_power_layer; | 48 base::scoped_nsobject<CALayerHost> fullscreen_low_power_layer; |
49 }; | 49 }; |
50 | 50 |
51 GpuOutputSurfaceMac::GpuOutputSurfaceMac( | 51 GpuOutputSurfaceMac::GpuOutputSurfaceMac( |
52 gfx::AcceleratedWidget widget, | 52 gfx::AcceleratedWidget widget, |
53 scoped_refptr<ContextProviderCommandBuffer> context, | 53 scoped_refptr<ContextProviderCommandBuffer> context, |
54 gpu::SurfaceHandle surface_handle, | 54 gpu::SurfaceHandle surface_handle, |
55 scoped_refptr<ui::CompositorVSyncManager> vsync_manager, | 55 const UpdateVSyncParametersCallback& update_vsync_parameters_callback, |
56 cc::SyntheticBeginFrameSource* begin_frame_source, | |
57 std::unique_ptr<display_compositor::CompositorOverlayCandidateValidator> | 56 std::unique_ptr<display_compositor::CompositorOverlayCandidateValidator> |
58 overlay_candidate_validator, | 57 overlay_candidate_validator, |
59 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager) | 58 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager) |
60 : GpuSurfacelessBrowserCompositorOutputSurface( | 59 : GpuSurfacelessBrowserCompositorOutputSurface( |
61 std::move(context), | 60 std::move(context), |
62 surface_handle, | 61 surface_handle, |
63 std::move(vsync_manager), | 62 update_vsync_parameters_callback, |
64 begin_frame_source, | |
65 std::move(overlay_candidate_validator), | 63 std::move(overlay_candidate_validator), |
66 GL_TEXTURE_RECTANGLE_ARB, | 64 GL_TEXTURE_RECTANGLE_ARB, |
67 GL_RGBA, | 65 GL_RGBA, |
68 gfx::BufferFormat::RGBA_8888, | 66 gfx::BufferFormat::RGBA_8888, |
69 gpu_memory_buffer_manager), | 67 gpu_memory_buffer_manager), |
70 widget_(widget), | 68 widget_(widget), |
71 remote_layers_(new RemoteLayers) {} | 69 remote_layers_(new RemoteLayers) {} |
72 | 70 |
73 GpuOutputSurfaceMac::~GpuOutputSurfaceMac() {} | 71 GpuOutputSurfaceMac::~GpuOutputSurfaceMac() {} |
74 | 72 |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 SHOULD_NOT_SHOW_FRAMES_NO_SWAP_AFTER_SUSPENDED; | 131 SHOULD_NOT_SHOW_FRAMES_NO_SWAP_AFTER_SUSPENDED; |
134 } | 132 } |
135 } | 133 } |
136 } | 134 } |
137 | 135 |
138 bool GpuOutputSurfaceMac::SurfaceIsSuspendForRecycle() const { | 136 bool GpuOutputSurfaceMac::SurfaceIsSuspendForRecycle() const { |
139 return should_show_frames_state_ == SHOULD_NOT_SHOW_FRAMES_SUSPENDED; | 137 return should_show_frames_state_ == SHOULD_NOT_SHOW_FRAMES_SUSPENDED; |
140 } | 138 } |
141 | 139 |
142 } // namespace content | 140 } // namespace content |
OLD | NEW |