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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « cc/output/shader.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/resources/video_resource_updater.h" 5 #include "cc/resources/video_resource_updater.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 return VideoFrameExternalResources::IO_SURFACE; 54 return VideoFrameExternalResources::IO_SURFACE;
55 default: 55 default:
56 NOTREACHED(); 56 NOTREACHED();
57 break; 57 break;
58 } 58 }
59 break; 59 break;
60 case media::PIXEL_FORMAT_I420: 60 case media::PIXEL_FORMAT_I420:
61 return VideoFrameExternalResources::YUV_RESOURCE; 61 return VideoFrameExternalResources::YUV_RESOURCE;
62 break; 62 break;
63 case media::PIXEL_FORMAT_NV12: 63 case media::PIXEL_FORMAT_NV12:
64 DCHECK_EQ(static_cast<uint32_t>(GL_TEXTURE_RECTANGLE_ARB), 64 switch (video_frame->mailbox_holder(0).texture_target) {
65 video_frame->mailbox_holder(0).texture_target); 65 case GL_TEXTURE_EXTERNAL_OES:
66 return VideoFrameExternalResources::IO_SURFACE; 66 return VideoFrameExternalResources::YUV_RESOURCE;
67 case GL_TEXTURE_RECTANGLE_ARB:
68 return VideoFrameExternalResources::IO_SURFACE;
69 default:
70 NOTREACHED();
71 break;
72 }
67 break; 73 break;
68 case media::PIXEL_FORMAT_YV12: 74 case media::PIXEL_FORMAT_YV12:
69 case media::PIXEL_FORMAT_YV16: 75 case media::PIXEL_FORMAT_YV16:
70 case media::PIXEL_FORMAT_YV24: 76 case media::PIXEL_FORMAT_YV24:
71 case media::PIXEL_FORMAT_YV12A: 77 case media::PIXEL_FORMAT_YV12A:
72 case media::PIXEL_FORMAT_NV21: 78 case media::PIXEL_FORMAT_NV21:
73 case media::PIXEL_FORMAT_YUY2: 79 case media::PIXEL_FORMAT_YUY2:
74 case media::PIXEL_FORMAT_RGB24: 80 case media::PIXEL_FORMAT_RGB24:
75 case media::PIXEL_FORMAT_RGB32: 81 case media::PIXEL_FORMAT_RGB32:
76 case media::PIXEL_FORMAT_MJPEG: 82 case media::PIXEL_FORMAT_MJPEG:
(...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 plane_resource.plane_index == 0; 763 plane_resource.plane_index == 0;
758 }); 764 });
759 if (resource_it == updater->all_resources_.end()) 765 if (resource_it == updater->all_resources_.end())
760 return; 766 return;
761 767
762 resource_it->destructed = true; 768 resource_it->destructed = true;
763 } 769 }
764 #endif 770 #endif
765 771
766 } // namespace cc 772 } // namespace cc
OLDNEW
« 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