| OLD | NEW | 
|---|
| 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/command_line.h" | 8 #include "base/command_line.h" | 
| 9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" | 
| 10 #include "base/shared_memory.h" | 10 #include "base/shared_memory.h" | 
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 101     IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_RegisterTransferBuffer, | 101     IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_RegisterTransferBuffer, | 
| 102                                     OnRegisterTransferBuffer); | 102                                     OnRegisterTransferBuffer); | 
| 103     IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_DestroyTransferBuffer, | 103     IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_DestroyTransferBuffer, | 
| 104                                     OnDestroyTransferBuffer); | 104                                     OnDestroyTransferBuffer); | 
| 105     IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_GetTransferBuffer, | 105     IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_GetTransferBuffer, | 
| 106                                     OnGetTransferBuffer); | 106                                     OnGetTransferBuffer); | 
| 107     IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_CreateVideoDecoder, | 107     IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_CreateVideoDecoder, | 
| 108                                     OnCreateVideoDecoder) | 108                                     OnCreateVideoDecoder) | 
| 109     IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_DestroyVideoDecoder, | 109     IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_DestroyVideoDecoder, | 
| 110                         OnDestroyVideoDecoder) | 110                         OnDestroyVideoDecoder) | 
|  | 111     IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_SetSurfaceVisible, | 
|  | 112                         OnSetSurfaceVisible) | 
| 111     IPC_MESSAGE_UNHANDLED(handled = false) | 113     IPC_MESSAGE_UNHANDLED(handled = false) | 
| 112   IPC_END_MESSAGE_MAP() | 114   IPC_END_MESSAGE_MAP() | 
| 113 | 115 | 
| 114   DCHECK(handled); | 116   DCHECK(handled); | 
| 115   return handled; | 117   return handled; | 
| 116 } | 118 } | 
| 117 | 119 | 
| 118 bool GpuCommandBufferStub::Send(IPC::Message* message) { | 120 bool GpuCommandBufferStub::Send(IPC::Message* message) { | 
| 119   return channel_->Send(message); | 121   return channel_->Send(message); | 
| 120 } | 122 } | 
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 500   video_decoders_.AddWithID(decoder, decoder_route_id); | 502   video_decoders_.AddWithID(decoder, decoder_route_id); | 
| 501   channel_->AddRoute(decoder_route_id, decoder); | 503   channel_->AddRoute(decoder_route_id, decoder); | 
| 502   decoder->Initialize(profile, reply_message); | 504   decoder->Initialize(profile, reply_message); | 
| 503 } | 505 } | 
| 504 | 506 | 
| 505 void GpuCommandBufferStub::OnDestroyVideoDecoder(int decoder_route_id) { | 507 void GpuCommandBufferStub::OnDestroyVideoDecoder(int decoder_route_id) { | 
| 506   channel_->RemoveRoute(decoder_route_id); | 508   channel_->RemoveRoute(decoder_route_id); | 
| 507   video_decoders_.Remove(decoder_route_id); | 509   video_decoders_.Remove(decoder_route_id); | 
| 508 } | 510 } | 
| 509 | 511 | 
|  | 512 void GpuCommandBufferStub::OnSetSurfaceVisible(bool visible) { | 
|  | 513   surface_->SetVisible(visible); | 
|  | 514 } | 
|  | 515 | 
| 510 #endif  // defined(ENABLE_GPU) | 516 #endif  // defined(ENABLE_GPU) | 
| OLD | NEW | 
|---|