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

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

Issue 2511273002: Decouple BrowserCompositorOutputSurface from BeginFrameSource. (Closed)
Patch Set: Bring back GpuBrowserCompositorOutputSurface destructor Created 4 years 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 #ifndef CONTENT_BROWSER_COMPOSITOR_GPU_OUTPUT_SURFACE_MAC_H_ 5 #ifndef CONTENT_BROWSER_COMPOSITOR_GPU_OUTPUT_SURFACE_MAC_H_
6 #define CONTENT_BROWSER_COMPOSITOR_GPU_OUTPUT_SURFACE_MAC_H_ 6 #define CONTENT_BROWSER_COMPOSITOR_GPU_OUTPUT_SURFACE_MAC_H_
7 7
8 #include "content/browser/compositor/gpu_surfaceless_browser_compositor_output_s urface.h" 8 #include "content/browser/compositor/gpu_surfaceless_browser_compositor_output_s urface.h"
9 9
10 #include "ui/gfx/native_widget_types.h" 10 #include "ui/gfx/native_widget_types.h"
11 11
12 namespace content { 12 namespace content {
13 13
14 class GpuOutputSurfaceMac 14 class GpuOutputSurfaceMac
15 : public GpuSurfacelessBrowserCompositorOutputSurface { 15 : public GpuSurfacelessBrowserCompositorOutputSurface {
16 public: 16 public:
17 GpuOutputSurfaceMac( 17 GpuOutputSurfaceMac(
18 gfx::AcceleratedWidget widget, 18 gfx::AcceleratedWidget widget,
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 const UpdateVSyncParametersCallback& update_vsync_parameters_callback,
22 cc::SyntheticBeginFrameSource* begin_frame_source,
23 std::unique_ptr<display_compositor::CompositorOverlayCandidateValidator> 22 std::unique_ptr<display_compositor::CompositorOverlayCandidateValidator>
24 overlay_candidate_validator, 23 overlay_candidate_validator,
25 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager); 24 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager);
26 ~GpuOutputSurfaceMac() override; 25 ~GpuOutputSurfaceMac() override;
27 26
28 // cc::OutputSurface implementation. 27 // cc::OutputSurface implementation.
29 void SwapBuffers(cc::OutputSurfaceFrame frame) override; 28 void SwapBuffers(cc::OutputSurfaceFrame frame) override;
30 bool SurfaceIsSuspendForRecycle() const override; 29 bool SurfaceIsSuspendForRecycle() const override;
31 30
32 // BrowserCompositorOutputSurface implementation. 31 // BrowserCompositorOutputSurface implementation.
(...skipping 23 matching lines...) Expand all
56 SHOULD_NOT_SHOW_FRAMES_NO_SWAP_AFTER_SUSPENDED, 55 SHOULD_NOT_SHOW_FRAMES_NO_SWAP_AFTER_SUSPENDED,
57 }; 56 };
58 ShouldShowFramesState should_show_frames_state_ = SHOULD_SHOW_FRAMES; 57 ShouldShowFramesState should_show_frames_state_ = SHOULD_SHOW_FRAMES;
59 58
60 DISALLOW_COPY_AND_ASSIGN(GpuOutputSurfaceMac); 59 DISALLOW_COPY_AND_ASSIGN(GpuOutputSurfaceMac);
61 }; 60 };
62 61
63 } // namespace content 62 } // namespace content
64 63
65 #endif // CONTENT_BROWSER_COMPOSITOR_GPU_OUTPUT_SURFACE_MAC_H_ 64 #endif // CONTENT_BROWSER_COMPOSITOR_GPU_OUTPUT_SURFACE_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698