| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "content/common/gpu/client/command_buffer_proxy_impl.h" | 5 #include "content/common/gpu/client/command_buffer_proxy_impl.h" |
| 6 | 6 |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
| (...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 return result; | 443 return result; |
| 444 } | 444 } |
| 445 | 445 |
| 446 void CommandBufferProxyImpl::SetNotifyRepaintTask(const base::Closure& task) { | 446 void CommandBufferProxyImpl::SetNotifyRepaintTask(const base::Closure& task) { |
| 447 notify_repaint_task_ = task; | 447 notify_repaint_task_ = task; |
| 448 } | 448 } |
| 449 | 449 |
| 450 scoped_refptr<GpuVideoDecodeAcceleratorHost> | 450 scoped_refptr<GpuVideoDecodeAcceleratorHost> |
| 451 CommandBufferProxyImpl::CreateVideoDecoder( | 451 CommandBufferProxyImpl::CreateVideoDecoder( |
| 452 media::VideoCodecProfile profile, | 452 media::VideoCodecProfile profile, |
| 453 const gfx::Size& size, |
| 454 const std::vector<uint8_t>& extra_data, |
| 453 media::VideoDecodeAccelerator::Client* client) { | 455 media::VideoDecodeAccelerator::Client* client) { |
| 454 int decoder_route_id; | 456 int decoder_route_id; |
| 455 if (!Send(new GpuCommandBufferMsg_CreateVideoDecoder(route_id_, profile, | 457 if (!Send(new GpuCommandBufferMsg_CreateVideoDecoder( |
| 456 &decoder_route_id))) { | 458 route_id_, profile, size, extra_data, &decoder_route_id))) { |
| 457 LOG(ERROR) << "Send(GpuCommandBufferMsg_CreateVideoDecoder) failed"; | 459 LOG(ERROR) << "Send(GpuCommandBufferMsg_CreateVideoDecoder) failed"; |
| 458 return NULL; | 460 return NULL; |
| 459 } | 461 } |
| 460 | 462 |
| 461 scoped_refptr<GpuVideoDecodeAcceleratorHost> decoder_host = | 463 scoped_refptr<GpuVideoDecodeAcceleratorHost> decoder_host = |
| 462 new GpuVideoDecodeAcceleratorHost(channel_, decoder_route_id, client); | 464 new GpuVideoDecodeAcceleratorHost(channel_, decoder_route_id, client); |
| 463 bool inserted = video_decoder_hosts_.insert(std::make_pair( | 465 bool inserted = video_decoder_hosts_.insert(std::make_pair( |
| 464 decoder_route_id, decoder_host)).second; | 466 decoder_route_id, decoder_host)).second; |
| 465 DCHECK(inserted); | 467 DCHECK(inserted); |
| 466 | 468 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 505 | 507 |
| 506 void CommandBufferProxyImpl::SetOnConsoleMessageCallback( | 508 void CommandBufferProxyImpl::SetOnConsoleMessageCallback( |
| 507 const GpuConsoleMessageCallback& callback) { | 509 const GpuConsoleMessageCallback& callback) { |
| 508 console_message_callback_ = callback; | 510 console_message_callback_ = callback; |
| 509 } | 511 } |
| 510 | 512 |
| 511 void CommandBufferProxyImpl::TryUpdateState() { | 513 void CommandBufferProxyImpl::TryUpdateState() { |
| 512 if (last_state_.error == gpu::error::kNoError) | 514 if (last_state_.error == gpu::error::kNoError) |
| 513 shared_state_->Read(&last_state_); | 515 shared_state_->Read(&last_state_); |
| 514 } | 516 } |
| OLD | NEW |