| 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 "components/display_compositor/compositor_overlay_candidate_validator.h
" | 7 #include "components/display_compositor/compositor_overlay_candidate_validator.h
" |
| 8 #include "content/browser/gpu/gpu_surface_tracker.h" | 8 #include "content/browser/gpu/gpu_surface_tracker.h" |
| 9 #include "content/common/gpu/client/context_provider_command_buffer.h" | 9 #include "content/common/gpu/client/context_provider_command_buffer.h" |
| 10 #include "gpu/GLES2/gl2extchromium.h" | 10 #include "gpu/GLES2/gl2extchromium.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 } | 42 } |
| 43 | 43 |
| 44 base::scoped_nsobject<CALayerHost> content_layer; | 44 base::scoped_nsobject<CALayerHost> content_layer; |
| 45 base::scoped_nsobject<CALayerHost> fullscreen_low_power_layer; | 45 base::scoped_nsobject<CALayerHost> fullscreen_low_power_layer; |
| 46 }; | 46 }; |
| 47 | 47 |
| 48 GpuOutputSurfaceMac::GpuOutputSurfaceMac( | 48 GpuOutputSurfaceMac::GpuOutputSurfaceMac( |
| 49 scoped_refptr<ContextProviderCommandBuffer> context, | 49 scoped_refptr<ContextProviderCommandBuffer> context, |
| 50 gpu::SurfaceHandle surface_handle, | 50 gpu::SurfaceHandle surface_handle, |
| 51 scoped_refptr<ui::CompositorVSyncManager> vsync_manager, | 51 scoped_refptr<ui::CompositorVSyncManager> vsync_manager, |
| 52 base::SingleThreadTaskRunner* task_runner, | 52 cc::SyntheticBeginFrameSource* begin_frame_source, |
| 53 std::unique_ptr<display_compositor::CompositorOverlayCandidateValidator> | 53 std::unique_ptr<display_compositor::CompositorOverlayCandidateValidator> |
| 54 overlay_candidate_validator, | 54 overlay_candidate_validator, |
| 55 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager) | 55 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager) |
| 56 : GpuSurfacelessBrowserCompositorOutputSurface( | 56 : GpuSurfacelessBrowserCompositorOutputSurface( |
| 57 std::move(context), | 57 std::move(context), |
| 58 surface_handle, | 58 surface_handle, |
| 59 std::move(vsync_manager), | 59 std::move(vsync_manager), |
| 60 task_runner, | 60 begin_frame_source, |
| 61 std::move(overlay_candidate_validator), | 61 std::move(overlay_candidate_validator), |
| 62 GL_TEXTURE_RECTANGLE_ARB, | 62 GL_TEXTURE_RECTANGLE_ARB, |
| 63 GL_RGBA, | 63 GL_RGBA, |
| 64 gpu_memory_buffer_manager), | 64 gpu_memory_buffer_manager), |
| 65 remote_layers_(new RemoteLayers) {} | 65 remote_layers_(new RemoteLayers) {} |
| 66 | 66 |
| 67 GpuOutputSurfaceMac::~GpuOutputSurfaceMac() {} | 67 GpuOutputSurfaceMac::~GpuOutputSurfaceMac() {} |
| 68 | 68 |
| 69 void GpuOutputSurfaceMac::SwapBuffers(cc::CompositorFrame* frame) { | 69 void GpuOutputSurfaceMac::SwapBuffers(cc::CompositorFrame* frame) { |
| 70 GpuSurfacelessBrowserCompositorOutputSurface::SwapBuffers(frame); | 70 GpuSurfacelessBrowserCompositorOutputSurface::SwapBuffers(frame); |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 SHOULD_NOT_SHOW_FRAMES_NO_SWAP_AFTER_SUSPENDED; | 128 SHOULD_NOT_SHOW_FRAMES_NO_SWAP_AFTER_SUSPENDED; |
| 129 } | 129 } |
| 130 } | 130 } |
| 131 } | 131 } |
| 132 | 132 |
| 133 bool GpuOutputSurfaceMac::SurfaceIsSuspendForRecycle() const { | 133 bool GpuOutputSurfaceMac::SurfaceIsSuspendForRecycle() const { |
| 134 return should_show_frames_state_ == SHOULD_NOT_SHOW_FRAMES_SUSPENDED; | 134 return should_show_frames_state_ == SHOULD_NOT_SHOW_FRAMES_SUSPENDED; |
| 135 } | 135 } |
| 136 | 136 |
| 137 } // namespace content | 137 } // namespace content |
| OLD | NEW |