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

Unified Diff: cc/resources/video_resource_updater.cc

Issue 2684993005: (NotForReview) Enable YUV video overlay on Skylake ChromeOS.
Patch Set: rebase to ToT (Mar/27) Created 3 years, 9 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/resources/video_resource_updater.h ('k') | cc/resources/video_resource_updater_unittest.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 fa01b03ad49ad1accbbd3ab44f8d0f2e6ff266e3..dead771b178d12e83e6d8f4b95e5ccfe094224df 100644
--- a/cc/resources/video_resource_updater.cc
+++ b/cc/resources/video_resource_updater.cc
@@ -40,9 +40,10 @@ VideoFrameExternalResources::ResourceType ResourceTypeForVideoFrame(
case media::PIXEL_FORMAT_ARGB:
case media::PIXEL_FORMAT_XRGB:
case media::PIXEL_FORMAT_UYVY:
+ case media::PIXEL_FORMAT_YUY2:
switch (video_frame->mailbox_holder(0).texture_target) {
case GL_TEXTURE_2D:
- return (video_frame->format() == media::PIXEL_FORMAT_XRGB)
+ return (video_frame->format() != media::PIXEL_FORMAT_ARGB)
? VideoFrameExternalResources::RGB_RESOURCE
: VideoFrameExternalResources::RGBA_PREMULTIPLIED_RESOURCE;
case GL_TEXTURE_EXTERNAL_OES:
@@ -77,7 +78,6 @@ VideoFrameExternalResources::ResourceType ResourceTypeForVideoFrame(
case media::PIXEL_FORMAT_YV24:
case media::PIXEL_FORMAT_YV12A:
case media::PIXEL_FORMAT_NV21:
- case media::PIXEL_FORMAT_YUY2:
case media::PIXEL_FORMAT_RGB24:
case media::PIXEL_FORMAT_RGB32:
case media::PIXEL_FORMAT_MJPEG:
@@ -161,6 +161,7 @@ void VideoResourceUpdater::PlaneResource::SetUniqueId(int unique_frame_id,
VideoFrameExternalResources::VideoFrameExternalResources()
: type(NONE),
+ pixel_format(media::PIXEL_FORMAT_UNKNOWN),
read_lock_fences_enabled(false),
offset(0.0f),
multiplier(1.0f),
@@ -378,6 +379,7 @@ VideoFrameExternalResources VideoResourceUpdater::CreateForSoftwarePlanes(
VideoFrameExternalResources external_resources;
+ external_resources.pixel_format = video_frame->format();
external_resources.bits_per_channel = bits_per_channel;
if (software_compositor || texture_needs_rgb_conversion) {
@@ -620,6 +622,7 @@ VideoFrameExternalResources VideoResourceUpdater::CreateForHardwarePlanes(
return VideoFrameExternalResources();
VideoFrameExternalResources external_resources;
+ external_resources.pixel_format = video_frame->format();
if (video_frame->metadata()->IsTrue(
media::VideoFrameMetadata::READ_LOCK_FENCES_ENABLED)) {
external_resources.read_lock_fences_enabled = true;
« no previous file with comments | « cc/resources/video_resource_updater.h ('k') | cc/resources/video_resource_updater_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698