mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-08 20:47:44 +00:00
f458f27d6b
--HG-- extra : rebase_source : 9f8a41ae255e132e572fdb5012f851554fde69d9
112 lines
3.9 KiB
Plaintext
112 lines
3.9 KiB
Plaintext
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
* vim: sw=2 ts=8 et :
|
|
*/
|
|
/* 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
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
include LayersSurfaces;
|
|
include LayersMessages;
|
|
include protocol PCompositable;
|
|
include protocol PCompositor;
|
|
include protocol PLayer;
|
|
include protocol PRenderFrame;
|
|
include protocol PTexture;
|
|
|
|
include "mozilla/GfxMessageUtils.h";
|
|
|
|
using struct mozilla::layers::TextureInfo from "mozilla/layers/CompositorTypes.h";
|
|
using struct mozilla::void_t from "ipc/IPCMessageUtils.h";
|
|
using mozilla::layers::TextureFlags from "mozilla/layers/CompositorTypes.h";
|
|
using class mozilla::layers::APZTestData from "mozilla/layers/APZTestData.h";
|
|
using mozilla::layers::FrameMetrics::ViewID from "FrameMetrics.h";
|
|
|
|
/**
|
|
* The layers protocol is spoken between thread contexts that manage
|
|
* layer (sub)trees. The protocol comprises atomically publishing
|
|
* layer subtrees to a "shadow" thread context (which grafts the
|
|
* subtree into its own tree), and atomically updating a published
|
|
* subtree. ("Atomic" in this sense is wrt painting.)
|
|
*/
|
|
|
|
namespace mozilla {
|
|
namespace layers {
|
|
|
|
union MaybeTransform {
|
|
Matrix4x4;
|
|
void_t;
|
|
};
|
|
|
|
sync protocol PLayerTransaction {
|
|
manager PCompositor;
|
|
manages PLayer;
|
|
manages PCompositable;
|
|
manages PTexture;
|
|
|
|
child:
|
|
async ParentAsyncMessages(AsyncParentMessageData[] aMessages);
|
|
|
|
parent:
|
|
async PLayer();
|
|
async PCompositable(TextureInfo aTextureInfo);
|
|
async PTexture(SurfaceDescriptor aSharedData, TextureFlags aTextureFlags);
|
|
|
|
// The isFirstPaint flag can be used to indicate that this is the first update
|
|
// for a particular document.
|
|
sync Update(Edit[] cset, uint64_t id, TargetConfig targetConfig, bool isFirstPaint,
|
|
bool scheduleComposite, uint32_t paintSequenceNumber,
|
|
bool isRepeatTransaction, TimeStamp transactionStart)
|
|
returns (EditReply[] reply);
|
|
|
|
// We don't need to send a sync transaction if
|
|
// no transaction operate require a swap.
|
|
async UpdateNoSwap(Edit[] cset, uint64_t id, TargetConfig targetConfig, bool isFirstPaint,
|
|
bool scheduleComposite, uint32_t paintSequenceNumber,
|
|
bool isRepeatTransaction, TimeStamp transactionStart);
|
|
|
|
// Testing APIs
|
|
|
|
// Enter test mode, set the sample time to sampleTime, and resample
|
|
// animations. sampleTime must not be null.
|
|
sync SetTestSampleTime(TimeStamp sampleTime);
|
|
// Leave test mode and resume normal compositing
|
|
sync LeaveTestMode();
|
|
|
|
sync GetOpacity(PLayer layer) returns (float opacity);
|
|
|
|
// Returns the value of the transform applied to the layer by animation after
|
|
// factoring out translation components introduced to account for the offset
|
|
// of the corresponding frame and transform origin and after converting to CSS
|
|
// pixels. If the layer is not transformed by animation, the return value will
|
|
// be void_t.
|
|
sync GetAnimationTransform(PLayer layer) returns (MaybeTransform transform);
|
|
|
|
// The next time the layer tree is composited, add this async scroll offset in
|
|
// CSS pixels for the given ViewID.
|
|
// Useful for testing rendering of async scrolling.
|
|
sync SetAsyncScrollOffset(ViewID id, int32_t x, int32_t y);
|
|
|
|
// Drop any front buffers that might be retained on the compositor
|
|
// side.
|
|
async ClearCachedResources();
|
|
|
|
// Schedule a composite if one isn't already scheduled.
|
|
async ForceComposite();
|
|
|
|
// Get a copy of the compositor-side APZ test data instance for this
|
|
// layers id.
|
|
sync GetAPZTestData() returns (APZTestData data);
|
|
|
|
// Query a named property from the last frame
|
|
sync RequestProperty(nsString property) returns (float value);
|
|
|
|
async ChildAsyncMessages(AsyncChildMessageData[] aMessages);
|
|
|
|
async Shutdown();
|
|
child:
|
|
async __delete__();
|
|
};
|
|
|
|
} // namespace layers
|
|
} // namespace mozilla
|