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

Unified Diff: chrome/renderer/ggl/ggl.cc

Issue 3215008: Connect GpuVideoDecodeServiceHost with ggl::Context and CommandBufferProxy (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: fixed comments Created 10 years, 4 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: chrome/renderer/ggl/ggl.cc
diff --git a/chrome/renderer/ggl/ggl.cc b/chrome/renderer/ggl/ggl.cc
index 279247fec08778848c7add5c59ead3c9bc0d0c1e..62453f7b08ab00f1d13b1134dd477b437020d42a 100644
--- a/chrome/renderer/ggl/ggl.cc
+++ b/chrome/renderer/ggl/ggl.cc
@@ -11,6 +11,7 @@
#include "chrome/renderer/command_buffer_proxy.h"
#include "chrome/renderer/ggl/ggl.h"
#include "chrome/renderer/gpu_channel_host.h"
+#include "chrome/renderer/gpu_video_service_host.h"
#include "chrome/renderer/render_widget.h"
#include "ipc/ipc_channel_handle.h"
@@ -97,6 +98,9 @@ class Context : public base::SupportsWeakPtr<Context> {
// not useful at this point.
bool SwapBuffers();
+ // Create a hardware accelerated video decoder associated with this context.
+ GpuVideoDecoderHost* CreateVideoDecoder();
+
// Get the current error code.
Error GetError();
@@ -320,6 +324,11 @@ bool Context::SwapBuffers() {
return true;
}
+GpuVideoDecoderHost* Context::CreateVideoDecoder() {
+ return GpuVideoServiceHost::get()->CreateVideoDecoder(
+ command_buffer_->route_id());
+}
+
Error Context::GetError() {
gpu::CommandBuffer::State state = command_buffer_->GetState();
if (state.error == gpu::error::kNoError) {
@@ -456,6 +465,10 @@ bool DestroyContext(Context* context) {
#endif
}
+GpuVideoDecoderHost* CreateVideoDecoder(Context* context) {
+ return context->CreateVideoDecoder();
+}
+
Error GetError() {
#if defined(ENABLE_GPU)
Context* context = GetCurrentContext();

Powered by Google App Engine
This is Rietveld 408576698