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

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

Issue 2061993003: Pass responsibility for IOSurface-texture reuse to the gpu process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@temp85_query_in_use
Patch Set: Rebase. 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
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | gpu/command_buffer/common/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | gpu/command_buffer/common/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698