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

Unified Diff: content/common/gpu/media/vaapi_wrapper.cc

Issue 1422563002: [Ozone] Enables overlay render format setting path and by default use UYVY (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: content/common/gpu/media/vaapi_wrapper.cc
diff --git a/content/common/gpu/media/vaapi_wrapper.cc b/content/common/gpu/media/vaapi_wrapper.cc
index b08aa039d209f913c59b041cef80c57726479e91..8b1ee6c8c00f848d911a37d322452715d0745b75 100644
--- a/content/common/gpu/media/vaapi_wrapper.cc
+++ b/content/common/gpu/media/vaapi_wrapper.cc
@@ -114,8 +114,12 @@ static std::vector<VAConfigAttrib> GetRequiredAttribs(
VASurface::VASurface(VASurfaceID va_surface_id,
const gfx::Size& size,
+ const unsigned int format,
const ReleaseCB& release_cb)
- : va_surface_id_(va_surface_id), size_(size), release_cb_(release_cb) {
+ : va_surface_id_(va_surface_id),
+ size_(size),
+ format_(format),
+ release_cb_(release_cb) {
DCHECK(!release_cb_.is_null());
}
@@ -124,7 +128,8 @@ VASurface::~VASurface() {
}
VaapiWrapper::VaapiWrapper()
- : va_display_(NULL),
+ : va_surface_format_(0),
+ va_display_(NULL),
va_config_id_(VA_INVALID_ID),
va_context_id_(VA_INVALID_ID),
va_vpp_config_id_(VA_INVALID_ID),
@@ -512,6 +517,7 @@ bool VaapiWrapper::CreateSurfaces(unsigned int va_format,
DCHECK(va_surfaces->empty());
DCHECK(va_surface_ids_.empty());
Pawel Osciak 2015/11/09 03:52:06 DCHECK_EQ(va_surface_format_, 0);
william.xie1 2015/11/09 04:58:01 Done.
va_surface_ids_.resize(num_surfaces);
+ va_surface_format_ = va_format;
Pawel Osciak 2015/11/09 03:52:06 Please set this at l.546.
william.xie1 2015/11/09 04:58:01 Done.
// Allocate surfaces in driver.
VAStatus va_res =
@@ -579,7 +585,7 @@ scoped_refptr<VASurface> VaapiWrapper::CreateUnownedSurface(
// of the destruction order. All the surfaces will be destroyed
// before VaapiWrapper.
va_surface = new VASurface(
- va_surface_id, size,
+ va_surface_id, size, va_format,
base::Bind(&VaapiWrapper::DestroyUnownedSurface, base::Unretained(this)));
return va_surface;

Powered by Google App Engine
This is Rietveld 408576698