| // Copyright 2020 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 "ui/gfx/geometry/mojom/geometry.mojom"; |
| import "ui/gfx/mojom/gpu_fence_handle.mojom"; |
| import "ui/gfx/mojom/overlay_transform.mojom"; |
| |
| // This is not a mirror of ui::OverlayPlane, it only contains things that are |
| // useful to ozone/wayland. |
| struct WaylandOverlayConfig { |
| // Specifies the stacking order of this overlay plane, relative to primary |
| // plane. |
| int32 z_order; |
| |
| // Specifies how the buffer is to be transformed during composition. |
| gfx.mojom.OverlayTransform transform; |
| |
| // A unique id for the buffer, which is used to identify imported wl_buffers |
| // on the browser process. |
| uint32 buffer_id; |
| |
| // Specifies where it is supposed to be on the display in physical pixels. |
| // This, after scaled by buffer_scale sets the destination rectangle of |
| // Wayland Viewport. |
| gfx.mojom.Rect bounds_rect; |
| |
| // Specifies the region within the buffer to be placed inside |bounds_rect|. |
| // This sets the source rectangle of Wayland Viewport. |
| gfx.mojom.RectF crop_rect; |
| |
| // Describes the changed region of the buffer. Optional to hint a partial |
| // swap. |
| gfx.mojom.Rect damage_region; |
| |
| // Specifies if alpha blending, with premultiplied alpha should be applied at |
| // scanout. |
| bool enable_blend; |
| |
| // Specifies a GpuFenceHandle to be waited on before content of the buffer can |
| // be accessed by the display controller for overlay, or by the gpu for |
| // compositing. |
| gfx.mojom.GpuFenceHandle? access_fence_handle; |
| }; |