naiveproxy/ui/ozone/public/interfaces/wayland/wayland_connection.mojom

37 lines
1.4 KiB
Plaintext
Raw Normal View History

2018-12-10 05:59:24 +03:00
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
module ui.ozone.mojom;
import "mojo/public/mojom/base/file.mojom";
import "mojo/public/mojom/base/file_path.mojom";
import "ui/gfx/mojo/accelerated_widget.mojom";
// Used by the GPU for communication with a WaylandConnection on the browser
// process.
interface WaylandConnection {
// Asks Wayland to create a wl_buffer based on the dmabuf |file| descriptor.
CreateZwpLinuxDmabuf(mojo_base.mojom.File file,
uint32 width,
uint32 height,
array<uint32> strides,
array<uint32> offsets,
uint32 format,
array<uint64> modifiers,
uint32 planes_count,
uint32 buffer_id);
// Destroys a wl_buffer created by WaylandConnection based on the |buffer_id|.
DestroyZwpLinuxDmabuf(uint32 buffer_id);
// Swaps wl_buffers for a WaylandWindow with the following |widget|.
ScheduleBufferSwap(gfx.mojom.AcceleratedWidget widget, uint32 buffer_id);
};
// Used by the browser process to provide the GPU process with a mojo ptr to a
// WaylandConnection, which lives on the browser process.
interface WaylandConnectionClient {
SetWaylandConnection(WaylandConnection wc_ptr);
};