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

Side by Side Diff: media/video/gpu_memory_buffer_video_frame_pool.cc

Issue 1708263002: gpu: Expose internal format R8 instead of RED. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert to 'Address reveman's comments'. Created 4 years, 10 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 | « gpu/command_buffer/tests/gl_gpu_memory_buffer_unittest.cc ('k') | ui/gl/gl_image_io_surface.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "media/video/gpu_memory_buffer_video_frame_pool.h" 5 #include "media/video/gpu_memory_buffer_video_frame_pool.h"
6 6
7 #include <GLES2/gl2.h> 7 #include <GLES2/gl2.h>
8 #include <GLES2/gl2ext.h> 8 #include <GLES2/gl2ext.h>
9 #include <stddef.h> 9 #include <stddef.h>
10 #include <stdint.h> 10 #include <stdint.h>
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 default: 192 default:
193 NOTREACHED(); 193 NOTREACHED();
194 return gfx::BufferFormat::BGRA_8888; 194 return gfx::BufferFormat::BGRA_8888;
195 } 195 }
196 } 196 }
197 197
198 unsigned ImageInternalFormat(VideoPixelFormat format, size_t plane) { 198 unsigned ImageInternalFormat(VideoPixelFormat format, size_t plane) {
199 switch (format) { 199 switch (format) {
200 case PIXEL_FORMAT_I420: 200 case PIXEL_FORMAT_I420:
201 DCHECK_LE(plane, 2u); 201 DCHECK_LE(plane, 2u);
202 return GL_RED_EXT; 202 return GL_R8_EXT;
203 case PIXEL_FORMAT_NV12: 203 case PIXEL_FORMAT_NV12:
204 DCHECK_LE(plane, 1u); 204 DCHECK_LE(plane, 1u);
205 return GL_RGB_YCBCR_420V_CHROMIUM; 205 return GL_RGB_YCBCR_420V_CHROMIUM;
206 case PIXEL_FORMAT_UYVY: 206 case PIXEL_FORMAT_UYVY:
207 DCHECK_EQ(0u, plane); 207 DCHECK_EQ(0u, plane);
208 return GL_RGB_YCBCR_422_CHROMIUM; 208 return GL_RGB_YCBCR_422_CHROMIUM;
209 default: 209 default:
210 NOTREACHED(); 210 NOTREACHED();
211 return 0; 211 return 0;
212 } 212 }
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
774 } 774 }
775 775
776 void GpuMemoryBufferVideoFramePool::MaybeCreateHardwareFrame( 776 void GpuMemoryBufferVideoFramePool::MaybeCreateHardwareFrame(
777 const scoped_refptr<VideoFrame>& video_frame, 777 const scoped_refptr<VideoFrame>& video_frame,
778 const FrameReadyCB& frame_ready_cb) { 778 const FrameReadyCB& frame_ready_cb) {
779 DCHECK(video_frame); 779 DCHECK(video_frame);
780 pool_impl_->CreateHardwareFrame(video_frame, frame_ready_cb); 780 pool_impl_->CreateHardwareFrame(video_frame, frame_ready_cb);
781 } 781 }
782 782
783 } // namespace media 783 } // namespace media
OLDNEW
« no previous file with comments | « gpu/command_buffer/tests/gl_gpu_memory_buffer_unittest.cc ('k') | ui/gl/gl_image_io_surface.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698