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

Unified Diff: ui/ozone/platform/drm/gpu/overlay_plane.h

Issue 1426993003: Ozone: Dont hardcode format to YUV when using Overlay Composition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review fixes Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/ozone/platform/drm/gpu/gbm_buffer_base.cc ('k') | ui/ozone/platform/drm/gpu/overlay_plane.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/drm/gpu/overlay_plane.h
diff --git a/ui/ozone/platform/drm/gpu/overlay_plane.h b/ui/ozone/platform/drm/gpu/overlay_plane.h
index 5f23f574fd781d872eb32e67a0033c5f4ec18452..1666e07d8708533e5be222fc58d3ab1849244af5 100644
--- a/ui/ozone/platform/drm/gpu/overlay_plane.h
+++ b/ui/ozone/platform/drm/gpu/overlay_plane.h
@@ -7,6 +7,7 @@
#include <vector>
+#include "base/bind.h"
#include "base/memory/ref_counted.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/rect_f.h"
@@ -30,6 +31,19 @@ struct OZONE_EXPORT OverlayPlane {
const gfx::Rect& display_bounds,
const gfx::RectF& crop_rect);
+ // This represents a callback function which can handle post processing
+ // operations like scaling, format conversion etc of the buffer bound to this
+ // plane and return the processed buffer.
+ typedef base::Callback<scoped_refptr<ScanoutBuffer>(const gfx::Size& size,
+ uint32_t format)>
+ ProcessBufferCallback;
+ OverlayPlane(const scoped_refptr<ScanoutBuffer>& buffer,
+ int z_order,
+ gfx::OverlayTransform plane_transform,
+ const gfx::Rect& display_bounds,
+ const gfx::RectF& crop_rect,
+ const ProcessBufferCallback& processing_callback);
+
bool operator<(const OverlayPlane& plane) const;
~OverlayPlane();
@@ -42,6 +56,7 @@ struct OZONE_EXPORT OverlayPlane {
gfx::OverlayTransform plane_transform;
gfx::Rect display_bounds;
gfx::RectF crop_rect;
+ ProcessBufferCallback processing_callback;
};
} // namespace ui
« no previous file with comments | « ui/ozone/platform/drm/gpu/gbm_buffer_base.cc ('k') | ui/ozone/platform/drm/gpu/overlay_plane.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698