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/viz/display_compositor/compositor_overlay_candidate_validat
or.h" |
10 #include "gpu/GLES2/gl2extchromium.h" | 10 #include "gpu/GLES2/gl2extchromium.h" |
11 #include "gpu/ipc/client/gpu_process_hosted_ca_layer_tree_params.h" | 11 #include "gpu/ipc/client/gpu_process_hosted_ca_layer_tree_params.h" |
12 #include "services/ui/public/cpp/gpu/context_provider_command_buffer.h" | 12 #include "services/ui/public/cpp/gpu/context_provider_command_buffer.h" |
13 #include "ui/accelerated_widget_mac/accelerated_widget_mac.h" | 13 #include "ui/accelerated_widget_mac/accelerated_widget_mac.h" |
14 #include "ui/base/cocoa/remote_layer_api.h" | 14 #include "ui/base/cocoa/remote_layer_api.h" |
15 #include "ui/compositor/compositor.h" | 15 #include "ui/compositor/compositor.h" |
16 #include "ui/display/types/display_snapshot.h" | 16 #include "ui/display/types/display_snapshot.h" |
17 #include "ui/gfx/mac/io_surface.h" | 17 #include "ui/gfx/mac/io_surface.h" |
18 | 18 |
19 namespace content { | 19 namespace content { |
(...skipping 26 matching lines...) Expand all Loading... |
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<ui::ContextProviderCommandBuffer> context, | 53 scoped_refptr<ui::ContextProviderCommandBuffer> context, |
54 gpu::SurfaceHandle surface_handle, | 54 gpu::SurfaceHandle surface_handle, |
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 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager) | 58 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager) |
59 : GpuSurfacelessBrowserCompositorOutputSurface( | 59 : GpuSurfacelessBrowserCompositorOutputSurface( |
60 std::move(context), | 60 std::move(context), |
61 surface_handle, | 61 surface_handle, |
62 update_vsync_parameters_callback, | 62 update_vsync_parameters_callback, |
63 std::move(overlay_candidate_validator), | 63 std::move(overlay_candidate_validator), |
64 GL_TEXTURE_RECTANGLE_ARB, | 64 GL_TEXTURE_RECTANGLE_ARB, |
65 GL_RGBA, | 65 GL_RGBA, |
66 gfx::BufferFormat::RGBA_8888, | 66 gfx::BufferFormat::RGBA_8888, |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 SHOULD_NOT_SHOW_FRAMES_NO_SWAP_AFTER_SUSPENDED; | 131 SHOULD_NOT_SHOW_FRAMES_NO_SWAP_AFTER_SUSPENDED; |
132 } | 132 } |
133 } | 133 } |
134 } | 134 } |
135 | 135 |
136 bool GpuOutputSurfaceMac::SurfaceIsSuspendForRecycle() const { | 136 bool GpuOutputSurfaceMac::SurfaceIsSuspendForRecycle() const { |
137 return should_show_frames_state_ == SHOULD_NOT_SHOW_FRAMES_SUSPENDED; | 137 return should_show_frames_state_ == SHOULD_NOT_SHOW_FRAMES_SUSPENDED; |
138 } | 138 } |
139 | 139 |
140 } // namespace content | 140 } // namespace content |
OLD | NEW |