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

Unified Diff: cc/resources/video_resource_updater.cc

Issue 1134643002: Add distinction between RGB and RGBA native texture video frames and resources (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unit test breakage from bad merge Created 5 years, 7 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 1cabb97f45b8fb62904137ca6eb286a77d90755e..06fb6929c9589c7ffa2cef9ac4951c0e142233a2 100644
--- a/cc/resources/video_resource_updater.cc
+++ b/cc/resources/video_resource_updater.cc
@@ -411,10 +411,15 @@ VideoFrameExternalResources VideoResourceUpdater::CreateForHardwarePlanes(
VideoFrameExternalResources external_resources;
switch (video_frame->texture_format()) {
case media::VideoFrame::TEXTURE_RGBA:
+ case media::VideoFrame::TEXTURE_RGB:
DCHECK_EQ(1u, textures);
switch (video_frame->mailbox_holder(0).texture_target) {
case GL_TEXTURE_2D:
- external_resources.type = VideoFrameExternalResources::RGB_RESOURCE;
+ if (video_frame->texture_format() == media::VideoFrame::TEXTURE_RGB)
+ external_resources.type = VideoFrameExternalResources::RGB_RESOURCE;
+ else
+ external_resources.type =
+ VideoFrameExternalResources::RGBA_RESOURCE;
break;
case GL_TEXTURE_EXTERNAL_OES:
external_resources.type =
« 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