| 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/compositor_frame.h" | 7 #include "cc/output/compositor_frame.h" |
| 8 #include "components/display_compositor/compositor_overlay_candidate_validator.h
" | 8 #include "components/display_compositor/compositor_overlay_candidate_validator.h
" |
| 9 #include "content/browser/gpu/gpu_surface_tracker.h" | 9 #include "content/browser/gpu/gpu_surface_tracker.h" |
| 10 #include "content/common/gpu/client/context_provider_command_buffer.h" | 10 #include "content/common/gpu/client/context_provider_command_buffer.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 std::unique_ptr<display_compositor::CompositorOverlayCandidateValidator> | 54 std::unique_ptr<display_compositor::CompositorOverlayCandidateValidator> |
| 55 overlay_candidate_validator, | 55 overlay_candidate_validator, |
| 56 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager) | 56 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager) |
| 57 : GpuSurfacelessBrowserCompositorOutputSurface( | 57 : GpuSurfacelessBrowserCompositorOutputSurface( |
| 58 std::move(context), | 58 std::move(context), |
| 59 surface_handle, | 59 surface_handle, |
| 60 std::move(vsync_manager), | 60 std::move(vsync_manager), |
| 61 begin_frame_source, | 61 begin_frame_source, |
| 62 std::move(overlay_candidate_validator), | 62 std::move(overlay_candidate_validator), |
| 63 GL_TEXTURE_RECTANGLE_ARB, | 63 GL_TEXTURE_RECTANGLE_ARB, |
| 64 GL_RGBA, | 64 GL_RGB, |
| 65 gpu_memory_buffer_manager), | 65 gpu_memory_buffer_manager), |
| 66 remote_layers_(new RemoteLayers) {} | 66 remote_layers_(new RemoteLayers) {} |
| 67 | 67 |
| 68 GpuOutputSurfaceMac::~GpuOutputSurfaceMac() {} | 68 GpuOutputSurfaceMac::~GpuOutputSurfaceMac() {} |
| 69 | 69 |
| 70 void GpuOutputSurfaceMac::SwapBuffers(cc::CompositorFrame frame) { | 70 void GpuOutputSurfaceMac::SwapBuffers(cc::CompositorFrame frame) { |
| 71 GpuSurfacelessBrowserCompositorOutputSurface::SwapBuffers(std::move(frame)); | 71 GpuSurfacelessBrowserCompositorOutputSurface::SwapBuffers(std::move(frame)); |
| 72 | 72 |
| 73 if (should_show_frames_state_ == | 73 if (should_show_frames_state_ == |
| 74 SHOULD_NOT_SHOW_FRAMES_NO_SWAP_AFTER_SUSPENDED) { | 74 SHOULD_NOT_SHOW_FRAMES_NO_SWAP_AFTER_SUSPENDED) { |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 SHOULD_NOT_SHOW_FRAMES_NO_SWAP_AFTER_SUSPENDED; | 130 SHOULD_NOT_SHOW_FRAMES_NO_SWAP_AFTER_SUSPENDED; |
| 131 } | 131 } |
| 132 } | 132 } |
| 133 } | 133 } |
| 134 | 134 |
| 135 bool GpuOutputSurfaceMac::SurfaceIsSuspendForRecycle() const { | 135 bool GpuOutputSurfaceMac::SurfaceIsSuspendForRecycle() const { |
| 136 return should_show_frames_state_ == SHOULD_NOT_SHOW_FRAMES_SUSPENDED; | 136 return should_show_frames_state_ == SHOULD_NOT_SHOW_FRAMES_SUSPENDED; |
| 137 } | 137 } |
| 138 | 138 |
| 139 } // namespace content | 139 } // namespace content |
| OLD | NEW |