Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(250)

Side by Side Diff: content/browser/compositor/gpu_output_surface_mac.mm

Issue 2029323004: Get rid of virtual Display::CreateScheduler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@onscreendisplayclient
Patch Set: displaytest: ownership-all-the-things Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
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 "ui/accelerated_widget_mac/accelerated_widget_mac.h" 12 #include "ui/accelerated_widget_mac/accelerated_widget_mac.h"
13 #include "ui/base/cocoa/remote_layer_api.h" 13 #include "ui/base/cocoa/remote_layer_api.h"
14 #include "ui/gfx/mac/io_surface.h" 14 #include "ui/gfx/mac/io_surface.h"
15 15
16 namespace content { 16 namespace content {
17 17
18 GpuOutputSurfaceMac::GpuOutputSurfaceMac( 18 GpuOutputSurfaceMac::GpuOutputSurfaceMac(
19 scoped_refptr<ContextProviderCommandBuffer> context, 19 scoped_refptr<ContextProviderCommandBuffer> context,
20 gpu::SurfaceHandle surface_handle, 20 gpu::SurfaceHandle surface_handle,
21 scoped_refptr<ui::CompositorVSyncManager> vsync_manager, 21 scoped_refptr<ui::CompositorVSyncManager> vsync_manager,
22 base::SingleThreadTaskRunner* task_runner, 22 cc::SyntheticBeginFrameSource* begin_frame_source,
23 std::unique_ptr<display_compositor::CompositorOverlayCandidateValidator> 23 std::unique_ptr<display_compositor::CompositorOverlayCandidateValidator>
24 overlay_candidate_validator, 24 overlay_candidate_validator,
25 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager) 25 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager)
26 : GpuSurfacelessBrowserCompositorOutputSurface( 26 : GpuSurfacelessBrowserCompositorOutputSurface(
27 std::move(context), 27 std::move(context),
28 surface_handle, 28 surface_handle,
29 std::move(vsync_manager), 29 std::move(vsync_manager),
30 task_runner, 30 begin_frame_source,
31 std::move(overlay_candidate_validator), 31 std::move(overlay_candidate_validator),
32 GL_TEXTURE_RECTANGLE_ARB, 32 GL_TEXTURE_RECTANGLE_ARB,
33 GL_RGBA, 33 GL_RGBA,
34 gpu_memory_buffer_manager) {} 34 gpu_memory_buffer_manager) {}
35 35
36 GpuOutputSurfaceMac::~GpuOutputSurfaceMac() {} 36 GpuOutputSurfaceMac::~GpuOutputSurfaceMac() {}
37 37
38 void GpuOutputSurfaceMac::SwapBuffers(cc::CompositorFrame* frame) { 38 void GpuOutputSurfaceMac::SwapBuffers(cc::CompositorFrame* frame) {
39 GpuSurfacelessBrowserCompositorOutputSurface::SwapBuffers(frame); 39 GpuSurfacelessBrowserCompositorOutputSurface::SwapBuffers(frame);
40 40
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 SHOULD_NOT_SHOW_FRAMES_NO_SWAP_AFTER_SUSPENDED; 84 SHOULD_NOT_SHOW_FRAMES_NO_SWAP_AFTER_SUSPENDED;
85 } 85 }
86 } 86 }
87 } 87 }
88 88
89 bool GpuOutputSurfaceMac::SurfaceIsSuspendForRecycle() const { 89 bool GpuOutputSurfaceMac::SurfaceIsSuspendForRecycle() const {
90 return should_show_frames_state_ == SHOULD_NOT_SHOW_FRAMES_SUSPENDED; 90 return should_show_frames_state_ == SHOULD_NOT_SHOW_FRAMES_SUSPENDED;
91 } 91 }
92 92
93 } // namespace content 93 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698