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

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

Issue 7474006: PPB_VideoDecoder_Dev::Initialize is now synchronous! (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: vrk CR update. 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_command_buffer_stub.h ('k') | content/common/gpu/gpu_messages.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(ENABLE_GPU) 5 #if defined(ENABLE_GPU)
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/process_util.h" 9 #include "base/process_util.h"
10 #include "base/shared_memory.h" 10 #include "base/shared_memory.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_AsyncFlush, OnAsyncFlush); 80 IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_AsyncFlush, OnAsyncFlush);
81 IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_Rescheduled, OnRescheduled); 81 IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_Rescheduled, OnRescheduled);
82 IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_CreateTransferBuffer, 82 IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_CreateTransferBuffer,
83 OnCreateTransferBuffer); 83 OnCreateTransferBuffer);
84 IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_RegisterTransferBuffer, 84 IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_RegisterTransferBuffer,
85 OnRegisterTransferBuffer); 85 OnRegisterTransferBuffer);
86 IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_DestroyTransferBuffer, 86 IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_DestroyTransferBuffer,
87 OnDestroyTransferBuffer); 87 OnDestroyTransferBuffer);
88 IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_GetTransferBuffer, 88 IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_GetTransferBuffer,
89 OnGetTransferBuffer); 89 OnGetTransferBuffer);
90 IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_CreateVideoDecoder, 90 IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_CreateVideoDecoder,
91 OnCreateVideoDecoder) 91 OnCreateVideoDecoder)
92 IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_DestroyVideoDecoder, 92 IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_DestroyVideoDecoder,
93 OnDestroyVideoDecoder) 93 OnDestroyVideoDecoder)
94 IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_ResizeOffscreenFrameBuffer, 94 IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_ResizeOffscreenFrameBuffer,
95 OnResizeOffscreenFrameBuffer); 95 OnResizeOffscreenFrameBuffer);
96 #if defined(OS_MACOSX) 96 #if defined(OS_MACOSX)
97 IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_SetWindowSize, OnSetWindowSize); 97 IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_SetWindowSize, OnSetWindowSize);
98 #endif // defined(OS_MACOSX) 98 #endif // defined(OS_MACOSX)
99 IPC_MESSAGE_UNHANDLED(handled = false) 99 IPC_MESSAGE_UNHANDLED(handled = false)
100 IPC_END_MESSAGE_MAP() 100 IPC_END_MESSAGE_MAP()
101 101
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 gfx::GLContext::LosesAllContextsOnContextLost()) { 540 gfx::GLContext::LosesAllContextsOnContextLost()) {
541 channel_->LoseAllContexts(); 541 channel_->LoseAllContexts();
542 } else { 542 } else {
543 IPC::Message* msg = new GpuCommandBufferMsg_UpdateState(route_id_, state); 543 IPC::Message* msg = new GpuCommandBufferMsg_UpdateState(route_id_, state);
544 msg->set_unblock(true); 544 msg->set_unblock(true);
545 Send(msg); 545 Send(msg);
546 } 546 }
547 } 547 }
548 548
549 void GpuCommandBufferStub::OnCreateVideoDecoder( 549 void GpuCommandBufferStub::OnCreateVideoDecoder(
550 const std::vector<uint32>& configs) { 550 const std::vector<uint32>& configs,
551 IPC::Message* reply_message) {
551 video_decoder_.reset( 552 video_decoder_.reset(
552 new GpuVideoDecodeAccelerator(this, route_id_, this)); 553 new GpuVideoDecodeAccelerator(this, route_id_, this));
553 video_decoder_->Initialize(configs); 554 video_decoder_->Initialize(configs, reply_message);
554 } 555 }
555 556
556 void GpuCommandBufferStub::OnDestroyVideoDecoder() { 557 void GpuCommandBufferStub::OnDestroyVideoDecoder() {
557 LOG(ERROR) << "GpuCommandBufferStub::OnDestroyVideoDecoder"; 558 LOG(ERROR) << "GpuCommandBufferStub::OnDestroyVideoDecoder";
558 video_decoder_.reset(); 559 video_decoder_.reset();
559 } 560 }
560 561
561 #endif // defined(ENABLE_GPU) 562 #endif // defined(ENABLE_GPU)
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_command_buffer_stub.h ('k') | content/common/gpu/gpu_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698