Source code
Revision control
Copy as Markdown
Other Tools
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
include "mozilla/GfxMessageUtils.h";
using struct mozilla::gfx::DeviceColor from "mozilla/gfx/2D.h";
using mozilla::gfx::IntPoint from "mozilla/gfx/Point.h";
using mozilla::gfx::IntRect from "mozilla/gfx/Point.h";
using mozilla::gfx::RoundedRect from "mozilla/gfx/Point.h";
using mozilla::gfx::IntSize from "mozilla/gfx/Point.h";
using mozilla::gfx::Matrix4x4 from "mozilla/gfx/Matrix.h";
namespace mozilla {
namespace layers {
union NativeLayerCommand {
CommandCreateLayer;
CommandCreateLayerForExternalTexture;
CommandCreateLayerForColor;
CommandLayerDestroyed;
CommandSetLayers;
CommandLayerInfo;
};
struct CommandCreateLayer {
uint64_t ID;
IntSize Size;
bool Opaque;
};
struct CommandCreateLayerForExternalTexture {
uint64_t ID;
bool Opaque;
};
struct CommandCreateLayerForColor {
uint64_t ID;
DeviceColor Color;
};
struct CommandLayerDestroyed {
uint64_t ID;
};
struct CommandSetLayers {
uint64_t[] IDs;
};
struct CommandLayerInfo {
uint64_t ID;
uint32_t SurfaceID;
bool IsDRM;
bool IsHDR;
IntPoint Position;
IntSize Size;
IntRect DisplayRect;
IntRect? ClipRect;
RoundedRect? RoundedClipRect;
Matrix4x4 Transform;
int8_t SamplingFilter;
bool SurfaceIsFlipped;
};
// This protocol allows a NativeLayerRoot implementation on the GPU
// to send layer commands to the parent process.
[NeedsOtherPid, ParentProc=Parent, ChildProc=GPU]
async protocol PNativeLayerRemote
{
parent:
async CommitNativeLayerCommands(NativeLayerCommand[] commands);
};
} // layers
} // mozilla