diff options
author | william.xie <william.xie@intel.com> | 2015-06-26 04:18:33 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-06-26 11:19:11 +0000 |
commit | 3c16245b5b52fc947a9a2765ab038d13b375d5e3 (patch) | |
tree | 99da17417665a4985992b6c4c8c043642822b52f /ui/ozone/public/native_pixmap.h | |
parent | 17fce99eb549c36e92ac2a35312aaf65803290e7 (diff) | |
download | chromium_src-3c16245b5b52fc947a9a2765ab038d13b375d5e3.zip chromium_src-3c16245b5b52fc947a9a2765ab038d13b375d5e3.tar.gz chromium_src-3c16245b5b52fc947a9a2765ab038d13b375d5e3.tar.bz2 |
[Ozone] enable video scaling when playing on overlay
When video playback on overlay, framebuffer needs to be
scaled according to the display size. Considerring overlay
hardware doesn't support scaling well, this CL is target
to enable video scaling by VPP (video post processing unit)
to get video playback working with correct size on overlay.
BUG=499220
TEST=Enable Ozone hardware overlay, play h264 video, zoom webpage, verify that video is scaling along with webpage
Review URL: https://codereview.chromium.org/1156893002
Cr-Commit-Position: refs/heads/master@{#336352}
Diffstat (limited to 'ui/ozone/public/native_pixmap.h')
-rw-r--r-- | ui/ozone/public/native_pixmap.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ui/ozone/public/native_pixmap.h b/ui/ozone/public/native_pixmap.h index a1204f7..0251a12 100644 --- a/ui/ozone/public/native_pixmap.h +++ b/ui/ozone/public/native_pixmap.h @@ -5,6 +5,7 @@ #ifndef UI_OZONE_PUBLIC_NATIVE_PIXMAP_H_ #define UI_OZONE_PUBLIC_NATIVE_PIXMAP_H_ +#include "base/bind.h" #include "base/memory/ref_counted.h" #include "ui/gfx/native_widget_types.h" #include "ui/gfx/overlay_transform.h" @@ -43,6 +44,15 @@ class NativePixmap : public base::RefCountedThreadSafe<NativePixmap> { const gfx::Rect& display_bounds, const gfx::RectF& crop_rect) = 0; + // This represents a callback function pointing to scaling unit like VPP + // to do scaling operations on native pixmap with required size. + typedef base::Callback<scoped_refptr<NativePixmap>(gfx::Size)> + ScalingCallback; + + // Set callback function for the pixmap used for scaling. + virtual void SetScalingCallback(const ScalingCallback& scaling_callback) = 0; + virtual scoped_refptr<NativePixmap> GetScaledPixmap(gfx::Size new_size) = 0; + protected: virtual ~NativePixmap() {} |