chromium/services/viz/public/mojom/compositing/filter_operation.mojom

// 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 "services/viz/public/mojom/compositing/paint_filter.mojom";
import "skia/public/mojom/tile_mode.mojom";
import "skia/public/mojom/skcolor4f.mojom";
import "ui/gfx/geometry/mojom/geometry.mojom";

enum FilterType {
  GRAYSCALE,
  SEPIA,
  SATURATE,
  HUE_ROTATE,
  INVERT,
  BRIGHTNESS,
  CONTRAST,
  OPACITY,
  BLUR,
  DROP_SHADOW,
  COLOR_MATRIX,
  ZOOM,
  REFERENCE,
  SATURATING_BRIGHTNESS,
  ALPHA_THRESHOLD,
  OFFSET,
  FILTER_TYPE_LAST = OFFSET
};

// See cc/paint/filter_operation.h.
struct FilterOperation {
  FilterType type;
  float amount;
  gfx.mojom.Point offset;
  skia.mojom.SkColor4f drop_shadow_color;
  PaintFilter image_filter;
  array<float, 20>? matrix;
  int32 zoom_inset;
  skia.mojom.TileMode blur_tile_mode;
  array<gfx.mojom.Rect>? shape;
};