naiveproxy/ui/ozone/public/interfaces/overlay_surface_candidate.mojom
2018-12-09 21:59:24 -05:00

43 lines
1.4 KiB
Plaintext

// Copyright 2017 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/mojo/geometry.mojom";
import "ui/gfx/mojo/buffer_types.mojom";
import "ui/gfx/mojo/overlay_transform.mojom";
// ui::OverlayStatus
enum OverlayStatus {
OVERLAY_STATUS_PENDING,
OVERLAY_STATUS_ABLE,
OVERLAY_STATUS_NOT,
};
struct OverlaySurfaceCandidate {
// Transformation to apply to layer during composition.
gfx.mojom.OverlayTransform transform;
// Format of the buffer to composite.
gfx.mojom.BufferFormat format;
// Size of the buffer, in pixels.
gfx.mojom.Size buffer_size;
// Rect on the display to position the overlay to. Input rectangle may
// not have integer coordinates, but when accepting for overlay, must
// be modified by CheckOverlaySupport to output integer values.
gfx.mojom.RectF display_rect;
// Crop within the buffer to be placed inside |display_rect|.
gfx.mojom.RectF crop_rect;
// Clip rect in the target content space after composition.
gfx.mojom.Rect clip_rect;
// If the quad is clipped after composition.
bool is_clipped;
// Stacking order of the overlay plane relative to the main surface,
// which is 0. Signed to allow for "underlays".
int32 plane_z_order = 0;
// To be modified by the implementer if this candidate can go into
// an overlay.
bool overlay_handled;
};