| 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/bind_helpers.h" | 6 #include "base/bind_helpers.h" |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
| 9 #include "base/hash.h" | 9 #include "base/hash.h" |
| 10 #include "base/memory/shared_memory.h" | 10 #include "base/memory/shared_memory.h" |
| (...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 715 scheduler_->PutChanged(); | 715 scheduler_->PutChanged(); |
| 716 } | 716 } |
| 717 | 717 |
| 718 void GpuCommandBufferStub::OnCreateVideoDecoder( | 718 void GpuCommandBufferStub::OnCreateVideoDecoder( |
| 719 media::VideoCodecProfile profile, | 719 media::VideoCodecProfile profile, |
| 720 IPC::Message* reply_message) { | 720 IPC::Message* reply_message) { |
| 721 TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnCreateVideoDecoder"); | 721 TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnCreateVideoDecoder"); |
| 722 int decoder_route_id = channel_->GenerateRouteID(); | 722 int decoder_route_id = channel_->GenerateRouteID(); |
| 723 GpuVideoDecodeAccelerator* decoder = | 723 GpuVideoDecodeAccelerator* decoder = |
| 724 new GpuVideoDecodeAccelerator(decoder_route_id, this); | 724 new GpuVideoDecodeAccelerator(decoder_route_id, this); |
| 725 decoder->Initialize(profile, reply_message); | 725 decoder->Initialize(profile, reply_message, channel_->io_message_loop()); |
| 726 // decoder is registered as a DestructionObserver of this stub and will | 726 // decoder is registered as a DestructionObserver of this stub and will |
| 727 // self-delete during destruction of this stub. | 727 // self-delete during destruction of this stub. |
| 728 } | 728 } |
| 729 | 729 |
| 730 void GpuCommandBufferStub::OnSetSurfaceVisible(bool visible) { | 730 void GpuCommandBufferStub::OnSetSurfaceVisible(bool visible) { |
| 731 TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnSetSurfaceVisible"); | 731 TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnSetSurfaceVisible"); |
| 732 if (memory_manager_client_state_) | 732 if (memory_manager_client_state_) |
| 733 memory_manager_client_state_->SetVisible(visible); | 733 memory_manager_client_state_->SetVisible(visible); |
| 734 } | 734 } |
| 735 | 735 |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 941 command_buffer_->GetState().error == gpu::error::kLostContext) | 941 command_buffer_->GetState().error == gpu::error::kLostContext) |
| 942 return; | 942 return; |
| 943 | 943 |
| 944 command_buffer_->SetContextLostReason(gpu::error::kUnknown); | 944 command_buffer_->SetContextLostReason(gpu::error::kUnknown); |
| 945 if (decoder_) | 945 if (decoder_) |
| 946 decoder_->LoseContext(GL_UNKNOWN_CONTEXT_RESET_ARB); | 946 decoder_->LoseContext(GL_UNKNOWN_CONTEXT_RESET_ARB); |
| 947 command_buffer_->SetParseError(gpu::error::kLostContext); | 947 command_buffer_->SetParseError(gpu::error::kLostContext); |
| 948 } | 948 } |
| 949 | 949 |
| 950 } // namespace content | 950 } // namespace content |
| OLD | NEW |