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

Side by Side Diff: gpu/ipc/service/image_transport_surface_overlay_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 | « gpu/ipc/common/gpu_messages.h ('k') | ui/compositor/compositor.cc » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "gpu/ipc/service/image_transport_surface_overlay_mac.h" 5 #include "gpu/ipc/service/image_transport_surface_overlay_mac.h"
6 6
7 #include <CoreGraphics/CoreGraphics.h> 7 #include <CoreGraphics/CoreGraphics.h>
8 #include <IOSurface/IOSurface.h> 8 #include <IOSurface/IOSurface.h>
9 #include <OpenGL/CGLRenderers.h> 9 #include <OpenGL/CGLRenderers.h>
10 #include <OpenGL/CGLTypes.h> 10 #include <OpenGL/CGLTypes.h>
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 params.fullscreen_low_power_ca_context_valid = 152 params.fullscreen_low_power_ca_context_valid =
153 fullscreen_low_power_ca_context_valid; 153 fullscreen_low_power_ca_context_valid;
154 params.fullscreen_low_power_ca_context_id = 154 params.fullscreen_low_power_ca_context_id =
155 fullscreen_low_power_ca_context_id; 155 fullscreen_low_power_ca_context_id;
156 params.io_surface = io_surface; 156 params.io_surface = io_surface;
157 params.pixel_size = size; 157 params.pixel_size = size;
158 params.scale_factor = scale_factor; 158 params.scale_factor = scale_factor;
159 params.latency_info = std::move(latency_info); 159 params.latency_info = std::move(latency_info);
160 params.result = gfx::SwapResult::SWAP_ACK; 160 params.result = gfx::SwapResult::SWAP_ACK;
161 161
162 // TODO(erikchen): Re-enable this logic alongside the client code that 162 for (auto& query : io_surface_in_use_queries_) {
163 // consumes this response. https://crbug.com/608026. 163 gpu::TextureInUseResponse response;
164 // for (auto& query : io_surface_in_use_queries_) { 164 response.texture = query.texture;
165 // SwapBuffersCompletedIOSurfaceInUseQuery response; 165 response.in_use =
166 // response.texture = query.texture; 166 query.io_surface.get() && IOSurfaceIsInUse(query.io_surface.get());
167 // response.in_use = 167 params.in_use_responses.push_back(std::move(response));
168 // query.io_surface.get() && IOSurfaceIsInUse(query.io_surface.get()); 168 }
169 // params.in_use_queries.push_back(std::move(response));
170 // }
171 io_surface_in_use_queries_.clear(); 169 io_surface_in_use_queries_.clear();
172 170
173 stub_->SendSwapBuffersCompleted(params); 171 stub_->SendSwapBuffersCompleted(params);
174 } 172 }
175 173
176 gfx::SwapResult ImageTransportSurfaceOverlayMac::SwapBuffersInternal( 174 gfx::SwapResult ImageTransportSurfaceOverlayMac::SwapBuffersInternal(
177 const gfx::Rect& pixel_damage_rect) { 175 const gfx::Rect& pixel_damage_rect) {
178 TRACE_EVENT0("gpu", "ImageTransportSurfaceOverlayMac::SwapBuffersInternal"); 176 TRACE_EVENT0("gpu", "ImageTransportSurfaceOverlayMac::SwapBuffersInternal");
179 177
180 // If supported, use GLFence to ensure that we haven't gotten more than one 178 // If supported, use GLFence to ensure that we haven't gotten more than one
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 ImageTransportSurfaceOverlayMac::IOSurfaceInUseQuery::IOSurfaceInUseQuery() = 398 ImageTransportSurfaceOverlayMac::IOSurfaceInUseQuery::IOSurfaceInUseQuery() =
401 default; 399 default;
402 ImageTransportSurfaceOverlayMac::IOSurfaceInUseQuery::IOSurfaceInUseQuery( 400 ImageTransportSurfaceOverlayMac::IOSurfaceInUseQuery::IOSurfaceInUseQuery(
403 const IOSurfaceInUseQuery&) = default; 401 const IOSurfaceInUseQuery&) = default;
404 ImageTransportSurfaceOverlayMac::IOSurfaceInUseQuery::IOSurfaceInUseQuery( 402 ImageTransportSurfaceOverlayMac::IOSurfaceInUseQuery::IOSurfaceInUseQuery(
405 IOSurfaceInUseQuery&&) = default; 403 IOSurfaceInUseQuery&&) = default;
406 ImageTransportSurfaceOverlayMac::IOSurfaceInUseQuery::~IOSurfaceInUseQuery() = 404 ImageTransportSurfaceOverlayMac::IOSurfaceInUseQuery::~IOSurfaceInUseQuery() =
407 default; 405 default;
408 406
409 } // namespace gpu 407 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/ipc/common/gpu_messages.h ('k') | ui/compositor/compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698