mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-12-25 05:18:46 +03:00
39 lines
1.1 KiB
Plaintext
39 lines
1.1 KiB
Plaintext
// Copyright 2016 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.
|
|
|
|
// https://wicg.github.io/shape-detection-api/#api
|
|
|
|
module shape_detection.mojom;
|
|
|
|
import "skia/public/interfaces/bitmap.mojom";
|
|
import "ui/gfx/geometry/mojo/geometry.mojom";
|
|
|
|
// https://wicg.github.io/shape-detection-api/#enumdef-landmarktype
|
|
enum LandmarkType { MOUTH, EYE };
|
|
|
|
// https://wicg.github.io/shape-detection-api/#dictdef-landmark
|
|
struct Landmark {
|
|
gfx.mojom.PointF location;
|
|
LandmarkType type;
|
|
};
|
|
|
|
// Since "//ui/gfx/geometry/mojo" is not exposed to blink, we need to declare
|
|
// a wrapper struct, so that gfx.mojom.RectF will not be directly referenced
|
|
// inside Blink, and browser can still use gfx types.
|
|
struct FaceDetectionResult {
|
|
gfx.mojom.RectF bounding_box;
|
|
array<Landmark> landmarks;
|
|
};
|
|
|
|
struct FaceDetectorOptions {
|
|
uint32 max_detected_faces;
|
|
bool fast_mode;
|
|
};
|
|
|
|
interface FaceDetection {
|
|
// |bitmap_data| contains tightly packed image pixels in row-major order.
|
|
Detect(skia.mojom.Bitmap bitmap_data)
|
|
=> (array<FaceDetectionResult> results);
|
|
};
|