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

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

Issue 23125014: Run VDA::Decode on GPU IO thread if VDA supports it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use filter_.get() to decide whether RemoveFilter should be called Created 7 years, 3 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
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_channel.cc ('k') | content/common/gpu/media/android_video_decode_accelerator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698