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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 remote_layers_->fullscreen_low_power_layer.get(), | 95 remote_layers_->fullscreen_low_power_layer.get(), |
96 base::scoped_policy::RETAIN), | 96 base::scoped_policy::RETAIN), |
97 params_mac->pixel_size, params_mac->scale_factor); | 97 params_mac->pixel_size, params_mac->scale_factor); |
98 } else { | 98 } else { |
99 widget->GotIOSurfaceFrame(params_mac->io_surface, | 99 widget->GotIOSurfaceFrame(params_mac->io_surface, |
100 params_mac->pixel_size, | 100 params_mac->pixel_size, |
101 params_mac->scale_factor); | 101 params_mac->scale_factor); |
102 } | 102 } |
103 } | 103 } |
104 } | 104 } |
| 105 DidReceiveTextureInUseResponses(params_mac->responses); |
105 GpuSurfacelessBrowserCompositorOutputSurface::OnGpuSwapBuffersCompleted( | 106 GpuSurfacelessBrowserCompositorOutputSurface::OnGpuSwapBuffersCompleted( |
106 latency_info, result, params_mac); | 107 latency_info, result, params_mac); |
107 } | 108 } |
108 | 109 |
109 void GpuOutputSurfaceMac::SetSurfaceSuspendedForRecycle(bool suspended) { | 110 void GpuOutputSurfaceMac::SetSurfaceSuspendedForRecycle(bool suspended) { |
110 if (suspended) { | 111 if (suspended) { |
111 // It may be that there are frames in-flight from the GPU process back to | 112 // It may be that there are frames in-flight from the GPU process back to |
112 // the browser. Make sure that these frames are not displayed by ignoring | 113 // the browser. Make sure that these frames are not displayed by ignoring |
113 // them in GpuProcessHostUIShim, until the browser issues a SwapBuffers for | 114 // them in GpuProcessHostUIShim, until the browser issues a SwapBuffers for |
114 // the new content. | 115 // the new content. |
(...skipping 13 matching lines...) Expand all Loading... |
128 SHOULD_NOT_SHOW_FRAMES_NO_SWAP_AFTER_SUSPENDED; | 129 SHOULD_NOT_SHOW_FRAMES_NO_SWAP_AFTER_SUSPENDED; |
129 } | 130 } |
130 } | 131 } |
131 } | 132 } |
132 | 133 |
133 bool GpuOutputSurfaceMac::SurfaceIsSuspendForRecycle() const { | 134 bool GpuOutputSurfaceMac::SurfaceIsSuspendForRecycle() const { |
134 return should_show_frames_state_ == SHOULD_NOT_SHOW_FRAMES_SUSPENDED; | 135 return should_show_frames_state_ == SHOULD_NOT_SHOW_FRAMES_SUSPENDED; |
135 } | 136 } |
136 | 137 |
137 } // namespace content | 138 } // namespace content |
OLD | NEW |