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

Unified Diff: cc/layers/video_layer_impl.cc

Issue 14199002: Send hardware video frames with mailboxes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | « no previous file | cc/resources/video_resource_updater.h » ('j') | cc/resources/video_resource_updater.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/video_layer_impl.cc
diff --git a/cc/layers/video_layer_impl.cc b/cc/layers/video_layer_impl.cc
index 1db6856a45b276941a8b63a7a62cc33f654d2b8b..8bc1fa85d574ed74931c9adf241a5b7919023082 100644
--- a/cc/layers/video_layer_impl.cc
+++ b/cc/layers/video_layer_impl.cc
@@ -68,8 +68,6 @@ void VideoLayerImpl::DidBecomeActive() {
provider_client_impl_->set_active_video_layer(this);
}
-static void EmptyCallback(unsigned sync_point, bool lost_resource) {}
-
void VideoLayerImpl::WillDraw(ResourceProvider* resource_provider) {
LayerImpl::WillDraw(resource_provider);
@@ -93,18 +91,8 @@ void VideoLayerImpl::WillDraw(ResourceProvider* resource_provider) {
if (!updater_)
updater_.reset(new VideoResourceUpdater(resource_provider));
- VideoFrameExternalResources external_resources;
- if (frame_->format() == media::VideoFrame::NATIVE_TEXTURE) {
- // TODO(danakj): To make this work for ubercomp, push this code out to
- // WebMediaPlayer and have it set a callback so it knows it can reuse the
- // texture.
- TextureMailbox::ReleaseCallback empty_callback = base::Bind(&EmptyCallback);
- external_resources = updater_->CreateForHardwarePlanes(
- frame_, empty_callback);
- } else {
- external_resources = updater_->CreateForSoftwarePlanes(frame_);
- }
-
+ VideoFrameExternalResources external_resources =
+ updater_->CreateExternalResourcesFromVideoFrame(frame_);
frame_resource_type_ = external_resources.type;
if (external_resources.type ==
« no previous file with comments | « no previous file | cc/resources/video_resource_updater.h » ('j') | cc/resources/video_resource_updater.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698