From 0e4da3d4aa6d804fb55d798a439603d020847caf Mon Sep 17 00:00:00 2001 From: "hclam@chromium.org" Date: Tue, 28 Sep 2010 22:16:07 +0000 Subject: Access texture in a WebVideoFrame Provide getters for accessing textures in a WebVideoFrame BUG=53714 TEST=None Review URL: http://codereview.chromium.org/3472020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60852 0039d316-1c4b-4281-b951-d872f2087c98 --- webkit/glue/webvideoframe_impl.cc | 6 ++++++ webkit/glue/webvideoframe_impl.h | 1 + 2 files changed, 7 insertions(+) diff --git a/webkit/glue/webvideoframe_impl.cc b/webkit/glue/webvideoframe_impl.cc index a838cd6..f50eded 100644 --- a/webkit/glue/webvideoframe_impl.cc +++ b/webkit/glue/webvideoframe_impl.cc @@ -87,4 +87,10 @@ const void* WebVideoFrameImpl::data(unsigned plane) const { return NULL; } +unsigned WebVideoFrameImpl::texture(unsigned plane) const { + if (video_frame_.get()) + return video_frame_->gl_texture(plane); + return NULL; +} + } // namespace webkit_glue diff --git a/webkit/glue/webvideoframe_impl.h b/webkit/glue/webvideoframe_impl.h index 6dc9cde..dfaac03 100644 --- a/webkit/glue/webvideoframe_impl.h +++ b/webkit/glue/webvideoframe_impl.h @@ -25,6 +25,7 @@ class WebVideoFrameImpl : public WebVideoFrame { virtual unsigned planes() const; virtual int stride(unsigned plane) const; virtual const void* data(unsigned plane) const; + virtual unsigned texture(unsigned plane) const; private: scoped_refptr video_frame_; -- cgit v1.1