OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |