diff options
author | fischman@chromium.org <fischman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-05 02:48:02 +0000 |
---|---|---|
committer | fischman@chromium.org <fischman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-05 02:48:02 +0000 |
commit | e413fcf21cb5d8225ef489b3d6d15c79a81f05db (patch) | |
tree | f6746b9ce1a1ed772bddeb3984faee1fe5614710 /content | |
parent | 9ca0a2bb170339de97a700c13972548853f4db1f (diff) | |
download | chromium_src-e413fcf21cb5d8225ef489b3d6d15c79a81f05db.zip chromium_src-e413fcf21cb5d8225ef489b3d6d15c79a81f05db.tar.gz chromium_src-e413fcf21cb5d8225ef489b3d6d15c79a81f05db.tar.bz2 |
Delete the GpuCommandBufferMsg_DestroyVideoDecoder IPC message since it is never used(!)
Review URL: https://chromiumcodereview.appspot.com/13521007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@192463 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r-- | content/common/gpu/gpu_command_buffer_stub.cc | 9 | ||||
-rw-r--r-- | content/common/gpu/gpu_command_buffer_stub.h | 9 | ||||
-rw-r--r-- | content/common/gpu/gpu_messages.h | 6 |
3 files changed, 7 insertions, 17 deletions
diff --git a/content/common/gpu/gpu_command_buffer_stub.cc b/content/common/gpu/gpu_command_buffer_stub.cc index 6ae480b..62ee252 100644 --- a/content/common/gpu/gpu_command_buffer_stub.cc +++ b/content/common/gpu/gpu_command_buffer_stub.cc @@ -194,8 +194,6 @@ bool GpuCommandBufferStub::OnMessageReceived(const IPC::Message& message) { OnGetTransferBuffer); IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_CreateVideoDecoder, OnCreateVideoDecoder) - IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_DestroyVideoDecoder, - OnDestroyVideoDecoder) IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_SetSurfaceVisible, OnSetSurfaceVisible) IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_DiscardBackbuffer, @@ -744,15 +742,10 @@ void GpuCommandBufferStub::OnCreateVideoDecoder( int decoder_route_id = channel_->GenerateRouteID(); GpuVideoDecodeAccelerator* decoder = new GpuVideoDecodeAccelerator(decoder_route_id, this); - video_decoders_.AddWithID(decoder, decoder_route_id); + video_decoders_.push_back(decoder); decoder->Initialize(profile, reply_message); } -void GpuCommandBufferStub::OnDestroyVideoDecoder(int decoder_route_id) { - TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnDestroyVideoDecoder"); - video_decoders_.Remove(decoder_route_id); -} - void GpuCommandBufferStub::OnSetSurfaceVisible(bool visible) { TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnSetSurfaceVisible"); if (memory_manager_client_state_.get()) diff --git a/content/common/gpu/gpu_command_buffer_stub.h b/content/common/gpu/gpu_command_buffer_stub.h index 512012d..bc402032 100644 --- a/content/common/gpu/gpu_command_buffer_stub.h +++ b/content/common/gpu/gpu_command_buffer_stub.h @@ -9,7 +9,7 @@ #include <string> #include <vector> -#include "base/id_map.h" +#include "base/memory/scoped_vector.h" #include "base/memory/weak_ptr.h" #include "base/observer_list.h" #include "content/common/content_export.h" @@ -159,7 +159,6 @@ class GpuCommandBufferStub void OnCreateVideoDecoder( media::VideoCodecProfile profile, IPC::Message* reply_message); - void OnDestroyVideoDecoder(int32 decoder_route_id); void OnSetSurfaceVisible(bool visible); @@ -228,9 +227,9 @@ class GpuCommandBufferStub GpuWatchdog* watchdog_; - // Zero or more video decoders owned by this stub, keyed by their - // decoder_route_id. - IDMap<GpuVideoDecodeAccelerator, IDMapOwnPointer> video_decoders_; + // Zero or more video decoders owned by this stub. Only used for lifecycle + // management (so the order within the vector is irrelevant). + ScopedVector<GpuVideoDecodeAccelerator> video_decoders_; ObserverList<DestructionObserver> destruction_observers_; diff --git a/content/common/gpu/gpu_messages.h b/content/common/gpu/gpu_messages.h index de5d1e2..9aecf1a 100644 --- a/content/common/gpu/gpu_messages.h +++ b/content/common/gpu/gpu_messages.h @@ -531,14 +531,12 @@ IPC_SYNC_MESSAGE_ROUTED1_2(GpuCommandBufferMsg_GetTransferBuffer, uint32 /* size */) // Create and initialize a hardware video decoder, returning its new route_id. +// Created decoders should be freed with AcceleratedVideoDecoderMsg_Destroy when +// no longer needed. IPC_SYNC_MESSAGE_ROUTED1_1(GpuCommandBufferMsg_CreateVideoDecoder, media::VideoCodecProfile /* profile */, int /* route_id */) -// Release all resources held by the named hardware video decoder. -IPC_SYNC_MESSAGE_ROUTED1_0(GpuCommandBufferMsg_DestroyVideoDecoder, - int /* route_id */) - // Tells the proxy that there was an error and the command buffer had to be // destroyed for some reason. IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_Destroyed, |