summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/ggl
diff options
context:
space:
mode:
authorjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-29 09:30:07 +0000
committerjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-29 09:30:07 +0000
commit63b39c73dd951416f6c1808f34a10ca422336610 (patch)
tree23346799369839cf51e1d831f9d97de1629934d0 /chrome/renderer/ggl
parentddaa08c97c8a0f35d709d5fd1191b093fbae1c36 (diff)
downloadchromium_src-63b39c73dd951416f6c1808f34a10ca422336610.zip
chromium_src-63b39c73dd951416f6c1808f34a10ca422336610.tar.gz
chromium_src-63b39c73dd951416f6c1808f34a10ca422336610.tar.bz2
Revert 60912 - Some cleanup work in GpuVideoDecoderHost and IpcVideoDecoder
Seeing that GpuVideoDecoderHost has a very similar interface to VideoDecodeEngine, this patch makes GpuVideoDecoderHost implments VideoDecodeEngine. Also did some cleanup work to remove code patch that doesn't fit into the buffer allocation model we are moving to. BUG=53714 TEST=Tree is green. Code still doesn't work yet. Review URL: http://codereview.chromium.org/3393014 TBR=hclam@chromium.org Review URL: http://codereview.chromium.org/3531002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60922 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/ggl')
-rw-r--r--chrome/renderer/ggl/ggl.cc24
-rw-r--r--chrome/renderer/ggl/ggl.h20
2 files changed, 7 insertions, 37 deletions
diff --git a/chrome/renderer/ggl/ggl.cc b/chrome/renderer/ggl/ggl.cc
index 4ae8c9f..62453f7 100644
--- a/chrome/renderer/ggl/ggl.cc
+++ b/chrome/renderer/ggl/ggl.cc
@@ -12,8 +12,6 @@
#include "chrome/renderer/ggl/ggl.h"
#include "chrome/renderer/gpu_channel_host.h"
#include "chrome/renderer/gpu_video_service_host.h"
-#include "chrome/renderer/media/gles2_video_decode_context.h"
-#include "chrome/renderer/render_thread.h"
#include "chrome/renderer/render_widget.h"
#include "ipc/ipc_channel_handle.h"
@@ -101,10 +99,7 @@ class Context : public base::SupportsWeakPtr<Context> {
bool SwapBuffers();
// Create a hardware accelerated video decoder associated with this context.
- media::VideoDecodeEngine* CreateVideoDecodeEngine();
-
- // Create a hardware video decode context associated with this context.
- media::VideoDecodeContext* CreateVideoDecodeContext(bool hardware_decoder);
+ GpuVideoDecoderHost* CreateVideoDecoder();
// Get the current error code.
Error GetError();
@@ -329,17 +324,11 @@ bool Context::SwapBuffers() {
return true;
}
-media::VideoDecodeEngine* Context::CreateVideoDecodeEngine() {
+GpuVideoDecoderHost* Context::CreateVideoDecoder() {
return GpuVideoServiceHost::get()->CreateVideoDecoder(
command_buffer_->route_id());
}
-media::VideoDecodeContext* Context::CreateVideoDecodeContext(
- bool hardware_decoder) {
- return new Gles2VideoDecodeContext(
- RenderThread::current()->message_loop(), hardware_decoder, this);
-}
-
Error Context::GetError() {
gpu::CommandBuffer::State state = command_buffer_->GetState();
if (state.error == gpu::error::kNoError) {
@@ -476,13 +465,8 @@ bool DestroyContext(Context* context) {
#endif
}
-media::VideoDecodeEngine* CreateVideoDecodeEngine(Context* context) {
- return context->CreateVideoDecodeEngine();
-}
-
-media::VideoDecodeContext* CreateVideoDecodeContext(
- Context* context, bool hardware_decoder) {
- return context->CreateVideoDecodeContext(hardware_decoder);
+GpuVideoDecoderHost* CreateVideoDecoder(Context* context) {
+ return context->CreateVideoDecoder();
}
Error GetError() {
diff --git a/chrome/renderer/ggl/ggl.h b/chrome/renderer/ggl/ggl.h
index c20e91b..8d3f0e2 100644
--- a/chrome/renderer/ggl/ggl.h
+++ b/chrome/renderer/ggl/ggl.h
@@ -16,13 +16,7 @@
#include "gfx/size.h"
class GpuChannelHost;
-
-namespace media {
-
-class VideoDecodeContext;
-class VideoDecodeEngine;
-
-}
+class GpuVideoDecoderHost;
namespace ggl {
@@ -121,16 +115,8 @@ bool SwapBuffers(Context* context);
// Destroy the given GGL context.
bool DestroyContext(Context* context);
-// Create a hardware video decode engine corresponding to the context.
-media::VideoDecodeEngine* CreateVideoDecodeEngine(Context* context);
-
-// Create a hardware video decode context to pair with the hardware video
-// decode engine. It can also be used with a software decode engine.
-//
-// Set |hardware_decoder| to true if this context is for a hardware video
-// engine.
-media::VideoDecodeContext* CreateVideoDecodeContext(Context* context,
- bool hardware_decoder);
+// Create a hardware video decoder corresponding to the context.
+GpuVideoDecoderHost* CreateVideoDecoder(Context* context);
// TODO(gman): Remove this
void DisableShaderTranslation(Context* context);