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

Unified Diff: cc/video_layer_impl.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
« no previous file with comments | « cc/video_layer_impl.h ('k') | content/browser/renderer_host/surface_texture_transport_client_android.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/video_layer_impl.cc
diff --git a/cc/video_layer_impl.cc b/cc/video_layer_impl.cc
index 05eea675b785f8b58ce7de6e388041fcf08dc7cb..130e6f2460a25cd0b60ce6c9612d6a1c1846addb 100644
--- a/cc/video_layer_impl.cc
+++ b/cc/video_layer_impl.cc
@@ -20,12 +20,9 @@
namespace cc {
-VideoLayerImpl::VideoLayerImpl(LayerTreeImpl* treeImpl, int id, WebKit::WebVideoFrameProvider* provider,
- const FrameUnwrapper& unwrapper)
+VideoLayerImpl::VideoLayerImpl(LayerTreeImpl* treeImpl, int id, VideoFrameProvider* provider)
: LayerImpl(treeImpl, id)
, m_provider(provider)
- , m_unwrapper(unwrapper)
- , m_webFrame(0)
, m_frame(0)
, m_format(GL_INVALID_VALUE)
, m_convertYUV(false)
@@ -42,14 +39,14 @@ VideoLayerImpl::VideoLayerImpl(LayerTreeImpl* treeImpl, int id, WebKit::WebVideo
// thread is blocked. That makes this a thread-safe call to set the video
// frame provider client that does not require a lock. The same is true of
// the call in the destructor.
- m_provider->setVideoFrameProviderClient(this);
+ m_provider->SetVideoFrameProviderClient(this);
}
VideoLayerImpl::~VideoLayerImpl()
{
// See comment in constructor for why this doesn't need a lock.
if (m_provider) {
- m_provider->setVideoFrameProviderClient(0);
+ m_provider->SetVideoFrameProviderClient(0);
m_provider = 0;
}
freePlaneData(layerTreeImpl()->resource_provider());
@@ -61,7 +58,7 @@ VideoLayerImpl::~VideoLayerImpl()
#endif
}
-void VideoLayerImpl::stopUsingProvider()
+void VideoLayerImpl::StopUsingProvider()
{
// Block the provider from shutting down until this client is done
// using the frame.
@@ -143,8 +140,7 @@ void VideoLayerImpl::willDrawInternal(ResourceProvider* resourceProvider)
return;
}
- m_webFrame = m_provider->getCurrentFrame();
- m_frame = m_unwrapper.Run(m_webFrame);
+ m_frame = m_provider->GetCurrentFrame();
if (!m_frame)
return;
@@ -158,7 +154,7 @@ void VideoLayerImpl::willDrawInternal(ResourceProvider* resourceProvider)
DCHECK_EQ(m_frame->visible_rect().y(), 0);
if (m_format == GL_INVALID_VALUE) {
- m_provider->putCurrentFrame(m_webFrame);
+ m_provider->PutCurrentFrame(m_frame);
m_frame = 0;
return;
}
@@ -175,13 +171,13 @@ void VideoLayerImpl::willDrawInternal(ResourceProvider* resourceProvider)
m_format = GL_RGBA;
if (!allocatePlaneData(resourceProvider)) {
- m_provider->putCurrentFrame(m_webFrame);
+ m_provider->PutCurrentFrame(m_frame);
m_frame = 0;
return;
}
if (!copyPlaneData(resourceProvider)) {
- m_provider->putCurrentFrame(m_webFrame);
+ m_provider->PutCurrentFrame(m_frame);
m_frame = 0;
return;
}
@@ -286,7 +282,7 @@ void VideoLayerImpl::didDraw(ResourceProvider* resourceProvider)
m_externalTextureResource = 0;
}
- m_provider->putCurrentFrame(m_webFrame);
+ m_provider->PutCurrentFrame(m_frame);
m_frame = 0;
m_providerLock.Release();
@@ -398,12 +394,12 @@ void VideoLayerImpl::freeUnusedPlaneData(ResourceProvider* resourceProvider)
m_framePlanes[i].freeData(resourceProvider);
}
-void VideoLayerImpl::didReceiveFrame()
+void VideoLayerImpl::DidReceiveFrame()
{
setNeedsRedraw();
}
-void VideoLayerImpl::didUpdateMatrix(const float matrix[16])
+void VideoLayerImpl::DidUpdateMatrix(const float matrix[16])
{
m_streamTextureMatrix = MathUtil::createGfxTransform(
matrix[0], matrix[1], matrix[2], matrix[3],
« no previous file with comments | « cc/video_layer_impl.h ('k') | content/browser/renderer_host/surface_texture_transport_client_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698