// Copyright 2016 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
module viz.mojom;
import "mojo/public/mojom/base/token.mojom";
import "services/viz/public/mojom/compositing/offset_tag.mojom";
import "ui/gfx/geometry/mojom/geometry.mojom";
import "ui/gfx/mojom/rrect_f.mojom";
import "ui/gfx/mojom/transform.mojom";
import "ui/gfx/mojom/mask_filter_info.mojom";
// See viz::SharedQuadState.
struct SharedQuadState {
// gfx.mojom.Transforms quad rects into the target content space.
gfx.mojom.Transform quad_to_target_transform;
// The rect of the quads' originating layer in the space of the quad rects.
gfx.mojom.Rect quad_layer_rect;
// The size of the visible area in the quads' originating layer, in the space
// of the quad rects.
gfx.mojom.Rect visible_quad_layer_rect;
// This rect lives in the target content space. It defines the mask filter
// info applied to the quad, and also defines rounded corner rects to clip the
// quads with.
gfx.mojom.MaskFilterInfo? mask_filter_info;
// This rect lives in the target content space.
gfx.mojom.Rect? clip_rect;
// Indicates whether the quads share this sqs contains opaque content.
bool are_contents_opaque;
float opacity;
// TODO(fsamuel): Change this to an SkXfermode enum once native enums are
// supported.
uint32 blend_mode;
int32 sorting_context_id;
uint32 layer_id;
bool is_fast_rounded_corner;
OffsetTag offset_tag;
};