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

Side by Side Diff: content/renderer/media/renderer_gpu_video_accelerator_factories.cc

Issue 1684123003: Revert of Enable NV12 VideoFrames on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « no previous file | media/video/gpu_memory_buffer_video_frame_pool.cc » ('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 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 "content/renderer/media/renderer_gpu_video_accelerator_factories.h" 5 #include "content/renderer/media/renderer_gpu_video_accelerator_factories.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 "base/bind.h" 10 #include "base/bind.h"
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 return image_texture_targets_[static_cast<int>(format)]; 218 return image_texture_targets_[static_cast<int>(format)];
219 } 219 }
220 220
221 media::VideoPixelFormat 221 media::VideoPixelFormat
222 RendererGpuVideoAcceleratorFactories::VideoFrameOutputFormat() { 222 RendererGpuVideoAcceleratorFactories::VideoFrameOutputFormat() {
223 DCHECK(task_runner_->BelongsToCurrentThread()); 223 DCHECK(task_runner_->BelongsToCurrentThread());
224 if (CheckContextLost()) 224 if (CheckContextLost())
225 return media::PIXEL_FORMAT_UNKNOWN; 225 return media::PIXEL_FORMAT_UNKNOWN;
226 cc::ContextProvider::ScopedContextLock lock(context_provider_); 226 cc::ContextProvider::ScopedContextLock lock(context_provider_);
227 auto capabilities = context_provider_->ContextCapabilities(); 227 auto capabilities = context_provider_->ContextCapabilities();
228 if (capabilities.gpu.image_ycbcr_420v)
229 return media::PIXEL_FORMAT_NV12;
230 if (capabilities.gpu.image_ycbcr_422) 228 if (capabilities.gpu.image_ycbcr_422)
231 return media::PIXEL_FORMAT_UYVY; 229 return media::PIXEL_FORMAT_UYVY;
232 if (capabilities.gpu.texture_rg) 230 if (capabilities.gpu.texture_rg)
233 return media::PIXEL_FORMAT_I420; 231 return media::PIXEL_FORMAT_I420;
234 return media::PIXEL_FORMAT_UNKNOWN; 232 return media::PIXEL_FORMAT_UNKNOWN;
235 } 233 }
236 234
237 namespace { 235 namespace {
238 class ScopedGLContextLockImpl 236 class ScopedGLContextLockImpl
239 : public media::GpuVideoAcceleratorFactories::ScopedGLContextLock { 237 : public media::GpuVideoAcceleratorFactories::ScopedGLContextLock {
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 context_provider_refptr_ = nullptr; 287 context_provider_refptr_ = nullptr;
290 } 288 }
291 289
292 scoped_refptr<ContextProviderCommandBuffer> 290 scoped_refptr<ContextProviderCommandBuffer>
293 RendererGpuVideoAcceleratorFactories::ContextProviderMainThread() { 291 RendererGpuVideoAcceleratorFactories::ContextProviderMainThread() {
294 DCHECK(main_thread_task_runner_->BelongsToCurrentThread()); 292 DCHECK(main_thread_task_runner_->BelongsToCurrentThread());
295 return context_provider_refptr_; 293 return context_provider_refptr_;
296 } 294 }
297 295
298 } // namespace content 296 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | media/video/gpu_memory_buffer_video_frame_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698