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

Unified Diff: cc/resources/video_resource_updater.cc

Issue 2508203004: Add hints for potential overlay promotion on android. (Closed)
Patch Set: rebased Created 4 years 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/resources/transferable_resource.cc ('k') | cc/surfaces/surface_aggregator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/video_resource_updater.cc
diff --git a/cc/resources/video_resource_updater.cc b/cc/resources/video_resource_updater.cc
index 2ea3f4691eaeee32cbf94f12bde5951088415aeb..115486440f5e8388daae87f93d7781ba3b3131e3 100644
--- a/cc/resources/video_resource_updater.cc
+++ b/cc/resources/video_resource_updater.cc
@@ -768,6 +768,12 @@ VideoFrameExternalResources VideoResourceUpdater::CreateForHardwarePlanes(
media::VideoFrameMetadata::ALLOW_OVERLAY),
false);
mailbox.set_color_space(video_frame->ColorSpace());
+#if defined(OS_ANDROID)
+ mailbox.set_is_backed_by_surface_texture(video_frame->metadata()->IsTrue(
+ media::VideoFrameMetadata::SURFACE_TEXTURE));
+ mailbox.set_wants_promotion_hint(video_frame->metadata()->IsTrue(
+ media::VideoFrameMetadata::WANTS_PROMOTION_HINT));
+#endif
external_resources.mailboxes.push_back(mailbox);
external_resources.release_callbacks.push_back(
base::Bind(&ReturnTexture, AsWeakPtr(), video_frame));
« no previous file with comments | « cc/resources/transferable_resource.cc ('k') | cc/surfaces/surface_aggregator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698