| Index: ui/gfx/ozone/dri/hardware_display_controller.h
|
| diff --git a/ui/gfx/ozone/dri/hardware_display_controller.h b/ui/gfx/ozone/dri/hardware_display_controller.h
|
| index cae8a6ba821f49dc4cdfd23e7f562ae9851b34a9..0a15183e89c9d32b7811116401a15461495d99a7 100644
|
| --- a/ui/gfx/ozone/dri/hardware_display_controller.h
|
| +++ b/ui/gfx/ozone/dri/hardware_display_controller.h
|
| @@ -14,10 +14,12 @@
|
| #include "base/memory/scoped_ptr.h"
|
| #include "ui/gfx/gfx_export.h"
|
| #include "ui/gfx/ozone/dri/dri_wrapper.h"
|
| +#include "ui/gfx/rect.h"
|
| +#include "ui/gfx/size.h"
|
|
|
| namespace gfx {
|
|
|
| -class DriSurface;
|
| +class ScanoutSurface;
|
|
|
| // The HDCOz will handle modesettings and scannout operations for hardware
|
| // devices.
|
| @@ -115,7 +117,20 @@ class GFX_EXPORT HardwareDisplayController {
|
| drmModeModeInfo mode);
|
|
|
| // Associate the HDCO with a surface implementation and initialize it.
|
| - bool BindSurfaceToController(scoped_ptr<DriSurface> surface);
|
| + bool BindSurfaceToController(scoped_ptr<ScanoutSurface> surface);
|
| +
|
| + // Register the framebuffer with handle |handle| with the CRTC. On successful
|
| + // registration an ID will be associated with it. The ID will be stored in
|
| + // |framebuffer_id|. The ID will be used when the HDCO will scan out the
|
| + // framebuffer.
|
| + bool AddFramebuffer(uint8_t depth,
|
| + uint8_t bpp,
|
| + uint32_t stride,
|
| + uint32_t handle,
|
| + uint32_t* framebuffer_id);
|
| +
|
| + // Remove the association for the framebuffer with ID |framebuffer_id|.
|
| + bool RemoveFramebuffer(uint32_t framebuffer_id);
|
|
|
| // Schedules the |surface_|'s framebuffer to be displayed on the next vsync
|
| // event. The event will be posted on the graphics card file descriptor |fd_|
|
| @@ -145,13 +160,17 @@ class GFX_EXPORT HardwareDisplayController {
|
| unsigned int seconds,
|
| unsigned int useconds);
|
|
|
| + void SetOverlayPlaneInfo(gfx::Rect overlay_plane_rect,
|
| + gfx::Size overlay_plane_size,
|
| + unsigned overlay_plane_fb_id);
|
| +
|
| State get_state() const { return state_; };
|
|
|
| int get_fd() const { return drm_->get_fd(); };
|
|
|
| const drmModeModeInfo& get_mode() const { return mode_; };
|
|
|
| - DriSurface* get_surface() const { return surface_.get(); };
|
| + ScanoutSurface* get_surface() const { return surface_.get(); };
|
|
|
| uint64_t get_time_of_last_flip() const {
|
| return time_of_last_flip_;
|
| @@ -178,10 +197,15 @@ class GFX_EXPORT HardwareDisplayController {
|
|
|
| State state_;
|
|
|
| - scoped_ptr<DriSurface> surface_;
|
| + scoped_ptr<ScanoutSurface> surface_;
|
|
|
| uint64_t time_of_last_flip_;
|
|
|
| + gfx::Rect overlay_plane_rect_;
|
| + gfx::Size overlay_plane_size_;
|
| + unsigned overlay_plane_fb_id_;
|
| + int overlay_plane_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(HardwareDisplayController);
|
| };
|
|
|
|
|