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

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

Issue 1434453008: cc: Fix R_8 GpuMemoryBuffers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove GetResourceTextureTarget Created 5 years, 1 month 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 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 default: 176 default:
177 NOTREACHED(); 177 NOTREACHED();
178 return gfx::BufferFormat::BGRA_8888; 178 return gfx::BufferFormat::BGRA_8888;
179 } 179 }
180 } 180 }
181 181
182 unsigned ImageInternalFormat(VideoPixelFormat format, size_t plane) { 182 unsigned ImageInternalFormat(VideoPixelFormat format, size_t plane) {
183 switch (format) { 183 switch (format) {
184 case PIXEL_FORMAT_I420: 184 case PIXEL_FORMAT_I420:
185 DCHECK_LE(plane, 2u); 185 DCHECK_LE(plane, 2u);
186 return GL_R8_EXT; 186 return GL_RED_EXT;
187 case PIXEL_FORMAT_NV12: 187 case PIXEL_FORMAT_NV12:
188 DCHECK_LE(plane, 1u); 188 DCHECK_LE(plane, 1u);
189 DLOG(WARNING) << "NV12 format not supported yet"; 189 DLOG(WARNING) << "NV12 format not supported yet";
190 return 0; // TODO(andresantoso): Implement extension for NV12. 190 return 0; // TODO(andresantoso): Implement extension for NV12.
191 case PIXEL_FORMAT_UYVY: 191 case PIXEL_FORMAT_UYVY:
192 DCHECK_EQ(0u, plane); 192 DCHECK_EQ(0u, plane);
193 return GL_RGB_YCBCR_422_CHROMIUM; 193 return GL_RGB_YCBCR_422_CHROMIUM;
194 default: 194 default:
195 NOTREACHED(); 195 NOTREACHED();
196 return 0; 196 return 0;
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
738 } 738 }
739 739
740 void GpuMemoryBufferVideoFramePool::MaybeCreateHardwareFrame( 740 void GpuMemoryBufferVideoFramePool::MaybeCreateHardwareFrame(
741 const scoped_refptr<VideoFrame>& video_frame, 741 const scoped_refptr<VideoFrame>& video_frame,
742 const FrameReadyCB& frame_ready_cb) { 742 const FrameReadyCB& frame_ready_cb) {
743 DCHECK(video_frame); 743 DCHECK(video_frame);
744 pool_impl_->CreateHardwareFrame(video_frame, frame_ready_cb); 744 pool_impl_->CreateHardwareFrame(video_frame, frame_ready_cb);
745 } 745 }
746 746
747 } // namespace media 747 } // 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