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

Unified Diff: cc/resources/video_resource_updater.cc

Issue 1947333002: Add support for GL_TEXTURE_EXTERNAL_OES NV12 textures in cc/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/output/shader.cc ('k') | no next file » | 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 e77cd7505af1c58cecfbfe1f07bb0d32f9641a01..b44cfc75eaba11427703046ef3ece2294478e748 100644
--- a/cc/resources/video_resource_updater.cc
+++ b/cc/resources/video_resource_updater.cc
@@ -61,9 +61,15 @@ VideoFrameExternalResources::ResourceType ResourceTypeForVideoFrame(
return VideoFrameExternalResources::YUV_RESOURCE;
break;
case media::PIXEL_FORMAT_NV12:
- DCHECK_EQ(static_cast<uint32_t>(GL_TEXTURE_RECTANGLE_ARB),
- video_frame->mailbox_holder(0).texture_target);
- return VideoFrameExternalResources::IO_SURFACE;
+ switch (video_frame->mailbox_holder(0).texture_target) {
+ case GL_TEXTURE_EXTERNAL_OES:
+ return VideoFrameExternalResources::YUV_RESOURCE;
+ case GL_TEXTURE_RECTANGLE_ARB:
+ return VideoFrameExternalResources::IO_SURFACE;
+ default:
+ NOTREACHED();
+ break;
+ }
break;
case media::PIXEL_FORMAT_YV12:
case media::PIXEL_FORMAT_YV16:
« no previous file with comments | « cc/output/shader.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698