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

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: 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
Index: cc/resources/video_resource_updater.cc
diff --git a/cc/resources/video_resource_updater.cc b/cc/resources/video_resource_updater.cc
index dea3176c43d65f9e59193049b459298e25c51f24..51dc819d3e82934942bdec3bdca092517510eb36 100644
--- a/cc/resources/video_resource_updater.cc
+++ b/cc/resources/video_resource_updater.cc
@@ -412,7 +412,10 @@ VideoFrameExternalResources VideoResourceUpdater::CreateForHardwarePlanes(
VideoFrameExternalResources external_resources;
switch (mailbox_holder->texture_target) {
case GL_TEXTURE_2D:
- external_resources.type = VideoFrameExternalResources::RGB_RESOURCE;
+ if (video_frame->has_alpha())
+ external_resources.type = VideoFrameExternalResources::RGBA_RESOURCE;
+ else
+ external_resources.type = VideoFrameExternalResources::RGB_RESOURCE;
break;
case GL_TEXTURE_EXTERNAL_OES:
external_resources.type =

Powered by Google App Engine
This is Rietveld 408576698