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

Unified Diff: content/browser/renderer_host/surface_texture_transport_client_android.cc

Issue 11754003: Move VideoFrameProvider to, and remove all usage of WebVideoFrame from cc/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 11 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/browser/renderer_host/surface_texture_transport_client_android.cc
diff --git a/content/browser/renderer_host/surface_texture_transport_client_android.cc b/content/browser/renderer_host/surface_texture_transport_client_android.cc
index 83d5901db276aeeb2ab01426e470813a35cb7455..8c2b8d34166603fce761ad12e96f684ff5d4cdae 100644
--- a/content/browser/renderer_host/surface_texture_transport_client_android.cc
+++ b/content/browser/renderer_host/surface_texture_transport_client_android.cc
@@ -37,8 +37,7 @@ SurfaceTextureTransportClient::~SurfaceTextureTransportClient() {
scoped_refptr<cc::Layer> SurfaceTextureTransportClient::Initialize() {
// Use a SurfaceTexture to stream frames to the UI thread.
- video_layer_ = cc::VideoLayer::create(this,
- base::Bind(webkit_media::WebVideoFrameImpl::toVideoFrame));
+ video_layer_ = cc::VideoLayer::create(this);
surface_texture_ = new SurfaceTextureBridge(0);
surface_texture_->SetFrameAvailableCallback(
@@ -62,10 +61,11 @@ SurfaceTextureTransportClient::GetCompositingSurface(int surface_id) {
void SurfaceTextureTransportClient::SetSize(const gfx::Size& size) {
surface_texture_->SetDefaultBufferSize(size.width(), size.height());
video_layer_->setBounds(size);
- video_frame_.reset();
+ video_frame_ = NULL;
}
-WebKit::WebVideoFrame* SurfaceTextureTransportClient::getCurrentFrame() {
+scoped_refptr<media::VideoFrame> SurfaceTextureTransportClient::
+ GetCurrentFrame() {
if (!texture_id_) {
WebKit::WebGraphicsContext3D* context =
ImageTransportFactoryAndroid::GetInstance()->GetContext3D();
@@ -73,26 +73,24 @@ WebKit::WebVideoFrame* SurfaceTextureTransportClient::getCurrentFrame() {
texture_id_ = context->createTexture();
surface_texture_->AttachToGLContext(texture_id_);
}
- if (!video_frame_.get()) {
+ if (!video_frame_) {
const gfx::Size size = video_layer_->bounds();
- video_frame_.reset(
- new webkit_media::WebVideoFrameImpl(
- media::VideoFrame::WrapNativeTexture(
- texture_id_, kGLTextureExternalOES,
- size,
- gfx::Rect(gfx::Point(), size),
- size,
- base::TimeDelta(),
- media::VideoFrame::ReadPixelsCB(),
- base::Closure())));
+ video_frame_ = media::VideoFrame::WrapNativeTexture(
+ texture_id_, kGLTextureExternalOES,
+ size,
+ gfx::Rect(gfx::Point(), size),
+ size,
+ base::TimeDelta(),
+ media::VideoFrame::ReadPixelsCB(),
+ base::Closure());
}
surface_texture_->UpdateTexImage();
- return video_frame_.get();
+ return video_frame_;
}
-void SurfaceTextureTransportClient::putCurrentFrame(
- WebKit::WebVideoFrame* frame) {
+void SurfaceTextureTransportClient::PutCurrentFrame(
+ const scoped_refptr<media::VideoFrame>& frame) {
}
void SurfaceTextureTransportClient::OnSurfaceTextureFrameAvailable() {
« no previous file with comments | « content/browser/renderer_host/surface_texture_transport_client_android.h ('k') | webkit/compositor_bindings/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698