OLD | NEW |
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_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ | 5 #ifndef CONTENT_BROWSER_COMPOSITOR_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ |
6 #define CONTENT_BROWSER_COMPOSITOR_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ | 6 #define CONTENT_BROWSER_COMPOSITOR_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/threading/non_thread_safe.h" | 9 #include "base/threading/non_thread_safe.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 void ApplyExternalStencil() override; | 45 void ApplyExternalStencil() override; |
46 | 46 |
47 void OnUpdateVSyncParametersFromGpu(base::TimeTicks timebase, | 47 void OnUpdateVSyncParametersFromGpu(base::TimeTicks timebase, |
48 base::TimeDelta interval); | 48 base::TimeDelta interval); |
49 | 49 |
50 void SetReflector(ReflectorImpl* reflector); | 50 void SetReflector(ReflectorImpl* reflector); |
51 | 51 |
52 // Called when |reflector_| was updated. | 52 // Called when |reflector_| was updated. |
53 virtual void OnReflectorChanged(); | 53 virtual void OnReflectorChanged(); |
54 | 54 |
55 // Called when a swap completion is sent from the GPU process. | |
56 // The argument |params_mac| is used to communicate parameters needed on Mac | |
57 // to display the CALayer for the swap in the browser process. | |
58 // TODO(ccameron): Remove |params_mac| when the CALayer tree is hosted in the | |
59 // browser process. | |
60 virtual void OnGpuSwapBuffersCompleted( | |
61 const std::vector<ui::LatencyInfo>& latency_info, | |
62 gfx::SwapResult result, | |
63 const gpu::GpuProcessHostedCALayerTreeParamsMac* params_mac) = 0; | |
64 | |
65 #if defined(OS_MACOSX) | 55 #if defined(OS_MACOSX) |
66 virtual void SetSurfaceSuspendedForRecycle(bool suspended) = 0; | 56 virtual void SetSurfaceSuspendedForRecycle(bool suspended) = 0; |
67 #endif | 57 #endif |
68 | 58 |
69 protected: | 59 protected: |
70 // Constructor used by the accelerated implementation. | 60 // Constructor used by the accelerated implementation. |
71 BrowserCompositorOutputSurface( | 61 BrowserCompositorOutputSurface( |
72 scoped_refptr<cc::ContextProvider> context, | 62 scoped_refptr<cc::ContextProvider> context, |
73 scoped_refptr<ui::CompositorVSyncManager> vsync_manager, | 63 scoped_refptr<ui::CompositorVSyncManager> vsync_manager, |
74 cc::SyntheticBeginFrameSource* begin_frame_source, | 64 cc::SyntheticBeginFrameSource* begin_frame_source, |
(...skipping 19 matching lines...) Expand all Loading... |
94 private: | 84 private: |
95 std::unique_ptr<display_compositor::CompositorOverlayCandidateValidator> | 85 std::unique_ptr<display_compositor::CompositorOverlayCandidateValidator> |
96 overlay_candidate_validator_; | 86 overlay_candidate_validator_; |
97 | 87 |
98 DISALLOW_COPY_AND_ASSIGN(BrowserCompositorOutputSurface); | 88 DISALLOW_COPY_AND_ASSIGN(BrowserCompositorOutputSurface); |
99 }; | 89 }; |
100 | 90 |
101 } // namespace content | 91 } // namespace content |
102 | 92 |
103 #endif // CONTENT_BROWSER_COMPOSITOR_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ | 93 #endif // CONTENT_BROWSER_COMPOSITOR_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ |
OLD | NEW |