Index: content/common/gpu/gpu_command_buffer_stub.h |
diff --git a/content/common/gpu/gpu_command_buffer_stub.h b/content/common/gpu/gpu_command_buffer_stub.h |
index 5fdb0e930f497beab8c7456e1ded330a5413a459..2e933062bfaecb54e1e9cc99073e78e8078dc116 100644 |
--- a/content/common/gpu/gpu_command_buffer_stub.h |
+++ b/content/common/gpu/gpu_command_buffer_stub.h |
@@ -15,6 +15,7 @@ |
#include "base/memory/weak_ptr.h" |
#include "base/process.h" |
#include "base/task.h" |
+#include "content/common/gpu/media/gpu_video_decode_accelerator.h" |
#include "gpu/command_buffer/service/command_buffer_service.h" |
#include "gpu/command_buffer/service/gpu_scheduler.h" |
#include "ipc/ipc_channel.h" |
@@ -95,6 +96,15 @@ class GpuCommandBufferStub |
// its only parameter. Multiple callbacks may be registered. |
void AddSetTokenCallback(const base::Callback<void(int32)>& callback); |
+ void set_video_decoder(GpuVideoDecodeAccelerator* video_decoder) { |
+ DCHECK(!video_decoder_.get()); |
+ video_decoder_.reset(video_decoder); |
+ } |
+ |
+ void DestroyVideoDecoder() { |
Ami GONE FROM CHROMIUM
2011/06/30 22:20:39
Destroy* implies to me that this class should have
vrk (LEFT CHROMIUM)
2011/07/01 18:12:14
Destroying is now done directly in GpuCommandBuffe
|
+ video_decoder_.reset(); |
+ } |
+ |
private: |
// Message handlers: |
void OnInitialize(base::SharedMemoryHandle ring_buffer, |
@@ -171,6 +181,9 @@ class GpuCommandBufferStub |
GpuWatchdog* watchdog_; |
ScopedRunnableMethodFactory<GpuCommandBufferStub> task_factory_; |
+ // The video decoder associated with this stub, if any. |
+ scoped_ptr<GpuVideoDecodeAccelerator> video_decoder_; |
+ |
DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); |
}; |