2012-01-19 14:45:37 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
* vim: sw=2 ts=8 et :
|
|
|
|
*/
|
2012-05-21 11:12:37 +00: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 14:45:37 +00:00
|
|
|
|
2012-10-04 07:05:24 +00:00
|
|
|
include LayersSurfaces;
|
|
|
|
include protocol PGrallocBuffer;
|
2013-04-24 18:42:40 +00:00
|
|
|
include protocol PLayerTransaction;
|
2013-07-26 19:28:31 +00:00
|
|
|
include "mozilla/GfxMessageUtils.h";
|
2013-11-21 19:25:16 +00:00
|
|
|
include "nsRegion.h";
|
2012-01-19 14:45:37 +00:00
|
|
|
|
2013-10-01 19:25:07 +00:00
|
|
|
using struct mozilla::null_t from "ipc/IPCMessageUtils.h";
|
|
|
|
using struct mozilla::layers::TextureFactoryIdentifier from "mozilla/layers/CompositorTypes.h";
|
2013-12-19 20:19:25 +00:00
|
|
|
using struct mozilla::layers::FrameMetrics from "FrameMetrics.h";
|
|
|
|
using mozilla::layers::FrameMetrics::ViewID from "FrameMetrics.h";
|
2013-10-01 19:25:07 +00:00
|
|
|
using mozilla::layers::LayersBackend from "mozilla/layers/LayersTypes.h";
|
2013-12-19 20:19:25 +00:00
|
|
|
using mozilla::CrossProcessMutexHandle from "mozilla/ipc/CrossProcessMutex.h";
|
|
|
|
using mozilla::ipc::SharedMemoryBasic::Handle from "mozilla/ipc/SharedMemoryBasic.h";
|
2014-02-12 04:41:57 +00:00
|
|
|
using class mozilla::TimeStamp from "mozilla/TimeStamp.h";
|
2012-01-19 14:45:37 +00: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 09:20:52 +00:00
|
|
|
|
2012-01-19 14:45:37 +00:00
|
|
|
/**
|
|
|
|
* The PCompositor protocol is used to manage communication between
|
|
|
|
* the main thread and the compositor thread context. It's primary
|
2013-04-24 18:42:40 +00:00
|
|
|
* purpose is to manage the PLayerTransaction sub protocol.
|
2012-01-19 14:45:37 +00:00
|
|
|
*/
|
|
|
|
// This should really be 'sync', but we're using 'rpc' as a workaround
|
|
|
|
// for Bug 716631.
|
2013-10-01 00:27:45 +00:00
|
|
|
intr protocol PCompositor
|
2012-01-19 14:45:37 +00:00
|
|
|
{
|
2013-04-24 18:42:40 +00:00
|
|
|
// A Compositor manages a single Layer Manager (PLayerTransaction)
|
|
|
|
manages PLayerTransaction;
|
2012-01-19 14:45:37 +00:00
|
|
|
|
2013-11-21 22:07:56 +00:00
|
|
|
child:
|
|
|
|
// The child should invalidate everything so that the whole window is redrawn.
|
|
|
|
async InvalidateAll();
|
|
|
|
|
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 09:20:52 +00:00
|
|
|
parent:
|
2012-10-29 22:10:45 +00:00
|
|
|
|
2012-03-30 19:43:11 +00: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 14:45:37 +00:00
|
|
|
sync Stop();
|
|
|
|
|
2012-03-28 22:00:10 +00: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-12 02:32:09 +00:00
|
|
|
async NotifyChildCreated(uint64_t id);
|
|
|
|
|
2012-10-04 07:05:24 +00: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 07:58:43 +00:00
|
|
|
// Make sure any pending composites are started immediately and
|
|
|
|
// block until they are completed.
|
|
|
|
sync FlushRendering();
|
|
|
|
|
2013-11-27 07:32:19 +00:00
|
|
|
sync StartFrameTimeRecording(int32_t bufferSize)
|
|
|
|
returns (uint32_t startIndex);
|
|
|
|
|
|
|
|
sync StopFrameTimeRecording(uint32_t startIndex)
|
|
|
|
returns (float[] intervals);
|
|
|
|
|
2013-08-18 06:46:16 +00:00
|
|
|
// layersBackendHints is an ordered list of preffered backends where
|
2014-01-23 18:26:41 +00:00
|
|
|
// layersBackendHints[0] is the best backend. If any hints are LayersBackend::LAYERS_NONE
|
2013-08-18 06:46:16 +00:00
|
|
|
// that hint is ignored.
|
|
|
|
sync PLayerTransaction(LayersBackend[] layersBackendHints, uint64_t id)
|
2013-08-04 07:46:17 +00:00
|
|
|
returns (TextureFactoryIdentifier textureFactoryIdentifier, bool success);
|
2013-11-21 19:25:16 +00:00
|
|
|
|
|
|
|
// Notify the compositor that a region of the screen has been invalidated.
|
|
|
|
async NotifyRegionInvalidated(nsIntRegion region);
|
2013-12-19 20:19:25 +00: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 14:45:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // layers
|
|
|
|
} // mozilla
|