New issue
Advanced search Search tips

Issue 859012 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 7
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Bug

Blocking:
issue 820047



Sign in to add a comment

[ozone/wayland]: enable frame and presentation feedback callbacks.

Project Member Reported by msi...@igalia.com, Jun 29 2018

Issue description

Enable frame and presentation feedback callbacks when wayland/dmabuf approach is used.
 

Comment 1 by msi...@igalia.com, Jun 29 2018

Blocking: 820047
Summary: [ozone/wayland]: enable frame and presentation feedback callbacks. (was: Wayland: enable presentation feedback.)
Description: Show this description
Project Member

Comment 4 by bugdroid1@chromium.org, Aug 16

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0b8963fa7962904f890818d8205ca11981afe2bf

commit 0b8963fa7962904f890818d8205ca11981afe2bf
Author: Maksim Sisov <msisov@igalia.com>
Date: Thu Aug 16 12:40:47 2018

[ozone/wayland] Ensure all the mojo calls happen on gpu main thread.

This cl fixes threading model: the proxy object is created on
a gpu main thread, whereas mojo ptr for a WaylandConnection is
set on a IO child thread. ScheduleSwap is also called on GpuMainThread,
but other methods can be called from IO threads.

To make a consitency, always use GpuMainThread's task runner.
This is also needed for a frame callback, which will be passed during
ScheduleSwap calls in a follow up cl.

Bug:  859012 , 820047
Change-Id: I6833f3722cb4531da375387a7d443c1835f3c870
Reviewed-on: https://chromium-review.googlesource.com/1170827
Commit-Queue: Maksim Sisov <msisov@igalia.com>
Reviewed-by: Robert Kroeger <rjkroege@chromium.org>
Cr-Commit-Position: refs/heads/master@{#583618}
[modify] https://crrev.com/0b8963fa7962904f890818d8205ca11981afe2bf/ui/ozone/platform/wayland/gpu/wayland_connection_proxy.cc
[modify] https://crrev.com/0b8963fa7962904f890818d8205ca11981afe2bf/ui/ozone/platform/wayland/gpu/wayland_connection_proxy.h

Project Member

Comment 5 by bugdroid1@chromium.org, Sep 3

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a7b03c87c16e998d898473350b1065ae37f1a5d2

commit a7b03c87c16e998d898473350b1065ae37f1a5d2
Author: Maksim Sisov <msisov@igalia.com>
Date: Mon Sep 03 10:51:45 2018

[ozone/wayland] Introduce WaylandBufferManager::Buffer instance

The concept is pretty simple here - instead of using many map
structures, just use a single Buffer structure, which will keep all the
neccessary data we need to create/swap/destroy buffers/wl_buffers.

In other words, the Buffer is both representation of dmabuf on the GPU
side and the wl_buffer on the browser side. And it has a direct
association between the |widget| and the dmabuf.

Note that different Buffers can have the same widget they are attached/
being attached/were attached to.

tl:dr;

The Buffer structure holds all the necessary data to create native
wl_buffers now. That is, it holds zwp linux params variable, which is
used for creation of wl_buffers and asynchronous mapping between
the Buffer and the wl_buffer on CreateSucceeded calls.

Also, the Buffer holds associated widget and a buffer_id, which is
to find and attach a wl_buffer to a wl_surface requested by the GPU
process.

In the future, the Buffer is going to keep a gpu callback, which
will hold a swap result and a presentation feedback of the swap request.

There is no functionality change, but I'm just rather improving the
code.

Bug:  859012 , 820047
Change-Id: I7812d10e0a9e7fb472298231a191dfa09701bd2a
Reviewed-on: https://chromium-review.googlesource.com/1193447
Commit-Queue: Maksim Sisov <msisov@igalia.com>
Reviewed-by: Robert Kroeger <rjkroege@chromium.org>
Cr-Commit-Position: refs/heads/master@{#588371}
[modify] https://crrev.com/a7b03c87c16e998d898473350b1065ae37f1a5d2/ui/ozone/platform/wayland/wayland_buffer_manager.cc
[modify] https://crrev.com/a7b03c87c16e998d898473350b1065ae37f1a5d2/ui/ozone/platform/wayland/wayland_buffer_manager.h
[modify] https://crrev.com/a7b03c87c16e998d898473350b1065ae37f1a5d2/ui/ozone/platform/wayland/wayland_connection.cc

Project Member

Comment 6 by bugdroid1@chromium.org, Sep 7

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e3235dc95d2074f03205beaff9a0bea78979a01a

commit e3235dc95d2074f03205beaff9a0bea78979a01a
Author: Maksim Sisov <msisov@igalia.com>
Date: Fri Sep 07 08:04:39 2018

[ozone/wayland] Add frame callback support.

Instead of just assuming buffer is committed, use wayland provided
frame callbacks.

Once the GbmSurfaclessWayland (resides on the GPU process side)
requests to swap buffers from Wayland (the connection is established
on the browser process side), it sends a ScheduleBufferSwap requests
and provides a completion callback, which is then triggered once
Wayland sends a frame callback (setup for each new buffer swap).

This callback is then used to identify if the swap was successful
or not.

Bug:  859012 
Change-Id: I3264db6bb4456ef610d11945199ecddffbc23024
Reviewed-on: https://chromium-review.googlesource.com/1193882
Commit-Queue: Maksim Sisov <msisov@igalia.com>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Robert Kroeger <rjkroege@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#589457}
[modify] https://crrev.com/e3235dc95d2074f03205beaff9a0bea78979a01a/ui/gfx/mojo/BUILD.gn
[add] https://crrev.com/e3235dc95d2074f03205beaff9a0bea78979a01a/ui/gfx/mojo/swap_result.mojom
[add] https://crrev.com/e3235dc95d2074f03205beaff9a0bea78979a01a/ui/gfx/mojo/swap_result.typemap
[add] https://crrev.com/e3235dc95d2074f03205beaff9a0bea78979a01a/ui/gfx/mojo/swap_result_enum_traits.h
[modify] https://crrev.com/e3235dc95d2074f03205beaff9a0bea78979a01a/ui/gfx/typemaps.gni
[modify] https://crrev.com/e3235dc95d2074f03205beaff9a0bea78979a01a/ui/ozone/platform/wayland/gpu/gbm_surfaceless_wayland.cc
[modify] https://crrev.com/e3235dc95d2074f03205beaff9a0bea78979a01a/ui/ozone/platform/wayland/gpu/gbm_surfaceless_wayland.h
[modify] https://crrev.com/e3235dc95d2074f03205beaff9a0bea78979a01a/ui/ozone/platform/wayland/gpu/wayland_connection_proxy.cc
[modify] https://crrev.com/e3235dc95d2074f03205beaff9a0bea78979a01a/ui/ozone/platform/wayland/gpu/wayland_connection_proxy.h
[modify] https://crrev.com/e3235dc95d2074f03205beaff9a0bea78979a01a/ui/ozone/platform/wayland/wayland_buffer_manager.cc
[modify] https://crrev.com/e3235dc95d2074f03205beaff9a0bea78979a01a/ui/ozone/platform/wayland/wayland_buffer_manager.h
[modify] https://crrev.com/e3235dc95d2074f03205beaff9a0bea78979a01a/ui/ozone/platform/wayland/wayland_connection.cc
[modify] https://crrev.com/e3235dc95d2074f03205beaff9a0bea78979a01a/ui/ozone/platform/wayland/wayland_connection.h
[modify] https://crrev.com/e3235dc95d2074f03205beaff9a0bea78979a01a/ui/ozone/platform/wayland/wayland_surface_factory.cc
[modify] https://crrev.com/e3235dc95d2074f03205beaff9a0bea78979a01a/ui/ozone/platform/wayland/wayland_surface_factory.h
[modify] https://crrev.com/e3235dc95d2074f03205beaff9a0bea78979a01a/ui/ozone/platform/wayland/wayland_util.h
[modify] https://crrev.com/e3235dc95d2074f03205beaff9a0bea78979a01a/ui/ozone/public/interfaces/wayland/wayland_connection.mojom

Project Member

Comment 7 by bugdroid1@chromium.org, Sep 7

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4dc2dd0662b1bea139545652a075b0df5e912093

commit 4dc2dd0662b1bea139545652a075b0df5e912093
Author: Maksim Sisov <msisov@igalia.com>
Date: Fri Sep 07 09:04:24 2018

[ozone/wayland] Add presentation feedback support.

Instead of blindly using a fake presentation feedback result,
use the wayland provided one if available. If not, pretend there is
a feedback, but provide a faked one.

In order to provide feedback, the callback, which comes from
the GPU, is stored in the Buffer instance. Although,
both frame and presentation feedback are setup, the frame callback
always comes first. Thus, we store the result and once the
feedback comes, we use the previous swap result and the presentation
feedback to let the GPU know the status of the request.

Bug:  859012 
Change-Id: I4f4628be6101149daa30b6c74f3490254ace0fad
Reviewed-on: https://chromium-review.googlesource.com/1193883
Commit-Queue: Maksim Sisov <msisov@igalia.com>
Reviewed-by: Robert Kroeger <rjkroege@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#589467}
[modify] https://crrev.com/4dc2dd0662b1bea139545652a075b0df5e912093/ui/ozone/platform/wayland/BUILD.gn
[modify] https://crrev.com/4dc2dd0662b1bea139545652a075b0df5e912093/ui/ozone/platform/wayland/gpu/gbm_surfaceless_wayland.cc
[modify] https://crrev.com/4dc2dd0662b1bea139545652a075b0df5e912093/ui/ozone/platform/wayland/gpu/gbm_surfaceless_wayland.h
[modify] https://crrev.com/4dc2dd0662b1bea139545652a075b0df5e912093/ui/ozone/platform/wayland/wayland_buffer_manager.cc
[modify] https://crrev.com/4dc2dd0662b1bea139545652a075b0df5e912093/ui/ozone/platform/wayland/wayland_buffer_manager.h
[modify] https://crrev.com/4dc2dd0662b1bea139545652a075b0df5e912093/ui/ozone/platform/wayland/wayland_connection.cc
[modify] https://crrev.com/4dc2dd0662b1bea139545652a075b0df5e912093/ui/ozone/platform/wayland/wayland_connection.h
[modify] https://crrev.com/4dc2dd0662b1bea139545652a075b0df5e912093/ui/ozone/platform/wayland/wayland_object.cc
[modify] https://crrev.com/4dc2dd0662b1bea139545652a075b0df5e912093/ui/ozone/platform/wayland/wayland_object.h
[modify] https://crrev.com/4dc2dd0662b1bea139545652a075b0df5e912093/ui/ozone/platform/wayland/wayland_util.h
[modify] https://crrev.com/4dc2dd0662b1bea139545652a075b0df5e912093/ui/ozone/public/interfaces/wayland/wayland_connection.mojom

Status: Fixed (was: Assigned)
Project Member

Comment 9 by bugdroid1@chromium.org, Oct 1

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3bc12e4a476d14e866e492e50dc3fb7a0e2d227e

commit 3bc12e4a476d14e866e492e50dc3fb7a0e2d227e
Author: Maksim Sisov <msisov@igalia.com>
Date: Mon Oct 01 14:21:49 2018

[ozone/wayland] Remove outdated comment.

Nothing special, just doing some garderning.

TBR=rjkroege@chromium.org

Bug:  859012 
Change-Id: I2f750bbf2438521109b48be5932c74f93a80dc35
Reviewed-on: https://chromium-review.googlesource.com/1254263
Reviewed-by: Maksim Sisov <msisov@igalia.com>
Commit-Queue: Maksim Sisov <msisov@igalia.com>
Cr-Commit-Position: refs/heads/master@{#595444}
[modify] https://crrev.com/3bc12e4a476d14e866e492e50dc3fb7a0e2d227e/ui/ozone/platform/wayland/gpu/gbm_surfaceless_wayland.cc

Sign in to add a comment