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

Unified Diff: content/common/gpu/media/vaapi_drm_picture.h

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_drm_picture.h
diff --git a/content/common/gpu/media/vaapi_drm_picture.h b/content/common/gpu/media/vaapi_drm_picture.h
index 4ea787fbcff4738a6799907b4559a3badd5b300c..283cf9049f9760c19cef4ef4a75300ad20b08730 100644
--- a/content/common/gpu/media/vaapi_drm_picture.h
+++ b/content/common/gpu/media/vaapi_drm_picture.h
@@ -13,6 +13,7 @@
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "content/common/gpu/media/vaapi_picture.h"
+#include "ui/gfx/buffer_types.h"
#include "ui/gfx/geometry/size.h"
namespace gl {
@@ -47,17 +48,21 @@ class VaapiDrmPicture : public VaapiPicture {
bool AllowOverlay() const override;
private:
- // Calls ScalePixmap() if weak_ptr is not NULL.
- static scoped_refptr<ui::NativePixmap> CallScalePixmap(
+ // Calls ProcessPixmap() if weak_ptr is not NULL.
+ static scoped_refptr<ui::NativePixmap> CallProcessPixmap(
base::WeakPtr<VaapiDrmPicture> weak_ptr,
- gfx::Size new_size);
- // Use VPP to scale underlying pixmap_ to |new_size| and return the
- // scaling result with a new pixmap.
- scoped_refptr<ui::NativePixmap> ScalePixmap(gfx::Size new_size);
+ gfx::Size target_size,
+ gfx::BufferFormat target_format);
+ // Use VPP to process underlying pixmap_, scaling to |target_size| and
+ // converting to |target_format|
+ scoped_refptr<ui::NativePixmap> ProcessPixmap(
+ gfx::Size target_size,
+ gfx::BufferFormat target_format);
scoped_refptr<VASurface> CreateVASurfaceForPixmap(
scoped_refptr<ui::NativePixmap> pixmap,
gfx::Size pixmap_size);
- scoped_refptr<ui::NativePixmap> CreateNativePixmap(gfx::Size size);
+ scoped_refptr<ui::NativePixmap> CreateNativePixmap(gfx::Size size,
+ gfx::BufferFormat format);
VaapiWrapper* vaapi_wrapper_; // Not owned.
base::Callback<bool(void)> make_context_current_;
@@ -65,8 +70,8 @@ class VaapiDrmPicture : public VaapiPicture {
// Ozone buffer, the storage of the EGLImage and the VASurface.
scoped_refptr<ui::NativePixmap> pixmap_;
- // Ozone buffer, the storage of the scaled buffer for overlay.
- scoped_refptr<ui::NativePixmap> scaled_pixmap_;
+ // Ozone buffer, the storage of the processed buffer for overlay.
+ scoped_refptr<ui::NativePixmap> processed_pixmap_;
// EGLImage bound to the GL textures used by the VDA client.
scoped_refptr<gl::GLImage> gl_image_;
@@ -74,8 +79,8 @@ class VaapiDrmPicture : public VaapiPicture {
// VASurface used to transfer from the decoder's pixel format.
scoped_refptr<VASurface> va_surface_;
- // VaSurface used to apply scaling.
- scoped_refptr<VASurface> scaled_va_surface_;
+ // VaSurface used to apply processing.
+ scoped_refptr<VASurface> processed_va_surface_;
// The WeakPtrFactory for VaapiDrmPicture.
base::WeakPtrFactory<VaapiDrmPicture> weak_this_factory_;

Powered by Google App Engine
This is Rietveld 408576698