| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 // static | 70 // static |
| 71 std::unique_ptr<CommandBufferProxyImpl> CommandBufferProxyImpl::Create( | 71 std::unique_ptr<CommandBufferProxyImpl> CommandBufferProxyImpl::Create( |
| 72 scoped_refptr<GpuChannelHost> host, | 72 scoped_refptr<GpuChannelHost> host, |
| 73 gpu::SurfaceHandle surface_handle, | 73 gpu::SurfaceHandle surface_handle, |
| 74 const gfx::Size& size, | 74 const gfx::Size& size, |
| 75 CommandBufferProxyImpl* share_group, | 75 CommandBufferProxyImpl* share_group, |
| 76 int32_t stream_id, | 76 int32_t stream_id, |
| 77 gpu::GpuStreamPriority stream_priority, | 77 gpu::GpuStreamPriority stream_priority, |
| 78 const gpu::gles2::ContextCreationAttribHelper& attribs, | 78 const gpu::gles2::ContextCreationAttribHelper& attribs, |
| 79 const GURL& active_url, | 79 const GURL& active_url, |
| 80 gfx::GpuPreference gpu_preference, | 80 gl::GpuPreference gpu_preference, |
| 81 scoped_refptr<base::SingleThreadTaskRunner> task_runner) { | 81 scoped_refptr<base::SingleThreadTaskRunner> task_runner) { |
| 82 DCHECK(!share_group || (stream_id == share_group->stream_id_)); | 82 DCHECK(!share_group || (stream_id == share_group->stream_id_)); |
| 83 TRACE_EVENT1("gpu", "GpuChannelHost::CreateViewCommandBuffer", | 83 TRACE_EVENT1("gpu", "GpuChannelHost::CreateViewCommandBuffer", |
| 84 "surface_handle", surface_handle); | 84 "surface_handle", surface_handle); |
| 85 | 85 |
| 86 GPUCreateCommandBufferConfig init_params; | 86 GPUCreateCommandBufferConfig init_params; |
| 87 init_params.surface_handle = surface_handle; | 87 init_params.surface_handle = surface_handle; |
| 88 init_params.size = size; | 88 init_params.size = size; |
| 89 init_params.share_group_id = | 89 init_params.share_group_id = |
| 90 share_group ? share_group->route_id_ : MSG_ROUTING_NONE; | 90 share_group ? share_group->route_id_ : MSG_ROUTING_NONE; |
| (...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 852 return; | 852 return; |
| 853 channel_->FlushPendingStream(stream_id_); | 853 channel_->FlushPendingStream(stream_id_); |
| 854 channel_->Send(new GpuChannelMsg_DestroyCommandBuffer(route_id_)); | 854 channel_->Send(new GpuChannelMsg_DestroyCommandBuffer(route_id_)); |
| 855 channel_->RemoveRoute(route_id_); | 855 channel_->RemoveRoute(route_id_); |
| 856 channel_ = nullptr; | 856 channel_ = nullptr; |
| 857 if (gpu_control_client_) | 857 if (gpu_control_client_) |
| 858 gpu_control_client_->OnGpuControlLostContext(); | 858 gpu_control_client_->OnGpuControlLostContext(); |
| 859 } | 859 } |
| 860 | 860 |
| 861 } // namespace gpu | 861 } // namespace gpu |
| OLD | NEW |