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

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

Issue 2018603002: Mac: Clean up ifdefs in output surface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ 5 #ifndef CONTENT_BROWSER_COMPOSITOR_GPU_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
6 #define CONTENT_BROWSER_COMPOSITOR_GPU_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ 6 #define CONTENT_BROWSER_COMPOSITOR_GPU_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/cancelable_callback.h" 10 #include "base/cancelable_callback.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 // BrowserCompositorOutputSurface: 47 // BrowserCompositorOutputSurface:
48 void OnReflectorChanged() override; 48 void OnReflectorChanged() override;
49 void OnGpuSwapBuffersCompleted( 49 void OnGpuSwapBuffersCompleted(
50 const std::vector<ui::LatencyInfo>& latency_info, 50 const std::vector<ui::LatencyInfo>& latency_info,
51 gfx::SwapResult result, 51 gfx::SwapResult result,
52 const gpu::GpuProcessHostedCALayerTreeParamsMac* params_mac) override; 52 const gpu::GpuProcessHostedCALayerTreeParamsMac* params_mac) override;
53 53
54 // cc::OutputSurface implementation. 54 // cc::OutputSurface implementation.
55 void SwapBuffers(cc::CompositorFrame* frame) override; 55 void SwapBuffers(cc::CompositorFrame* frame) override;
56 bool BindToClient(cc::OutputSurfaceClient* client) override; 56 bool BindToClient(cc::OutputSurfaceClient* client) override;
57 bool SurfaceIsSuspendForRecycle() const override;
58
59 #if defined(OS_MACOSX)
60 void SetSurfaceSuspendedForRecycle(bool suspended) override;
61 enum ShouldShowFramesState {
62 // Frames that come from the GPU process should appear on-screen.
63 SHOULD_SHOW_FRAMES,
64 // The compositor has been suspended. Any frames that come from the GPU
65 // process are for the pre-suspend content and should not be displayed.
66 SHOULD_NOT_SHOW_FRAMES_SUSPENDED,
67 // The compositor has been un-suspended, but has not yet issued a swap
68 // since being un-suspended, so any frames that come from the GPU process
69 // are for pre-suspend content and should not be displayed.
70 SHOULD_NOT_SHOW_FRAMES_NO_SWAP_AFTER_SUSPENDED,
71 };
72 ShouldShowFramesState should_show_frames_state_;
73 #endif
74
75 gpu::CommandBufferProxyImpl* GetCommandBufferProxy(); 57 gpu::CommandBufferProxyImpl* GetCommandBufferProxy();
76 58
77 base::CancelableCallback<void( 59 base::CancelableCallback<void(
78 const std::vector<ui::LatencyInfo>&, 60 const std::vector<ui::LatencyInfo>&,
79 gfx::SwapResult, 61 gfx::SwapResult,
80 const gpu::GpuProcessHostedCALayerTreeParamsMac* params_mac)> 62 const gpu::GpuProcessHostedCALayerTreeParamsMac* params_mac)>
81 swap_buffers_completion_callback_; 63 swap_buffers_completion_callback_;
82 base::CancelableCallback<void(base::TimeTicks timebase, 64 base::CancelableCallback<void(base::TimeTicks timebase,
83 base::TimeDelta interval)> 65 base::TimeDelta interval)>
84 update_vsync_parameters_callback_; 66 update_vsync_parameters_callback_;
85 67
86 std::unique_ptr<ReflectorTexture> reflector_texture_; 68 std::unique_ptr<ReflectorTexture> reflector_texture_;
87 69
88 DISALLOW_COPY_AND_ASSIGN(GpuBrowserCompositorOutputSurface); 70 DISALLOW_COPY_AND_ASSIGN(GpuBrowserCompositorOutputSurface);
89 }; 71 };
90 72
91 } // namespace content 73 } // namespace content
92 74
93 #endif // CONTENT_BROWSER_COMPOSITOR_GPU_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ 75 #endif // CONTENT_BROWSER_COMPOSITOR_GPU_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698