naiveproxy/services/viz/privileged/interfaces/compositing/display_private.mojom
2018-08-11 05:35:24 +00:00

53 lines
2.2 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 viz.mojom;
import "mojo/public/mojom/base/time.mojom";
import "ui/gfx/mojo/ca_layer_params.mojom";
import "ui/gfx/mojo/color_space.mojom";
import "ui/gfx/mojo/transform.mojom";
import "ui/latency/mojo/latency_info.mojom";
import "services/viz/privileged/interfaces/compositing/layered_window_updater.mojom";
// See ui/compositor/compositor.h: ContextFactoryPrivate.
// The DisplayPrivate is used by privileged clients to talk to Display.
// DisplayPrivate would eventually replace or be used by ContextFactoryPrivate.
interface DisplayPrivate {
SetDisplayVisible(bool visible);
// Sets the matrix that will be used to transform the output color of the
// display. This only works in GPU compositing.
SetDisplayColorMatrix(gfx.mojom.Transform color_matrix);
SetDisplayColorSpace(gfx.mojom.ColorSpace blending_color_space,
gfx.mojom.ColorSpace device_color_space);
SetOutputIsSecure(bool secure);
// Locks the vsync interval used to generate BeginFrames for this display to
// |interval|. Changes to vsync interval from other sources will be ignored.
// This will do nothing if the display is using an external BeginFrame source.
SetAuthoritativeVSyncInterval(mojo_base.mojom.TimeDelta interval);
// Updates vsync parameters used to generate BeginFrames for this display.
// This will do nothing if the display is using an external BeginFrame source.
SetDisplayVSyncParameters(
mojo_base.mojom.TimeTicks timebase,
mojo_base.mojom.TimeDelta interval);
};
interface DisplayClient {
OnDisplayReceivedCALayerParams(gfx.mojom.CALayerParams ca_layer_params);
// Notifies that a swap has occured after some latency info with snapshot
// component reached the display.
DidSwapAfterSnapshotRequestReceived(array<ui.mojom.LatencyInfo> latency_info);
// WINDOWS ONLY: Create a LayeredWindowUpdater implementation to draw into
// layered window.
// Note: This will only be used when running Windows 7 and earlier with
// software compositing and a transparent HWND.
CreateLayeredWindowUpdater(LayeredWindowUpdater& layered_window_updater);
};