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
|
|
|
/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
* 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/. */
|
|
|
|
|
|
|
|
#ifndef GFX_LayerManagerComposite_H
|
|
|
|
#define GFX_LayerManagerComposite_H
|
|
|
|
|
2013-08-11 16:17:23 -07:00
|
|
|
#include <stdint.h> // for int32_t, uint32_t
|
|
|
|
#include "GLDefs.h" // for GLenum
|
2013-04-25 15:25:33 -07:00
|
|
|
#include "Layers.h"
|
2013-08-11 16:17:23 -07:00
|
|
|
#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc
|
|
|
|
#include "mozilla/Attributes.h" // for MOZ_OVERRIDE
|
|
|
|
#include "mozilla/RefPtr.h" // for RefPtr, TemporaryRef
|
|
|
|
#include "mozilla/gfx/Point.h" // for IntSize
|
|
|
|
#include "mozilla/gfx/Rect.h" // for Rect
|
|
|
|
#include "mozilla/gfx/Types.h" // for SurfaceFormat
|
|
|
|
#include "mozilla/layers/CompositorTypes.h"
|
|
|
|
#include "mozilla/layers/LayersTypes.h" // for LayersBackend, etc
|
|
|
|
#include "nsAString.h"
|
|
|
|
#include "nsAutoPtr.h" // for nsRefPtr
|
|
|
|
#include "nsCOMPtr.h" // for already_AddRefed
|
|
|
|
#include "nsDebug.h" // for NS_ASSERTION
|
|
|
|
#include "nsISupportsImpl.h" // for Layer::AddRef, etc
|
|
|
|
#include "nsRect.h" // for nsIntRect
|
|
|
|
#include "nsRegion.h" // for nsIntRegion
|
|
|
|
#include "nscore.h" // for nsAString, etc
|
2013-11-21 11:25:16 -08:00
|
|
|
#include "LayerTreeInvalidation.h"
|
2013-08-11 16:17:23 -07:00
|
|
|
|
|
|
|
class gfxASurface;
|
|
|
|
class gfxContext;
|
|
|
|
struct nsIntPoint;
|
|
|
|
struct nsIntSize;
|
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
|
|
|
|
|
|
|
#ifdef XP_WIN
|
|
|
|
#include <windows.h>
|
|
|
|
#endif
|
|
|
|
|
2013-04-24 11:42:40 -07:00
|
|
|
namespace mozilla {
|
2013-08-11 16:17:23 -07:00
|
|
|
namespace gfx {
|
|
|
|
class DrawTarget;
|
|
|
|
}
|
|
|
|
|
2013-04-24 11:42:40 -07:00
|
|
|
namespace gl {
|
|
|
|
class GLContext;
|
|
|
|
class TextureImage;
|
|
|
|
}
|
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
|
|
|
|
|
|
|
namespace layers {
|
|
|
|
|
2013-04-25 15:25:33 -07:00
|
|
|
class CanvasLayerComposite;
|
|
|
|
class ColorLayerComposite;
|
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
|
|
|
class CompositableHost;
|
2013-08-11 16:17:23 -07:00
|
|
|
class Compositor;
|
|
|
|
class ContainerLayerComposite;
|
2013-04-25 15:25:33 -07:00
|
|
|
class EffectChain;
|
2013-08-11 16:17:23 -07:00
|
|
|
class ImageLayer;
|
|
|
|
class ImageLayerComposite;
|
|
|
|
class LayerComposite;
|
|
|
|
class RefLayerComposite;
|
|
|
|
class SurfaceDescriptor;
|
|
|
|
class ThebesLayerComposite;
|
2013-04-25 15:25:33 -07:00
|
|
|
class TiledLayerComposer;
|
2014-03-11 19:27:30 -07:00
|
|
|
class TextRenderer;
|
2014-02-10 14:14:11 -08:00
|
|
|
struct FPSState;
|
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
|
|
|
|
2013-05-29 14:59:24 -07:00
|
|
|
class LayerManagerComposite : public LayerManager
|
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
|
|
|
{
|
|
|
|
public:
|
|
|
|
LayerManagerComposite(Compositor* aCompositor);
|
2013-04-25 15:25:33 -07:00
|
|
|
~LayerManagerComposite();
|
|
|
|
|
|
|
|
virtual void Destroy() MOZ_OVERRIDE;
|
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
|
|
|
|
|
|
|
/**
|
|
|
|
* return True if initialization was succesful, false when it was not.
|
|
|
|
*/
|
|
|
|
bool Initialize();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets the clipping region for this layer manager. This is important on
|
|
|
|
* windows because using OGL we no longer have GDI's native clipping. Therefor
|
|
|
|
* widget must tell us what part of the screen is being invalidated,
|
|
|
|
* and we should clip to this.
|
|
|
|
*
|
|
|
|
* \param aClippingRegion Region to clip to. Setting an empty region
|
|
|
|
* will disable clipping.
|
|
|
|
*/
|
|
|
|
void SetClippingRegion(const nsIntRegion& aClippingRegion)
|
|
|
|
{
|
|
|
|
mClippingRegion = aClippingRegion;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* LayerManager implementation.
|
|
|
|
*/
|
2013-04-25 15:25:33 -07:00
|
|
|
virtual LayerManagerComposite* AsLayerManagerComposite() MOZ_OVERRIDE
|
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
|
|
|
{
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
void UpdateRenderBounds(const nsIntRect& aRect);
|
|
|
|
|
2013-09-26 17:37:19 -07:00
|
|
|
virtual void BeginTransaction() MOZ_OVERRIDE;
|
|
|
|
virtual void BeginTransactionWithTarget(gfxContext* aTarget) MOZ_OVERRIDE
|
|
|
|
{
|
|
|
|
MOZ_CRASH("Use BeginTransactionWithDrawTarget");
|
|
|
|
}
|
|
|
|
void BeginTransactionWithDrawTarget(gfx::DrawTarget* aTarget);
|
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
|
|
|
|
|
|
|
virtual bool EndEmptyTransaction(EndTransactionFlags aFlags = END_DEFAULT) MOZ_OVERRIDE;
|
|
|
|
virtual void EndTransaction(DrawThebesLayerCallback aCallback,
|
|
|
|
void* aCallbackData,
|
|
|
|
EndTransactionFlags aFlags = END_DEFAULT) MOZ_OVERRIDE;
|
|
|
|
|
|
|
|
virtual void SetRoot(Layer* aLayer) MOZ_OVERRIDE { mRoot = aLayer; }
|
|
|
|
|
2013-12-08 17:40:59 -08:00
|
|
|
// XXX[nrc]: never called, we should move this logic to ClientLayerManager
|
|
|
|
// (bug 946926).
|
2013-12-20 08:46:29 -08:00
|
|
|
virtual bool CanUseCanvasLayerForSize(const gfx::IntSize &aSize) MOZ_OVERRIDE;
|
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
|
|
|
|
2013-12-08 17:40:59 -08:00
|
|
|
virtual int32_t GetMaxTextureSize() const MOZ_OVERRIDE
|
|
|
|
{
|
|
|
|
MOZ_CRASH("Call on compositor, not LayerManagerComposite");
|
|
|
|
}
|
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
|
|
|
|
|
|
|
virtual void ClearCachedResources(Layer* aSubtree = nullptr) MOZ_OVERRIDE;
|
|
|
|
|
|
|
|
virtual already_AddRefed<ThebesLayer> CreateThebesLayer() MOZ_OVERRIDE;
|
|
|
|
virtual already_AddRefed<ContainerLayer> CreateContainerLayer() MOZ_OVERRIDE;
|
|
|
|
virtual already_AddRefed<ImageLayer> CreateImageLayer() MOZ_OVERRIDE;
|
|
|
|
virtual already_AddRefed<ColorLayer> CreateColorLayer() MOZ_OVERRIDE;
|
|
|
|
virtual already_AddRefed<CanvasLayer> CreateCanvasLayer() MOZ_OVERRIDE;
|
2013-04-25 15:25:33 -07:00
|
|
|
already_AddRefed<ThebesLayerComposite> CreateThebesLayerComposite();
|
|
|
|
already_AddRefed<ContainerLayerComposite> CreateContainerLayerComposite();
|
|
|
|
already_AddRefed<ImageLayerComposite> CreateImageLayerComposite();
|
|
|
|
already_AddRefed<ColorLayerComposite> CreateColorLayerComposite();
|
|
|
|
already_AddRefed<CanvasLayerComposite> CreateCanvasLayerComposite();
|
|
|
|
already_AddRefed<RefLayerComposite> CreateRefLayerComposite();
|
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
|
|
|
|
|
|
|
virtual LayersBackend GetBackendType() MOZ_OVERRIDE
|
|
|
|
{
|
2013-12-08 17:41:00 -08:00
|
|
|
MOZ_CRASH("Shouldn't be called for composited layer manager");
|
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
|
|
|
}
|
|
|
|
virtual void GetBackendName(nsAString& name) MOZ_OVERRIDE
|
|
|
|
{
|
2013-12-08 17:40:59 -08:00
|
|
|
MOZ_CRASH("Shouldn't be called for composited layer manager");
|
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
|
|
|
}
|
|
|
|
|
|
|
|
virtual already_AddRefed<gfxASurface>
|
2013-12-20 08:46:29 -08:00
|
|
|
CreateOptimalMaskSurface(const gfx::IntSize &aSize) MOZ_OVERRIDE;
|
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
|
|
|
|
|
|
|
virtual const char* Name() const MOZ_OVERRIDE { return ""; }
|
|
|
|
|
|
|
|
enum WorldTransforPolicy {
|
|
|
|
ApplyWorldTransform,
|
|
|
|
DontApplyWorldTransform
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Setup World transform matrix.
|
|
|
|
* Transform will be ignored if it is not PreservesAxisAlignedRectangles
|
|
|
|
* or has non integer scale
|
|
|
|
*/
|
2014-01-15 23:22:19 -08:00
|
|
|
void SetWorldTransform(const gfx::Matrix& aMatrix);
|
|
|
|
gfx::Matrix& GetWorldTransform(void);
|
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
|
|
|
|
2013-08-27 21:44:03 -07:00
|
|
|
/**
|
|
|
|
* RAII helper class to add a mask effect with the compositable from aMaskLayer
|
|
|
|
* to the EffectChain aEffect and notify the compositable when we are done.
|
|
|
|
*/
|
|
|
|
class AutoAddMaskEffect
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
AutoAddMaskEffect(Layer* aMaskLayer,
|
|
|
|
EffectChain& aEffect,
|
|
|
|
bool aIs3D = false);
|
|
|
|
~AutoAddMaskEffect();
|
|
|
|
|
|
|
|
private:
|
|
|
|
CompositableHost* mCompositable;
|
|
|
|
};
|
|
|
|
|
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
|
|
|
/**
|
|
|
|
* Creates a DrawTarget which is optimized for inter-operating with this
|
|
|
|
* layermanager.
|
|
|
|
*/
|
|
|
|
virtual TemporaryRef<mozilla::gfx::DrawTarget>
|
2013-12-08 17:41:00 -08:00
|
|
|
CreateDrawTarget(const mozilla::gfx::IntSize& aSize,
|
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
|
|
|
mozilla::gfx::SurfaceFormat aFormat) MOZ_OVERRIDE;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Calculates the 'completeness' of the rendering that intersected with the
|
|
|
|
* screen on the last render. This is only useful when progressive tile
|
|
|
|
* drawing is enabled, otherwise this will always return 1.0.
|
|
|
|
* This function's expense scales with the size of the layer tree and the
|
|
|
|
* complexity of individual layers' valid regions.
|
|
|
|
*/
|
|
|
|
float ComputeRenderIntegrity();
|
|
|
|
|
2013-04-25 15:25:33 -07:00
|
|
|
/**
|
|
|
|
* returns true if PlatformAllocBuffer will return a buffer that supports
|
|
|
|
* direct texturing
|
|
|
|
*/
|
|
|
|
static bool SupportsDirectTexturing();
|
|
|
|
|
|
|
|
static void PlatformSyncBeforeReplyUpdate();
|
|
|
|
|
2013-11-21 11:25:16 -08:00
|
|
|
void AddInvalidRegion(const nsIntRegion& aRegion)
|
|
|
|
{
|
|
|
|
mInvalidRegion.Or(mInvalidRegion, aRegion);
|
|
|
|
}
|
|
|
|
|
2013-04-25 15:25:33 -07:00
|
|
|
Compositor* GetCompositor() const
|
|
|
|
{
|
|
|
|
return mCompositor;
|
|
|
|
}
|
|
|
|
|
2013-12-03 07:49:46 -08:00
|
|
|
/**
|
|
|
|
* LayerManagerComposite provides sophisticated debug overlays
|
|
|
|
* that can request a next frame.
|
|
|
|
*/
|
|
|
|
bool DebugOverlayWantsNextFrame() { return mDebugOverlayWantsNextFrame; }
|
|
|
|
void SetDebugOverlayWantsNextFrame(bool aVal)
|
|
|
|
{ mDebugOverlayWantsNextFrame = aVal; }
|
|
|
|
|
2014-02-10 14:14:11 -08:00
|
|
|
void NotifyShadowTreeTransaction();
|
|
|
|
|
2014-03-11 19:27:30 -07:00
|
|
|
TextRenderer* GetTextRenderer() { return mTextRenderer; }
|
|
|
|
|
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
|
|
|
private:
|
|
|
|
/** Region we're clipping our current drawing to. */
|
|
|
|
nsIntRegion mClippingRegion;
|
|
|
|
nsIntRect mRenderBounds;
|
|
|
|
|
|
|
|
/** Current root layer. */
|
2013-12-08 17:41:00 -08:00
|
|
|
LayerComposite* RootLayer() const;
|
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
|
|
|
|
|
|
|
/**
|
|
|
|
* Recursive helper method for use by ComputeRenderIntegrity. Subtracts
|
|
|
|
* any incomplete rendering on aLayer from aScreenRegion. Any low-precision
|
|
|
|
* rendering is included in aLowPrecisionScreenRegion. aTransform is the
|
|
|
|
* accumulated transform of intermediate surfaces beneath aLayer.
|
|
|
|
*/
|
|
|
|
static void ComputeRenderIntegrityInternal(Layer* aLayer,
|
|
|
|
nsIntRegion& aScreenRegion,
|
|
|
|
nsIntRegion& aLowPrecisionScreenRegion,
|
|
|
|
const gfx3DMatrix& aTransform);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Render the current layer tree to the active target.
|
|
|
|
*/
|
|
|
|
void Render();
|
|
|
|
|
2013-07-06 09:19:52 -07:00
|
|
|
/**
|
|
|
|
* Render debug overlays such as the FPS/FrameCounter above the frame.
|
|
|
|
*/
|
|
|
|
void RenderDebugOverlay(const gfx::Rect& aBounds);
|
|
|
|
|
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
|
|
|
void WorldTransformRect(nsIntRect& aRect);
|
|
|
|
|
2013-11-21 14:07:56 -08:00
|
|
|
RefPtr<Compositor> mCompositor;
|
2014-02-10 14:14:11 -08:00
|
|
|
nsAutoPtr<LayerProperties> mClonedLayerTreeProperties;
|
2013-11-21 14:07:56 -08:00
|
|
|
|
2014-03-04 14:36:52 -08:00
|
|
|
/**
|
|
|
|
* Context target, nullptr when drawing directly to our swap chain.
|
|
|
|
*/
|
|
|
|
RefPtr<gfx::DrawTarget> mTarget;
|
|
|
|
|
2014-01-15 23:22:19 -08:00
|
|
|
gfx::Matrix mWorldMatrix;
|
2014-02-10 14:14:11 -08:00
|
|
|
nsIntRegion mInvalidRegion;
|
|
|
|
nsAutoPtr<FPSState> mFPS;
|
2013-11-21 11:25:16 -08:00
|
|
|
|
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
|
|
|
bool mInTransaction;
|
2013-11-21 14:07:57 -08:00
|
|
|
bool mIsCompositorReady;
|
2013-12-03 07:49:46 -08:00
|
|
|
bool mDebugOverlayWantsNextFrame;
|
2014-03-11 19:27:30 -07:00
|
|
|
|
|
|
|
RefPtr<TextRenderer> mTextRenderer;
|
2014-04-03 18:59:13 -07:00
|
|
|
bool mGeometryChanged;
|
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
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
2013-04-25 15:25:33 -07:00
|
|
|
* Composite layers are for use with OMTC on the compositor thread only. There
|
|
|
|
* must be corresponding Basic layers on the content thread. For composite
|
|
|
|
* layers, the layer manager only maintains the layer tree, all rendering is
|
|
|
|
* done by a Compositor (see Compositor.h). As such, composite layers are
|
|
|
|
* platform-independent and can be used on any platform for which there is a
|
|
|
|
* Compositor implementation.
|
|
|
|
*
|
|
|
|
* The composite layer tree reflects exactly the basic layer tree. To
|
|
|
|
* composite to screen, the layer manager walks the layer tree calling render
|
|
|
|
* methods which in turn call into their CompositableHosts' Composite methods.
|
|
|
|
* These call Compositor::DrawQuad to do the rendering.
|
|
|
|
*
|
|
|
|
* Mostly, layers are updated during the layers transaction. This is done from
|
|
|
|
* CompositableClient to CompositableHost without interacting with the layer.
|
|
|
|
*
|
|
|
|
* A reference to the Compositor is stored in LayerManagerComposite.
|
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
|
|
|
*/
|
|
|
|
class LayerComposite
|
|
|
|
{
|
|
|
|
public:
|
2013-04-25 15:25:33 -07:00
|
|
|
LayerComposite(LayerManagerComposite* aManager);
|
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
|
|
|
|
2013-04-25 15:25:33 -07:00
|
|
|
virtual ~LayerComposite();
|
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
|
|
|
|
2013-04-25 15:25:33 -07:00
|
|
|
virtual LayerComposite* GetFirstChildComposite()
|
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
|
|
|
{
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Do NOT call this from the generic LayerComposite destructor. Only from the
|
|
|
|
* concrete class destructor
|
|
|
|
*/
|
|
|
|
virtual void Destroy();
|
|
|
|
|
|
|
|
virtual Layer* GetLayer() = 0;
|
|
|
|
|
2013-11-07 01:53:08 -08:00
|
|
|
virtual void RenderLayer(const nsIntRect& aClipRect) = 0;
|
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
|
|
|
|
2014-02-20 05:05:30 -08:00
|
|
|
virtual bool SetCompositableHost(CompositableHost*)
|
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
|
|
|
{
|
2014-02-20 05:05:30 -08:00
|
|
|
// We must handle this gracefully, see bug 967824
|
|
|
|
NS_WARNING("called SetCompositableHost for a layer type not accepting a compositable");
|
|
|
|
return false;
|
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
|
|
|
}
|
|
|
|
virtual CompositableHost* GetCompositableHost() = 0;
|
|
|
|
|
|
|
|
virtual void CleanupResources() = 0;
|
|
|
|
|
2013-04-16 14:36:06 -07:00
|
|
|
virtual TiledLayerComposer* GetTiledLayerComposer() { return nullptr; }
|
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
|
|
|
|
2013-04-25 15:25:33 -07:00
|
|
|
|
|
|
|
virtual void DestroyFrontBuffer() { }
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The following methods are
|
|
|
|
*
|
|
|
|
* CONSTRUCTION PHASE ONLY
|
|
|
|
*
|
|
|
|
* They are analogous to the Layer interface.
|
|
|
|
*/
|
|
|
|
void SetShadowVisibleRegion(const nsIntRegion& aRegion)
|
|
|
|
{
|
|
|
|
mShadowVisibleRegion = aRegion;
|
|
|
|
}
|
|
|
|
|
|
|
|
void SetShadowOpacity(float aOpacity)
|
|
|
|
{
|
|
|
|
mShadowOpacity = aOpacity;
|
|
|
|
}
|
|
|
|
|
|
|
|
void SetShadowClipRect(const nsIntRect* aRect)
|
|
|
|
{
|
|
|
|
mUseShadowClipRect = aRect != nullptr;
|
|
|
|
if (aRect) {
|
|
|
|
mShadowClipRect = *aRect;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-01-27 07:29:27 -08:00
|
|
|
void SetShadowTransform(const gfx::Matrix4x4& aMatrix)
|
2013-04-25 15:25:33 -07:00
|
|
|
{
|
|
|
|
mShadowTransform = aMatrix;
|
|
|
|
}
|
2013-05-16 05:34:24 -07:00
|
|
|
void SetShadowTransformSetByAnimation(bool aSetByAnimation)
|
|
|
|
{
|
|
|
|
mShadowTransformSetByAnimation = aSetByAnimation;
|
|
|
|
}
|
2013-04-25 15:25:33 -07:00
|
|
|
|
2013-10-15 14:01:42 -07:00
|
|
|
void SetLayerComposited(bool value)
|
|
|
|
{
|
|
|
|
mLayerComposited = value;
|
|
|
|
}
|
|
|
|
|
2014-02-27 11:07:34 -08:00
|
|
|
void SetClearRect(const nsIntRect& aRect)
|
2014-01-17 18:55:30 -08:00
|
|
|
{
|
2014-02-27 11:07:34 -08:00
|
|
|
mClearRect = aRect;
|
2014-01-17 18:55:30 -08:00
|
|
|
}
|
|
|
|
|
2013-04-25 15:25:33 -07:00
|
|
|
// These getters can be used anytime.
|
|
|
|
float GetShadowOpacity() { return mShadowOpacity; }
|
|
|
|
const nsIntRect* GetShadowClipRect() { return mUseShadowClipRect ? &mShadowClipRect : nullptr; }
|
|
|
|
const nsIntRegion& GetShadowVisibleRegion() { return mShadowVisibleRegion; }
|
2014-01-27 07:29:27 -08:00
|
|
|
const gfx::Matrix4x4& GetShadowTransform() { return mShadowTransform; }
|
2013-05-16 05:34:24 -07:00
|
|
|
bool GetShadowTransformSetByAnimation() { return mShadowTransformSetByAnimation; }
|
2013-10-15 14:01:42 -07:00
|
|
|
bool HasLayerBeenComposited() { return mLayerComposited; }
|
2014-02-27 11:07:34 -08:00
|
|
|
nsIntRect GetClearRect() { return mClearRect; }
|
2013-04-25 15:25:33 -07:00
|
|
|
|
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
|
|
|
protected:
|
2014-01-27 07:29:27 -08:00
|
|
|
gfx::Matrix4x4 mShadowTransform;
|
2013-04-25 15:25:33 -07:00
|
|
|
nsIntRegion mShadowVisibleRegion;
|
|
|
|
nsIntRect mShadowClipRect;
|
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
|
|
|
LayerManagerComposite* mCompositeManager;
|
|
|
|
RefPtr<Compositor> mCompositor;
|
2013-04-25 15:25:33 -07:00
|
|
|
float mShadowOpacity;
|
|
|
|
bool mUseShadowClipRect;
|
2013-05-16 05:34:24 -07:00
|
|
|
bool mShadowTransformSetByAnimation;
|
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
|
|
|
bool mDestroyed;
|
2013-10-15 14:01:42 -07:00
|
|
|
bool mLayerComposited;
|
2014-02-27 11:07:34 -08:00
|
|
|
nsIntRect mClearRect;
|
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
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
} /* layers */
|
|
|
|
} /* mozilla */
|
|
|
|
|
|
|
|
#endif /* GFX_LayerManagerComposite_H */
|