2010-07-22 01:17:33 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
* vim: sw=2 ts=8 et :
|
|
|
|
*/
|
2012-05-21 15:12:37 +04:00
|
|
|
/* 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/. */
|
2010-07-22 01:17:33 +04:00
|
|
|
|
2012-07-13 23:38:09 +04:00
|
|
|
include LayersSurfaces;
|
2013-09-06 19:41:00 +04:00
|
|
|
include LayersMessages;
|
Bug 825928: Land layers refactoring. r=jrmuizel,bas,nical,mattwoodrow,roc,nrc,benwa,bjacob,jgilbert,kchen CLOSED TREE
Please contact Bas Schouten <bschouten@mozilla.com>, Nicolas Silva <nsilva@mozilla.com> or Nicholas Cameron <ncameron@mozilla.com> with general questions. Below is a rough list of authors to contact with specific questions.
Authors:
gfx/layers/Compositor.* gfx/layers/Effects.h - Compositor Interface - bas,nrc,nical
gfx/layers/d3d* - D3D9/D3D10 - bas
gfx/layers/ThebesLayer* - ThebesLayers - nrc,bas
gfx/layers/composite/* - CompositeLayers - nrc,nical
gfx/layers/client/* - Client - nrc,nical,bas
gfx/layers/*Image* - nical
gfx/layers/ipc ipc - IPC - nical
gfx/layers/opengl - CompositorOGL - nrc,nical
gfx/2d - bas,nrc
gfx/gl - GLContext - bjacob
dom/* layout/* - DOM - mattwoodrow
2013-04-10 13:20:52 +04:00
|
|
|
include protocol PCompositable;
|
2012-01-19 18:45:37 +04:00
|
|
|
include protocol PCompositor;
|
2010-07-22 01:17:33 +04:00
|
|
|
include protocol PLayer;
|
2010-08-21 03:24:41 +04:00
|
|
|
include protocol PRenderFrame;
|
2013-12-12 05:44:44 +04:00
|
|
|
include protocol PTexture;
|
2010-07-22 01:17:33 +04:00
|
|
|
|
2013-07-26 23:28:31 +04:00
|
|
|
include "mozilla/GfxMessageUtils.h";
|
2010-09-04 00:10:45 +04:00
|
|
|
|
2013-10-01 23:25:07 +04:00
|
|
|
using struct mozilla::layers::TextureInfo from "mozilla/layers/CompositorTypes.h";
|
2014-03-10 08:47:12 +04:00
|
|
|
using struct mozilla::void_t from "ipc/IPCMessageUtils.h";
|
2014-04-26 06:34:05 +04:00
|
|
|
using mozilla::layers::TextureFlags from "mozilla/layers/CompositorTypes.h";
|
2014-05-08 03:56:48 +04:00
|
|
|
using class mozilla::layers::APZTestData from "mozilla/layers/APZTestData.h";
|
2014-08-28 06:13:43 +04:00
|
|
|
using mozilla::layers::FrameMetrics::ViewID from "FrameMetrics.h";
|
2015-04-14 19:24:32 +03:00
|
|
|
using struct mozilla::layers::ScrollableLayerGuid from "FrameMetrics.h";
|
2013-04-12 11:28:55 +04:00
|
|
|
|
2010-07-22 01:17:33 +04:00
|
|
|
/**
|
|
|
|
* 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 {
|
|
|
|
|
2014-03-10 08:47:12 +04:00
|
|
|
union MaybeTransform {
|
2014-08-01 16:31:49 +04:00
|
|
|
Matrix4x4;
|
2014-03-10 08:47:12 +04:00
|
|
|
void_t;
|
|
|
|
};
|
|
|
|
|
2013-04-24 22:42:40 +04:00
|
|
|
sync protocol PLayerTransaction {
|
2014-08-22 04:16:44 +04:00
|
|
|
manager PCompositor;
|
2010-07-22 01:17:33 +04:00
|
|
|
manages PLayer;
|
Bug 825928: Land layers refactoring. r=jrmuizel,bas,nical,mattwoodrow,roc,nrc,benwa,bjacob,jgilbert,kchen CLOSED TREE
Please contact Bas Schouten <bschouten@mozilla.com>, Nicolas Silva <nsilva@mozilla.com> or Nicholas Cameron <ncameron@mozilla.com> with general questions. Below is a rough list of authors to contact with specific questions.
Authors:
gfx/layers/Compositor.* gfx/layers/Effects.h - Compositor Interface - bas,nrc,nical
gfx/layers/d3d* - D3D9/D3D10 - bas
gfx/layers/ThebesLayer* - ThebesLayers - nrc,bas
gfx/layers/composite/* - CompositeLayers - nrc,nical
gfx/layers/client/* - Client - nrc,nical,bas
gfx/layers/*Image* - nical
gfx/layers/ipc ipc - IPC - nical
gfx/layers/opengl - CompositorOGL - nrc,nical
gfx/2d - bas,nrc
gfx/gl - GLContext - bjacob
dom/* layout/* - DOM - mattwoodrow
2013-04-10 13:20:52 +04:00
|
|
|
manages PCompositable;
|
2013-12-12 05:44:44 +04:00
|
|
|
manages PTexture;
|
2010-07-22 01:17:33 +04:00
|
|
|
|
2014-05-06 05:56:40 +04:00
|
|
|
child:
|
2014-06-08 17:18:53 +04:00
|
|
|
async ParentAsyncMessages(AsyncParentMessageData[] aMessages);
|
2014-05-06 05:56:40 +04:00
|
|
|
|
2010-07-22 01:17:33 +04:00
|
|
|
parent:
|
|
|
|
async PLayer();
|
2013-04-12 11:28:55 +04:00
|
|
|
async PCompositable(TextureInfo aTextureInfo);
|
2014-04-26 06:34:05 +04:00
|
|
|
async PTexture(SurfaceDescriptor aSharedData, TextureFlags aTextureFlags);
|
2010-07-22 01:17:33 +04:00
|
|
|
|
2012-03-12 19:50:07 +04:00
|
|
|
// The isFirstPaint flag can be used to indicate that this is the first update
|
|
|
|
// for a particular document.
|
2015-01-29 22:41:55 +03:00
|
|
|
sync Update(Edit[] cset, uint64_t id, TargetConfig targetConfig,
|
|
|
|
PluginWindowData[] plugins, bool isFirstPaint,
|
2014-05-31 02:52:43 +04:00
|
|
|
bool scheduleComposite, uint32_t paintSequenceNumber,
|
2015-08-18 21:27:20 +03:00
|
|
|
bool isRepeatTransaction, TimeStamp transactionStart,
|
|
|
|
int32_t paintSyncId)
|
2010-07-22 01:17:33 +04:00
|
|
|
returns (EditReply[] reply);
|
2014-05-31 02:52:43 +04:00
|
|
|
|
2014-05-29 01:42:14 +04:00
|
|
|
// We don't need to send a sync transaction if
|
|
|
|
// no transaction operate require a swap.
|
2015-01-29 22:41:55 +03:00
|
|
|
async UpdateNoSwap(Edit[] cset, uint64_t id, TargetConfig targetConfig,
|
|
|
|
PluginWindowData[] plugins, bool isFirstPaint,
|
2014-05-31 02:52:43 +04:00
|
|
|
bool scheduleComposite, uint32_t paintSequenceNumber,
|
2015-08-18 21:27:20 +03:00
|
|
|
bool isRepeatTransaction, TimeStamp transactionStart,
|
|
|
|
int32_t paintSyncId);
|
2010-07-22 01:17:33 +04:00
|
|
|
|
2014-02-14 12:59:23 +04:00
|
|
|
// Testing APIs
|
2014-03-22 01:59:57 +04:00
|
|
|
|
|
|
|
// 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();
|
|
|
|
|
2013-05-30 04:38:27 +04:00
|
|
|
sync GetOpacity(PLayer layer) returns (float opacity);
|
2014-03-10 08:47:12 +04:00
|
|
|
|
|
|
|
// 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);
|
2013-05-30 04:38:27 +04:00
|
|
|
|
2014-08-31 07:29:24 +04:00
|
|
|
// The next time the layer tree is composited, add this async scroll offset in
|
|
|
|
// CSS pixels for the given ViewID.
|
2014-02-14 12:59:23 +04:00
|
|
|
// Useful for testing rendering of async scrolling.
|
2014-10-30 06:33:55 +03:00
|
|
|
sync SetAsyncScrollOffset(ViewID id, int32_t x, int32_t y);
|
2014-02-14 12:59:23 +04:00
|
|
|
|
2015-05-24 23:48:26 +03:00
|
|
|
// The next time the layer tree is composited, include this async zoom in
|
|
|
|
// for the given ViewID.
|
|
|
|
// Useful for testing rendering of async zooming.
|
|
|
|
sync SetAsyncZoom(ViewID id, float zoom);
|
|
|
|
|
2015-06-19 15:25:41 +03:00
|
|
|
// Flush any pending APZ repaints to the main thread.
|
|
|
|
async FlushApzRepaints();
|
|
|
|
|
2012-11-08 07:51:55 +04:00
|
|
|
// Drop any front buffers that might be retained on the compositor
|
|
|
|
// side.
|
|
|
|
async ClearCachedResources();
|
2014-05-06 05:56:40 +04:00
|
|
|
|
2014-03-03 04:59:58 +04:00
|
|
|
// Schedule a composite if one isn't already scheduled.
|
|
|
|
async ForceComposite();
|
2012-11-08 07:51:55 +04:00
|
|
|
|
2014-05-08 03:56:48 +04:00
|
|
|
// Get a copy of the compositor-side APZ test data instance for this
|
|
|
|
// layers id.
|
|
|
|
sync GetAPZTestData() returns (APZTestData data);
|
|
|
|
|
2014-09-02 23:23:34 +04:00
|
|
|
// Query a named property from the last frame
|
|
|
|
sync RequestProperty(nsString property) returns (float value);
|
|
|
|
|
2015-04-14 19:24:32 +03:00
|
|
|
// Tell the compositor to notify APZ that a layer has been confirmed for an
|
|
|
|
// input event.
|
|
|
|
async SetConfirmedTargetAPZC(uint64_t aInputBlockId, ScrollableLayerGuid[] aTargets);
|
|
|
|
|
2014-05-06 05:56:40 +04:00
|
|
|
async ChildAsyncMessages(AsyncChildMessageData[] aMessages);
|
|
|
|
|
2014-10-13 12:43:59 +04:00
|
|
|
async Shutdown();
|
|
|
|
child:
|
2010-07-22 01:17:33 +04:00
|
|
|
async __delete__();
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace layers
|
|
|
|
} // namespace mozilla
|