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

Side by Side Diff: media/gpu/vaapi_drm_picture.cc

Issue 2636433003: [NotForReview] Enable YUV video overlay on Skylake ChromeOS.
Patch Set: Created 3 years, 11 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 | « media/filters/gpu_video_decoder.cc ('k') | media/gpu/vaapi_video_decode_accelerator.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "base/file_descriptor_posix.h" 5 #include "base/file_descriptor_posix.h"
6 #include "media/gpu/va_surface.h" 6 #include "media/gpu/va_surface.h"
7 #include "media/gpu/vaapi_drm_picture.h" 7 #include "media/gpu/vaapi_drm_picture.h"
8 #include "media/gpu/vaapi_wrapper.h" 8 #include "media/gpu/vaapi_wrapper.h"
9 #include "third_party/libva/va/drm/va_drm.h" 9 #include "third_party/libva/va/drm/va_drm.h"
10 #include "third_party/libva/va/va.h" 10 #include "third_party/libva/va/va.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 } 42 }
43 43
44 static unsigned BufferFormatToInternalFormat(gfx::BufferFormat format) { 44 static unsigned BufferFormatToInternalFormat(gfx::BufferFormat format) {
45 switch (format) { 45 switch (format) {
46 case gfx::BufferFormat::BGRA_8888: 46 case gfx::BufferFormat::BGRA_8888:
47 return GL_BGRA_EXT; 47 return GL_BGRA_EXT;
48 48
49 case gfx::BufferFormat::YVU_420: 49 case gfx::BufferFormat::YVU_420:
50 return GL_RGB_YCRCB_420_CHROMIUM; 50 return GL_RGB_YCRCB_420_CHROMIUM;
51 51
52 case gfx::BufferFormat::UYVY_422:
53 case gfx::BufferFormat::YUYV_422:
54 return GL_RGB_YCBCR_422_CHROMIUM;
55
52 default: 56 default:
53 NOTREACHED(); 57 NOTREACHED();
54 return GL_BGRA_EXT; 58 return GL_BGRA_EXT;
55 } 59 }
56 } 60 }
57 61
58 bool VaapiDrmPicture::Initialize() { 62 bool VaapiDrmPicture::Initialize() {
59 DCHECK(pixmap_); 63 DCHECK(pixmap_);
60 64
61 va_surface_ = vaapi_wrapper_->CreateVASurfaceForPixmap(pixmap_); 65 va_surface_ = vaapi_wrapper_->CreateVASurfaceForPixmap(pixmap_);
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 bool VaapiDrmPicture::DownloadFromSurface( 138 bool VaapiDrmPicture::DownloadFromSurface(
135 const scoped_refptr<VASurface>& va_surface) { 139 const scoped_refptr<VASurface>& va_surface) {
136 return vaapi_wrapper_->BlitSurface(va_surface, va_surface_); 140 return vaapi_wrapper_->BlitSurface(va_surface, va_surface_);
137 } 141 }
138 142
139 bool VaapiDrmPicture::AllowOverlay() const { 143 bool VaapiDrmPicture::AllowOverlay() const {
140 return true; 144 return true;
141 } 145 }
142 146
143 } // namespace media 147 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/gpu_video_decoder.cc ('k') | media/gpu/vaapi_video_decode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698