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

Unified Diff: content/common/gpu/gpu_command_buffer_stub.h

Issue 7292010: Delete GpuVideoService and move GpuVideoDecodeAccelerator ownership to stubs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 6 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 side-by-side diff with in-line comments
Download patch
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);
};

Powered by Google App Engine
This is Rietveld 408576698