2010-07-21 14:17:33 -07: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/. */
|
2010-07-21 14:17:33 -07:00
|
|
|
|
2012-07-13 12:38:09 -07:00
|
|
|
include LayersSurfaces;
|
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
|
|
|
include LayerTransaction;
|
|
|
|
include protocol PCompositable;
|
2012-01-19 06:45:37 -08:00
|
|
|
include protocol PCompositor;
|
2012-07-12 05:51:58 -07:00
|
|
|
include protocol PGrallocBuffer;
|
2010-07-21 14:17:33 -07:00
|
|
|
include protocol PLayer;
|
2010-08-20 16:24:41 -07:00
|
|
|
include protocol PRenderFrame;
|
2010-07-21 14:17:33 -07:00
|
|
|
|
2012-07-24 12:01:09 -07:00
|
|
|
include "mozilla/WidgetUtils.h";
|
2012-07-31 10:28:20 -07:00
|
|
|
include "mozilla/TimeStamp.h";
|
2012-11-21 18:40:57 -08:00
|
|
|
include "mozilla/dom/ScreenOrientation.h";
|
2012-08-20 06:35:41 -07:00
|
|
|
include "nsCSSProperty.h";
|
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
|
|
|
include "gfxipc/ShadowLayerUtils.h";
|
2010-09-03 13:10:45 -07:00
|
|
|
|
2013-04-12 00:28:55 -07:00
|
|
|
using mozilla::layers::TextureInfo;
|
|
|
|
|
2010-07-21 14:17:33 -07: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 {
|
|
|
|
|
2013-04-24 11:42:40 -07:00
|
|
|
sync protocol PLayerTransaction {
|
2012-01-19 06:45:37 -08:00
|
|
|
manager PRenderFrame or PCompositor;
|
2010-07-21 14:17:33 -07: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 02:20:52 -07:00
|
|
|
manages PCompositable;
|
|
|
|
manages PGrallocBuffer;
|
2010-07-21 14:17:33 -07:00
|
|
|
|
|
|
|
parent:
|
2012-07-12 05:51:58 -07:00
|
|
|
/**
|
|
|
|
* Only the parent side has privileges to allocate the buffer.
|
|
|
|
* Allocation may fail (pmem is a scarce resource), and if so null_t
|
|
|
|
* is returned.
|
2013-05-27 07:12:13 -07:00
|
|
|
*
|
|
|
|
* |format| is an Android PixelFormat (see PixelFormat.h)
|
|
|
|
*
|
|
|
|
* commonly used PixelFormats are:
|
|
|
|
* PIXEL_FORMAT_RGBA_8888
|
|
|
|
* PIXEL_FORMAT_RGBX_8888
|
|
|
|
* PIXEL_FORMAT_BGRA_8888
|
|
|
|
*
|
|
|
|
* Note that SurfaceDescriptorGralloc has a "isRBSwapped" boolean
|
|
|
|
* that can treat the R/B bytes as swapped when they are rendered
|
|
|
|
* to the screen, to help with matching the native pixel format
|
|
|
|
* of other rendering engines.
|
|
|
|
*
|
|
|
|
* |usage| is a USAGE_* mask (see GraphicBuffer.h)
|
|
|
|
*
|
|
|
|
* commonly used USAGE flags are:
|
|
|
|
* USAGE_SW_READ_OFTEN | USAGE_SW_WRITE_OFTEN | USAGE_HW_TEXTURE
|
|
|
|
* - used for software rendering to a buffer which the compositor
|
|
|
|
* treats as a texture
|
|
|
|
* USAGE_HW_RENDER | USAGE_HW_TEXTURE
|
|
|
|
* - used for GL rendering to a buffer which the compositor
|
|
|
|
* treats as a texture
|
2012-07-12 05:51:58 -07:00
|
|
|
*/
|
2013-05-27 07:12:13 -07:00
|
|
|
sync PGrallocBuffer(gfxIntSize size, uint32_t format, uint32_t usage)
|
2012-07-12 05:51:58 -07:00
|
|
|
returns (MaybeMagicGrallocBufferHandle handle);
|
2010-07-21 14:17:33 -07:00
|
|
|
async PLayer();
|
2013-04-12 00:28:55 -07:00
|
|
|
async PCompositable(TextureInfo aTextureInfo);
|
2010-07-21 14:17:33 -07:00
|
|
|
|
2012-03-12 08:50:07 -07:00
|
|
|
// The isFirstPaint flag can be used to indicate that this is the first update
|
|
|
|
// for a particular document.
|
2012-07-24 12:01:09 -07:00
|
|
|
sync Update(Edit[] cset, TargetConfig targetConfig, bool isFirstPaint)
|
2010-07-21 14:17:33 -07:00
|
|
|
returns (EditReply[] reply);
|
|
|
|
|
2013-05-29 17:38:27 -07:00
|
|
|
sync GetOpacity(PLayer layer) returns (float opacity);
|
|
|
|
sync GetTransform(PLayer layer) returns (gfx3DMatrix transform);
|
|
|
|
|
2012-05-01 12:23:39 -07:00
|
|
|
// We don't need to send a sync transaction if
|
|
|
|
// no transaction operate require a swap.
|
2012-07-24 12:01:09 -07:00
|
|
|
async UpdateNoSwap(Edit[] cset, TargetConfig targetConfig, bool isFirstPaint);
|
2012-05-01 12:23:39 -07:00
|
|
|
|
2012-11-07 19:51:55 -08:00
|
|
|
// Drop any front buffers that might be retained on the compositor
|
|
|
|
// side.
|
|
|
|
async ClearCachedResources();
|
|
|
|
|
2010-07-21 14:17:33 -07:00
|
|
|
async __delete__();
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace layers
|
|
|
|
} // namespace mozilla
|