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

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: Remove obsolete code 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
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..6772b184e699acd457a500b33ef669b0afebc1e5 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 copy |source_buffer| to
+ // |target_buffer| and while doing so handle any post-processing operations
+ // like scaling and color space conversion.
+ typedef base::Callback<bool(const scoped_refptr<ScanoutBuffer>& source_buffer,
+ scoped_refptr<ScanoutBuffer>& target_buffer)>
+ CopyBufferCallback;
+ OverlayPlane(const scoped_refptr<ScanoutBuffer>& buffer,
+ int z_order,
+ gfx::OverlayTransform plane_transform,
+ const gfx::Rect& display_bounds,
+ const gfx::RectF& crop_rect,
+ const CopyBufferCallback& 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;
+ CopyBufferCallback processing_callback;
};
} // namespace ui

Powered by Google App Engine
This is Rietveld 408576698