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

Unified Diff: cc/resources/video_resource_updater.cc

Issue 2678343011: chromeos: decode video into NV12 format instead of RGBA in vaapi decoder (Closed)
Patch Set: decide scanout in runtime Created 3 years, 6 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: cc/resources/video_resource_updater.cc
diff --git a/cc/resources/video_resource_updater.cc b/cc/resources/video_resource_updater.cc
index 2fc54d7561bd212dac06048730a03d6f3389000e..52c3e903becb8baea0870adc442d48a04983db12 100644
--- a/cc/resources/video_resource_updater.cc
+++ b/cc/resources/video_resource_updater.cc
@@ -64,8 +64,12 @@ VideoFrameExternalResources::ResourceType ResourceTypeForVideoFrame(
case media::PIXEL_FORMAT_NV12:
switch (video_frame->mailbox_holder(0).texture_target) {
case GL_TEXTURE_EXTERNAL_OES:
- case GL_TEXTURE_2D:
- return VideoFrameExternalResources::YUV_RESOURCE;
+ case GL_TEXTURE_2D: {
+ bool is_dual_gmb = video_frame->mailbox_holder(1).texture_target ==
+ video_frame->mailbox_holder(0).texture_target;
+ return is_dual_gmb ? VideoFrameExternalResources::YUV_RESOURCE
+ : VideoFrameExternalResources::RGB_RESOURCE;
+ }
case GL_TEXTURE_RECTANGLE_ARB:
return VideoFrameExternalResources::RGB_RESOURCE;
default:
« no previous file with comments | « no previous file | cc/resources/video_resource_updater_unittest.cc » ('j') | ui/ozone/platform/drm/common/drm_util.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698