2012-01-19 06:45:37 -08:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
* vim: sw=2 ts=8 et :
|
|
|
|
*/
|
2012-05-21 04:12:37 -07: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/. */
|
2012-01-19 06:45:37 -08:00
|
|
|
|
2012-10-04 00:05:24 -07:00
|
|
|
include LayersSurfaces;
|
2014-04-25 09:51:11 -07:00
|
|
|
include protocol PGrallocBuffer;
|
2013-04-24 11:42:40 -07:00
|
|
|
include protocol PLayerTransaction;
|
2013-07-26 12:28:31 -07:00
|
|
|
include "mozilla/GfxMessageUtils.h";
|
2013-11-21 11:25:16 -08:00
|
|
|
include "nsRegion.h";
|
2012-01-19 06:45:37 -08:00
|
|
|
|
2013-10-01 12:25:07 -07:00
|
|
|
using struct mozilla::null_t from "ipc/IPCMessageUtils.h";
|
|
|
|
using struct mozilla::layers::TextureFactoryIdentifier from "mozilla/layers/CompositorTypes.h";
|
2013-12-19 12:19:25 -08:00
|
|
|
using struct mozilla::layers::FrameMetrics from "FrameMetrics.h";
|
|
|
|
using mozilla::layers::FrameMetrics::ViewID from "FrameMetrics.h";
|
2013-10-01 12:25:07 -07:00
|
|
|
using mozilla::layers::LayersBackend from "mozilla/layers/LayersTypes.h";
|
2013-12-19 12:19:25 -08:00
|
|
|
using mozilla::CrossProcessMutexHandle from "mozilla/ipc/CrossProcessMutex.h";
|
|
|
|
using mozilla::ipc::SharedMemoryBasic::Handle from "mozilla/ipc/SharedMemoryBasic.h";
|
2014-02-11 20:41:57 -08:00
|
|
|
using class mozilla::TimeStamp from "mozilla/TimeStamp.h";
|
2012-01-19 06:45:37 -08:00
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace layers {
|
|
|
|
|
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 02:20:52 -07:00
|
|
|
|
2012-01-19 06:45:37 -08:00
|
|
|
/**
|
|
|
|
* The PCompositor protocol is used to manage communication between
|
|
|
|
* the main thread and the compositor thread context. It's primary
|
2013-04-24 11:42:40 -07:00
|
|
|
* purpose is to manage the PLayerTransaction sub protocol.
|
2012-01-19 06:45:37 -08:00
|
|
|
*/
|
|
|
|
// This should really be 'sync', but we're using 'rpc' as a workaround
|
|
|
|
// for Bug 716631.
|
2013-09-30 17:27:45 -07:00
|
|
|
intr protocol PCompositor
|
2012-01-19 06:45:37 -08:00
|
|
|
{
|
2013-04-24 11:42:40 -07:00
|
|
|
// A Compositor manages a single Layer Manager (PLayerTransaction)
|
|
|
|
manages PLayerTransaction;
|
2012-01-19 06:45:37 -08:00
|
|
|
|
2013-11-21 14:07:56 -08:00
|
|
|
child:
|
|
|
|
// The child should invalidate everything so that the whole window is redrawn.
|
|
|
|
async InvalidateAll();
|
|
|
|
|
2014-03-06 19:24:32 -08:00
|
|
|
// The compositor completed a layers transaction. id is the layers id
|
|
|
|
// of the child layer tree that was composited (or 0 when notifying
|
|
|
|
// the root layer tree).
|
|
|
|
async DidComposite(uint64_t id);
|
|
|
|
|
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 02:20:52 -07:00
|
|
|
parent:
|
2012-10-29 15:10:45 -07:00
|
|
|
|
2012-03-30 12:43:11 -07:00
|
|
|
// The child is about to be destroyed, so perform any necessary cleanup.
|
|
|
|
sync WillStop();
|
|
|
|
|
|
|
|
// Clean up in preparation for own destruction.
|
2012-01-19 06:45:37 -08:00
|
|
|
sync Stop();
|
|
|
|
|
2012-03-28 15:00:10 -07:00
|
|
|
// Pause/resume the compositor. These are intended to be used on mobile, when
|
|
|
|
// the compositor needs to pause/resume in lockstep with the application.
|
|
|
|
sync Pause();
|
|
|
|
sync Resume();
|
|
|
|
|
2013-07-11 19:32:09 -07:00
|
|
|
async NotifyChildCreated(uint64_t id);
|
|
|
|
|
2012-10-04 00:05:24 -07:00
|
|
|
// Make a snapshot of the content that would have been drawn to our
|
|
|
|
// render target at the time this message is received. If the size
|
|
|
|
// or format of |inSnapshot| doesn't match our render target,
|
|
|
|
// results are undefined.
|
|
|
|
//
|
|
|
|
// NB: this message will result in animations, transforms, effects,
|
|
|
|
// and so forth being interpolated. That's what we want to happen.
|
|
|
|
sync MakeSnapshot(SurfaceDescriptor inSnapshot)
|
|
|
|
returns (SurfaceDescriptor outSnapshot);
|
|
|
|
|
2013-06-18 00:58:43 -07:00
|
|
|
// Make sure any pending composites are started immediately and
|
|
|
|
// block until they are completed.
|
|
|
|
sync FlushRendering();
|
|
|
|
|
2013-11-26 23:32:19 -08:00
|
|
|
sync StartFrameTimeRecording(int32_t bufferSize)
|
|
|
|
returns (uint32_t startIndex);
|
|
|
|
|
|
|
|
sync StopFrameTimeRecording(uint32_t startIndex)
|
|
|
|
returns (float[] intervals);
|
|
|
|
|
2013-08-17 23:46:16 -07:00
|
|
|
// layersBackendHints is an ordered list of preffered backends where
|
2014-01-23 10:26:41 -08:00
|
|
|
// layersBackendHints[0] is the best backend. If any hints are LayersBackend::LAYERS_NONE
|
2013-08-17 23:46:16 -07:00
|
|
|
// that hint is ignored.
|
|
|
|
sync PLayerTransaction(LayersBackend[] layersBackendHints, uint64_t id)
|
2013-08-04 00:46:17 -07:00
|
|
|
returns (TextureFactoryIdentifier textureFactoryIdentifier, bool success);
|
2013-11-21 11:25:16 -08:00
|
|
|
|
|
|
|
// Notify the compositor that a region of the screen has been invalidated.
|
|
|
|
async NotifyRegionInvalidated(nsIntRegion region);
|
2013-12-19 12:19:25 -08:00
|
|
|
|
|
|
|
child:
|
|
|
|
// Send back Compositor Frame Metrics from APZCs so tiled layers can
|
|
|
|
// update progressively.
|
|
|
|
async SharedCompositorFrameMetrics(Handle metrics, CrossProcessMutexHandle mutex, uint32_t aAPZCId);
|
|
|
|
async ReleaseSharedCompositorFrameMetrics(ViewID aId, uint32_t aAPZCId);
|
2012-01-19 06:45:37 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
} // layers
|
|
|
|
} // mozilla
|