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

Side by Side Diff: gpu/ipc/client/gpu_channel_host.cc

Issue 1963263002: Fix Mac resize, delete more Mac code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 7 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
OLDNEW
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/gpu_channel_host.h" 5 #include "gpu/ipc/client/gpu_channel_host.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/atomic_sequence_num.h" 10 #include "base/atomic_sequence_num.h"
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 } 190 }
191 191
192 std::unique_ptr<CommandBufferProxyImpl> GpuChannelHost::CreateCommandBuffer( 192 std::unique_ptr<CommandBufferProxyImpl> GpuChannelHost::CreateCommandBuffer(
193 gpu::SurfaceHandle surface_handle, 193 gpu::SurfaceHandle surface_handle,
194 const gfx::Size& size, 194 const gfx::Size& size,
195 CommandBufferProxyImpl* share_group, 195 CommandBufferProxyImpl* share_group,
196 int32_t stream_id, 196 int32_t stream_id,
197 gpu::GpuStreamPriority stream_priority, 197 gpu::GpuStreamPriority stream_priority,
198 const std::vector<int32_t>& attribs, 198 const std::vector<int32_t>& attribs,
199 const GURL& active_url, 199 const GURL& active_url,
200 gfx::GpuPreference gpu_preference) { 200 gfx::GpuPreference gpu_preference,
201 scoped_refptr<base::SingleThreadTaskRunner> task_runner) {
201 DCHECK(!share_group || (stream_id == share_group->stream_id())); 202 DCHECK(!share_group || (stream_id == share_group->stream_id()));
202 TRACE_EVENT1("gpu", "GpuChannelHost::CreateViewCommandBuffer", 203 TRACE_EVENT1("gpu", "GpuChannelHost::CreateViewCommandBuffer",
203 "surface_handle", surface_handle); 204 "surface_handle", surface_handle);
204 205
205 GPUCreateCommandBufferConfig init_params; 206 GPUCreateCommandBufferConfig init_params;
206 init_params.share_group_id = 207 init_params.share_group_id =
207 share_group ? share_group->route_id() : MSG_ROUTING_NONE; 208 share_group ? share_group->route_id() : MSG_ROUTING_NONE;
208 init_params.stream_id = stream_id; 209 init_params.stream_id = stream_id;
209 init_params.stream_priority = stream_priority; 210 init_params.stream_priority = stream_priority;
210 init_params.attribs = attribs; 211 init_params.attribs = attribs;
(...skipping 19 matching lines...) Expand all
230 return nullptr; 231 return nullptr;
231 } 232 }
232 233
233 if (!succeeded) { 234 if (!succeeded) {
234 LOG(ERROR) << "GpuChannelMsg_CreateCommandBuffer returned failure."; 235 LOG(ERROR) << "GpuChannelMsg_CreateCommandBuffer returned failure.";
235 return nullptr; 236 return nullptr;
236 } 237 }
237 238
238 std::unique_ptr<CommandBufferProxyImpl> command_buffer = 239 std::unique_ptr<CommandBufferProxyImpl> command_buffer =
239 base::WrapUnique(new CommandBufferProxyImpl(this, route_id, stream_id)); 240 base::WrapUnique(new CommandBufferProxyImpl(this, route_id, stream_id));
240 AddRoute(route_id, command_buffer->AsWeakPtr()); 241 AddRouteWithTaskRunner(route_id, command_buffer->AsWeakPtr(),
242 std::move(task_runner));
241 if (!command_buffer->Initialize()) 243 if (!command_buffer->Initialize())
242 return nullptr; 244 return nullptr;
243 245
244 return command_buffer; 246 return command_buffer;
245 } 247 }
246 248
247 void GpuChannelHost::DestroyCommandBuffer( 249 void GpuChannelHost::DestroyCommandBuffer(
248 CommandBufferProxyImpl* command_buffer) { 250 CommandBufferProxyImpl* command_buffer) {
249 TRACE_EVENT0("gpu", "GpuChannelHost::DestroyCommandBuffer"); 251 TRACE_EVENT0("gpu", "GpuChannelHost::DestroyCommandBuffer");
250 252
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 474
473 listeners_.clear(); 475 listeners_.clear();
474 } 476 }
475 477
476 bool GpuChannelHost::MessageFilter::IsLost() const { 478 bool GpuChannelHost::MessageFilter::IsLost() const {
477 AutoLock lock(lock_); 479 AutoLock lock(lock_);
478 return lost_; 480 return lost_;
479 } 481 }
480 482
481 } // namespace gpu 483 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/ipc/client/gpu_channel_host.h ('k') | gpu/ipc/client/gpu_process_hosted_ca_layer_tree_params.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698