| Index: ui/gfx/ozone/dri/dri_wrapper.cc
|
| diff --git a/ui/gfx/ozone/dri/dri_wrapper.cc b/ui/gfx/ozone/dri/dri_wrapper.cc
|
| index 2b1104b444d9310ecdc6d283b3eff635b2d186bc..55c8b713e172022544d6fc745059d1f8f9458785 100644
|
| --- a/ui/gfx/ozone/dri/dri_wrapper.cc
|
| +++ b/ui/gfx/ozone/dri/dri_wrapper.cc
|
| @@ -73,14 +73,39 @@ bool DriWrapper::RemoveFramebuffer(uint32_t framebuffer) {
|
| }
|
|
|
| bool DriWrapper::PageFlip(uint32_t crtc_id,
|
| - uint32_t framebuffer,
|
| - void* data) {
|
| + uint32_t framebuffer,
|
| + gfx::Rect overlay_plane_rect,
|
| + gfx::Size overlay_plane_size,
|
| + uint32_t overlay_plane_fb_id,
|
| + int overlay_plane,
|
| + void* data) {
|
| CHECK(fd_ >= 0);
|
| - return !drmModePageFlip(fd_,
|
| - crtc_id,
|
| - framebuffer,
|
| - DRM_MODE_PAGE_FLIP_EVENT,
|
| - data);
|
| +
|
| + drmModePageFlip(fd_, crtc_id, framebuffer, DRM_MODE_PAGE_FLIP_EVENT, data);
|
| +
|
| + if (overlay_plane_fb_id) {
|
| + int rc = drmModeSetPlane(fd_,
|
| + overlay_plane,
|
| + crtc_id,
|
| + overlay_plane_fb_id,
|
| + 0,
|
| + overlay_plane_rect.x(),
|
| + overlay_plane_rect.y(),
|
| + overlay_plane_rect.width(),
|
| + overlay_plane_rect.height(),
|
| + 0,
|
| + 0,
|
| + overlay_plane_size.width() << 16,
|
| + overlay_plane_size.height() << 16);
|
| +
|
| + if (rc) {
|
| + char buffer[512];
|
| + sprintf(buffer, "failed to set overlay: %s\n", strerror(-rc));
|
| + LOG(ERROR) << buffer;
|
| + }
|
| + }
|
| +
|
| + return true;
|
| }
|
|
|
| bool DriWrapper::ConnectorSetProperty(uint32_t connector_id,
|
|
|