diff options
Diffstat (limited to 'chrome/gpu/gpu_channel.cc')
-rw-r--r-- | chrome/gpu/gpu_channel.cc | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/chrome/gpu/gpu_channel.cc b/chrome/gpu/gpu_channel.cc index a63faa9..ea20f22 100644 --- a/chrome/gpu/gpu_channel.cc +++ b/chrome/gpu/gpu_channel.cc @@ -208,14 +208,21 @@ void GpuChannel::OnGetVideoService(GpuVideoServiceInfoParam* info) { void GpuChannel::OnCreateVideoDecoder(GpuVideoDecoderInfoParam* info) { #if defined(ENABLE_GPU) LOG(INFO) << "GpuChannel::OnCreateVideoDecoder"; - info->decoder_id_ = -1; + info->decoder_id = -1; GpuVideoService* service = GpuVideoService::get(); if (service == NULL) return; - info->decoder_host_route_id_ = GenerateRouteID(); - info->decoder_route_id_ = GenerateRouteID(); - service->CreateVideoDecoder(this, &router_, info); + // The context ID corresponds to the command buffer used. + GpuCommandBufferStub* stub = stubs_.Lookup(info->context_id); + + info->decoder_host_route_id = GenerateRouteID(); + info->decoder_route_id = GenerateRouteID(); + + // TODO(hclam): Need to be careful about the lifetime of the command buffer + // decoder. + service->CreateVideoDecoder(this, &router_, info, + stub->processor()->decoder()); #endif } |