[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}
Showing
Please register or sign in to comment