OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/client/command_buffer_proxy_impl.h" | 5 #include "gpu/ipc/client/command_buffer_proxy_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
759 | 759 |
760 gpu::CommandBufferSharedState* CommandBufferProxyImpl::shared_state() const { | 760 gpu::CommandBufferSharedState* CommandBufferProxyImpl::shared_state() const { |
761 return reinterpret_cast<gpu::CommandBufferSharedState*>( | 761 return reinterpret_cast<gpu::CommandBufferSharedState*>( |
762 shared_state_shm_->memory()); | 762 shared_state_shm_->memory()); |
763 } | 763 } |
764 | 764 |
765 void CommandBufferProxyImpl::OnSwapBuffersCompleted( | 765 void CommandBufferProxyImpl::OnSwapBuffersCompleted( |
766 const GpuCommandBufferMsg_SwapBuffersCompleted_Params& params) { | 766 const GpuCommandBufferMsg_SwapBuffersCompleted_Params& params) { |
767 #if defined(OS_MACOSX) | 767 #if defined(OS_MACOSX) |
768 gpu::GpuProcessHostedCALayerTreeParamsMac params_mac; | 768 gpu::GpuProcessHostedCALayerTreeParamsMac params_mac; |
769 params_mac.surface_handle = params.surface_handle; | |
770 params_mac.ca_context_id = params.ca_context_id; | 769 params_mac.ca_context_id = params.ca_context_id; |
771 params_mac.fullscreen_low_power_ca_context_valid = | 770 params_mac.fullscreen_low_power_ca_context_valid = |
772 params.fullscreen_low_power_ca_context_valid; | 771 params.fullscreen_low_power_ca_context_valid; |
773 params_mac.fullscreen_low_power_ca_context_id = | 772 params_mac.fullscreen_low_power_ca_context_id = |
774 params.fullscreen_low_power_ca_context_id; | 773 params.fullscreen_low_power_ca_context_id; |
775 params_mac.io_surface.reset(IOSurfaceLookupFromMachPort(params.io_surface)); | 774 params_mac.io_surface.reset(IOSurfaceLookupFromMachPort(params.io_surface)); |
776 params_mac.pixel_size = params.pixel_size; | 775 params_mac.pixel_size = params.pixel_size; |
777 params_mac.scale_factor = params.scale_factor; | 776 params_mac.scale_factor = params.scale_factor; |
778 params_mac.responses = std::move(params.in_use_responses); | 777 params_mac.responses = std::move(params.in_use_responses); |
779 gpu::GpuProcessHostedCALayerTreeParamsMac* mac_frame_ptr = ¶ms_mac; | 778 gpu::GpuProcessHostedCALayerTreeParamsMac* mac_frame_ptr = ¶ms_mac; |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
867 return; | 866 return; |
868 channel_->FlushPendingStream(stream_id_); | 867 channel_->FlushPendingStream(stream_id_); |
869 channel_->Send(new GpuChannelMsg_DestroyCommandBuffer(route_id_)); | 868 channel_->Send(new GpuChannelMsg_DestroyCommandBuffer(route_id_)); |
870 channel_->RemoveRoute(route_id_); | 869 channel_->RemoveRoute(route_id_); |
871 channel_ = nullptr; | 870 channel_ = nullptr; |
872 if (gpu_control_client_) | 871 if (gpu_control_client_) |
873 gpu_control_client_->OnGpuControlLostContext(); | 872 gpu_control_client_->OnGpuControlLostContext(); |
874 } | 873 } |
875 | 874 |
876 } // namespace gpu | 875 } // namespace gpu |
OLD | NEW |