| 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();
|
|
|