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

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

Issue 7659001: Support multiple HW video decoders per context. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years, 4 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
« no previous file with comments | « content/common/gpu/gpu_channel.h ('k') | content/common/gpu/gpu_command_buffer_stub.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 279
280 OnMessageReceived(*message); 280 OnMessageReceived(*message);
281 } 281 }
282 } 282 }
283 283
284 int GpuChannel::GenerateRouteID() { 284 int GpuChannel::GenerateRouteID() {
285 static int last_id = 0; 285 static int last_id = 0;
286 return ++last_id; 286 return ++last_id;
287 } 287 }
288 288
289 void GpuChannel::AddRoute(int32 route_id, IPC::Channel::Listener* listener) {
290 router_.AddRoute(route_id, listener);
291 }
292
293 void GpuChannel::RemoveRoute(int32 route_id) {
294 router_.RemoveRoute(route_id);
295 }
296
289 void GpuChannel::OnInitialize(base::ProcessHandle renderer_process) { 297 void GpuChannel::OnInitialize(base::ProcessHandle renderer_process) {
290 // Initialize should only happen once. 298 // Initialize should only happen once.
291 DCHECK(!renderer_process_); 299 DCHECK(!renderer_process_);
292 300
293 // Verify that the renderer has passed its own process handle. 301 // Verify that the renderer has passed its own process handle.
294 if (base::GetProcId(renderer_process) == renderer_pid_) 302 if (base::GetProcId(renderer_process) == renderer_pid_)
295 renderer_process_ = renderer_process; 303 renderer_process_ = renderer_process;
296 } 304 }
297 305
298 void GpuChannel::OnCreateOffscreenCommandBuffer( 306 void GpuChannel::OnCreateOffscreenCommandBuffer(
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 436
429 #if defined(OS_POSIX) 437 #if defined(OS_POSIX)
430 int GpuChannel::GetRendererFileDescriptor() { 438 int GpuChannel::GetRendererFileDescriptor() {
431 int fd = -1; 439 int fd = -1;
432 if (channel_.get()) { 440 if (channel_.get()) {
433 fd = channel_->GetClientFileDescriptor(); 441 fd = channel_->GetClientFileDescriptor();
434 } 442 }
435 return fd; 443 return fd;
436 } 444 }
437 #endif // defined(OS_POSIX) 445 #endif // defined(OS_POSIX)
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_channel.h ('k') | content/common/gpu/gpu_command_buffer_stub.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698