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

Side by Side Diff: content/common/gpu/gpu_channel.cc

Issue 6993043: Fix the mac hangup when force-compositing-mode is enabled (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: disabled CVDisplayLink code, seems to work Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #if defined(OS_WIN) 5 #if defined(OS_WIN)
6 #include <windows.h> 6 #include <windows.h>
7 #endif 7 #endif
8 8
9 #include "content/common/gpu/gpu_channel.h" 9 #include "content/common/gpu/gpu_channel.h"
10 10
11 #include "base/command_line.h" 11 #include "base/command_line.h"
12 #include "base/debug/trace_event.h"
12 #include "base/process_util.h" 13 #include "base/process_util.h"
13 #include "base/string_util.h" 14 #include "base/string_util.h"
14 #include "content/common/child_process.h" 15 #include "content/common/child_process.h"
15 #include "content/common/content_client.h" 16 #include "content/common/content_client.h"
16 #include "content/common/content_switches.h" 17 #include "content/common/content_switches.h"
17 #include "content/common/gpu/gpu_channel_manager.h" 18 #include "content/common/gpu/gpu_channel_manager.h"
18 #include "content/common/gpu/gpu_messages.h" 19 #include "content/common/gpu/gpu_messages.h"
19 #include "content/common/gpu/gpu_video_service.h" 20 #include "content/common/gpu/gpu_video_service.h"
20 #include "content/common/gpu/transport_texture.h" 21 #include "content/common/gpu/transport_texture.h"
21 #include "ui/gfx/gl/gl_surface.h" 22 #include "ui/gfx/gl/gl_surface.h"
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 parent_stub, 245 parent_stub,
245 size, 246 size,
246 disallowed_extensions_, 247 disallowed_extensions_,
247 init_params.allowed_extensions, 248 init_params.allowed_extensions,
248 init_params.attribs, 249 init_params.attribs,
249 parent_texture_id, 250 parent_texture_id,
250 *route_id, 251 *route_id,
251 0, 0, watchdog_)); 252 0, 0, watchdog_));
252 router_.AddRoute(*route_id, stub.get()); 253 router_.AddRoute(*route_id, stub.get());
253 stubs_.AddWithID(stub.release(), *route_id); 254 stubs_.AddWithID(stub.release(), *route_id);
255 TRACE_EVENT1("gpu", "GpuChannel::OnCreateOffscreenCommandBuffer",
256 "route_id", route_id);
254 #else 257 #else
255 *route_id = MSG_ROUTING_NONE; 258 *route_id = MSG_ROUTING_NONE;
256 #endif 259 #endif
257 } 260 }
258 261
259 void GpuChannel::OnDestroyCommandBuffer(int32 route_id) { 262 void GpuChannel::OnDestroyCommandBuffer(int32 route_id) {
260 #if defined(ENABLE_GPU) 263 #if defined(ENABLE_GPU)
264 TRACE_EVENT1("gpu", "GpuChannel::OnDestroyCommandBuffer",
265 "route_id", route_id);
261 if (router_.ResolveRoute(route_id)) { 266 if (router_.ResolveRoute(route_id)) {
267 GpuCommandBufferStub* stub = stubs_.Lookup(route_id);
268 if (stub != NULL)
269 stub->CommandBufferWasDestroyed();
jbates 2011/06/07 16:47:52 If the IPC route is removed, unblock the stub so t
262 router_.RemoveRoute(route_id); 270 router_.RemoveRoute(route_id);
263 stubs_.Remove(route_id); 271 stubs_.Remove(route_id);
264 } 272 }
265 #endif 273 #endif
266 } 274 }
267 275
268 void GpuChannel::OnCreateOffscreenSurface(const gfx::Size& size, 276 void GpuChannel::OnCreateOffscreenSurface(const gfx::Size& size,
269 int* route_id) { 277 int* route_id) {
270 *route_id = MSG_ROUTING_NONE; 278 *route_id = MSG_ROUTING_NONE;
271 279
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 376
369 #if defined(OS_POSIX) 377 #if defined(OS_POSIX)
370 int GpuChannel::GetRendererFileDescriptor() { 378 int GpuChannel::GetRendererFileDescriptor() {
371 int fd = -1; 379 int fd = -1;
372 if (channel_.get()) { 380 if (channel_.get()) {
373 fd = channel_->GetClientFileDescriptor(); 381 fd = channel_->GetClientFileDescriptor();
374 } 382 }
375 return fd; 383 return fd;
376 } 384 }
377 #endif // defined(OS_POSIX) 385 #endif // defined(OS_POSIX)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698