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

Unified Diff: ui/ozone/platform/dri/hardware_display_controller.h

Issue 371813004: ozone: gbm: Add overlay support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix test code Created 6 years, 5 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/dri/hardware_display_controller.h
diff --git a/ui/ozone/platform/dri/hardware_display_controller.h b/ui/ozone/platform/dri/hardware_display_controller.h
index 472dbd6696de6f7c6303a704780e0e6c89c0c3ab..2e4103728049d508f5f645445ea9c600f0da2cad 100644
--- a/ui/ozone/platform/dri/hardware_display_controller.h
+++ b/ui/ozone/platform/dri/hardware_display_controller.h
@@ -23,6 +23,27 @@ namespace ui {
class ScanoutSurface;
+struct OzoneOverlayPlane {
+ OzoneOverlayPlane(ScanoutSurface* scanout,
+ int z_order,
+ gfx::OverlayTransform plane_transform,
+ const gfx::Rect& display_bounds,
+ const gfx::RectF& crop_rect)
+ : scanout(scanout),
+ z_order(z_order),
+ plane_transform(plane_transform),
+ display_bounds(display_bounds),
+ crop_rect(crop_rect),
+ overlay_plane(0) {}
+
+ ScanoutSurface* scanout;
+ int z_order;
+ gfx::OverlayTransform plane_transform;
+ gfx::Rect display_bounds;
+ gfx::RectF crop_rect;
+ int overlay_plane;
+};
+
// The HDCOz will handle modesettings and scannout operations for hardware
// devices.
//
@@ -114,7 +135,7 @@ class HardwareDisplayController
// called again before the page flip occurrs.
//
// Returns true if the page flip was successfully registered, false otherwise.
- bool SchedulePageFlip();
+ bool SchedulePageFlip(std::vector<OzoneOverlayPlane>* overlays);
dnicoara 2014/07/07 19:17:55 Pass by const reference.
achaulk 2014/07/07 20:18:05 The contents are modified, or will be anyway once
// TODO(dnicoara) This should be on the MessageLoop when Ozone can have
// BeginFrame can be triggered explicitly by Ozone.
@@ -138,6 +159,12 @@ class HardwareDisplayController
// Moves the hardware cursor to |location|.
bool MoveCursor(const gfx::Point& location);
+ bool ScheduleOverlayPlane(int plane_z_order,
dnicoara 2014/07/07 19:17:55 Please delete. This isn't used or defined anywhere
achaulk 2014/07/07 20:18:04 Done.
+ gfx::OverlayTransform plane_transform,
+ ScanoutSurface* scanout,
+ const gfx::Rect& display_bounds,
+ const gfx::RectF& crop_rect);
+
const drmModeModeInfo& get_mode() const { return mode_; };
uint32_t connector_id() const { return connector_id_; }
uint32_t crtc_id() const { return crtc_id_; }
@@ -150,6 +177,10 @@ class HardwareDisplayController
};
private:
+ // Assign overlay IDs to each overlay in the list, returning the primary
+ // plane's surface (z-index 0, or surface_.get()).
+ ScanoutSurface* AssignOverlayPlanes(std::vector<OzoneOverlayPlane>* overlays);
+
// Object containing the connection to the graphics device and wraps the API
// calls to control it.
DriWrapper* drm_;

Powered by Google App Engine
This is Rietveld 408576698