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
|
|
|
/* -*- 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 MOZILLA_LAYERS_EFFECTS_H
|
|
|
|
#define MOZILLA_LAYERS_EFFECTS_H
|
|
|
|
|
2013-08-11 23:17:23 +00:00
|
|
|
#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc
|
|
|
|
#include "mozilla/RefPtr.h" // for RefPtr, TemporaryRef, etc
|
|
|
|
#include "mozilla/gfx/Matrix.h" // for Matrix4x4
|
|
|
|
#include "mozilla/gfx/Point.h" // for IntSize
|
|
|
|
#include "mozilla/gfx/Rect.h" // for Rect
|
|
|
|
#include "mozilla/gfx/Types.h" // for Filter, etc
|
|
|
|
#include "mozilla/layers/CompositorTypes.h" // for EffectTypes, etc
|
2013-11-17 21:47:40 +00:00
|
|
|
#include "mozilla/layers/LayersTypes.h"
|
2013-08-11 23:17:23 +00:00
|
|
|
#include "mozilla/layers/TextureHost.h" // for CompositingRenderTarget, etc
|
|
|
|
#include "mozilla/mozalloc.h" // for operator delete, etc
|
|
|
|
#include "nscore.h" // for nsACString
|
2014-04-26 02:34:06 +00:00
|
|
|
#include "mozilla/EnumeratedArray.h"
|
2014-07-09 19:26:18 +00:00
|
|
|
#include "gfxVR.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 09:20:52 +00:00
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace layers {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Effects and effect chains are used by the compositor API (see Compositor.h).
|
|
|
|
* An effect chain represents a rendering method, for example some shader and
|
|
|
|
* the data required for that shader to run. An effect is some component of the
|
|
|
|
* chain and its data.
|
|
|
|
*
|
|
|
|
* An effect chain consists of a primary effect - how the 'texture' memory should
|
|
|
|
* be interpreted (RGBA, BGRX, YCBCR, etc.) - and any number of secondary effects
|
|
|
|
* - any way in which rendering can be changed, e.g., applying a mask layer.
|
|
|
|
*
|
|
|
|
* During the rendering process, an effect chain is created by the layer being
|
|
|
|
* rendered and the primary effect is added by the compositable host. Secondary
|
|
|
|
* effects may be added by the layer or compositable. The effect chain is passed
|
|
|
|
* to the compositor by the compositable host as a parameter to DrawQuad.
|
|
|
|
*/
|
|
|
|
|
2014-04-14 19:04:24 +00:00
|
|
|
struct Effect
|
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
|
|
|
{
|
2014-04-14 19:04:24 +00:00
|
|
|
NS_INLINE_DECL_REFCOUNTING(Effect)
|
|
|
|
|
2014-08-20 04:55:14 +00:00
|
|
|
explicit Effect(EffectTypes aType) : mType(aType) {}
|
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
|
|
|
|
|
|
|
EffectTypes mType;
|
|
|
|
|
2014-06-19 22:36:25 +00:00
|
|
|
virtual void PrintInfo(std::stringstream& aStream, const char* aPrefix) = 0;
|
2014-04-14 19:04:24 +00:00
|
|
|
|
|
|
|
protected:
|
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
|
|
|
virtual ~Effect() {}
|
|
|
|
};
|
|
|
|
|
|
|
|
// Render from a texture
|
|
|
|
struct TexturedEffect : public Effect
|
|
|
|
{
|
|
|
|
TexturedEffect(EffectTypes aType,
|
|
|
|
TextureSource *aTexture,
|
|
|
|
bool aPremultiplied,
|
|
|
|
gfx::Filter aFilter)
|
|
|
|
: Effect(aType)
|
|
|
|
, mTextureCoords(0, 0, 1.0f, 1.0f)
|
|
|
|
, mTexture(aTexture)
|
|
|
|
, mPremultiplied(aPremultiplied)
|
|
|
|
, mFilter(aFilter)
|
|
|
|
{}
|
|
|
|
|
|
|
|
virtual const char* Name() = 0;
|
2014-06-19 22:36:25 +00:00
|
|
|
virtual void PrintInfo(std::stringstream& aStream, const char* aPrefix);
|
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
|
|
|
|
|
|
|
gfx::Rect mTextureCoords;
|
|
|
|
TextureSource* mTexture;
|
|
|
|
bool mPremultiplied;
|
2014-06-19 00:04:05 +00:00
|
|
|
gfx::Filter mFilter;
|
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
|
|
|
};
|
|
|
|
|
|
|
|
// Support an alpha mask.
|
|
|
|
struct EffectMask : public Effect
|
|
|
|
{
|
|
|
|
EffectMask(TextureSource *aMaskTexture,
|
|
|
|
gfx::IntSize aSize,
|
|
|
|
const gfx::Matrix4x4 &aMaskTransform)
|
2014-04-26 02:34:06 +00:00
|
|
|
: Effect(EffectTypes::MASK)
|
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
|
|
|
, mMaskTexture(aMaskTexture)
|
|
|
|
, mIs3D(false)
|
|
|
|
, mSize(aSize)
|
|
|
|
, mMaskTransform(aMaskTransform)
|
|
|
|
{}
|
|
|
|
|
2014-06-19 22:36:25 +00:00
|
|
|
virtual void PrintInfo(std::stringstream& aStream, const char* aPrefix);
|
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
|
|
|
|
|
|
|
TextureSource* mMaskTexture;
|
|
|
|
bool mIs3D;
|
|
|
|
gfx::IntSize mSize;
|
|
|
|
gfx::Matrix4x4 mMaskTransform;
|
|
|
|
};
|
|
|
|
|
2014-07-09 19:26:18 +00:00
|
|
|
struct EffectVRDistortion : public Effect
|
|
|
|
{
|
|
|
|
EffectVRDistortion(gfx::VRHMDInfo* aHMD,
|
|
|
|
CompositingRenderTarget* aRenderTarget)
|
|
|
|
: Effect(EffectTypes::VR_DISTORTION)
|
|
|
|
, mHMD(aHMD)
|
|
|
|
, mRenderTarget(aRenderTarget)
|
|
|
|
, mTexture(aRenderTarget)
|
|
|
|
{}
|
|
|
|
|
|
|
|
EffectVRDistortion(gfx::VRHMDInfo* aHMD,
|
|
|
|
TextureSource* aTexture)
|
|
|
|
: Effect(EffectTypes::VR_DISTORTION)
|
|
|
|
, mHMD(aHMD)
|
|
|
|
, mRenderTarget(nullptr)
|
|
|
|
, mTexture(aTexture)
|
|
|
|
{}
|
|
|
|
|
|
|
|
virtual const char* Name() { return "EffectVRDistortion"; }
|
|
|
|
virtual void PrintInfo(std::stringstream& aStream, const char* aPrefix);
|
|
|
|
|
|
|
|
nsRefPtr<gfx::VRHMDInfo> mHMD;
|
|
|
|
RefPtr<CompositingRenderTarget> mRenderTarget;
|
|
|
|
TextureSource* mTexture;
|
|
|
|
|
|
|
|
// The viewport for each eye in the source and
|
|
|
|
// destination textures.
|
|
|
|
gfx::IntRect mViewports[2];
|
|
|
|
};
|
|
|
|
|
2014-05-09 09:48:29 +00:00
|
|
|
struct EffectBlendMode : public Effect
|
|
|
|
{
|
2014-08-20 04:55:14 +00:00
|
|
|
explicit EffectBlendMode(gfx::CompositionOp aBlendMode)
|
2014-05-09 09:48:29 +00:00
|
|
|
: Effect(EffectTypes::BLEND_MODE)
|
|
|
|
, mBlendMode(aBlendMode)
|
|
|
|
{ }
|
|
|
|
|
|
|
|
virtual const char* Name() { return "EffectBlendMode"; }
|
2014-06-19 22:36:25 +00:00
|
|
|
virtual void PrintInfo(std::stringstream& aStream, const char* aPrefix);
|
2014-05-09 09:48:29 +00:00
|
|
|
|
|
|
|
gfx::CompositionOp mBlendMode;
|
|
|
|
};
|
|
|
|
|
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
|
|
|
// Render to a render target rather than the screen.
|
|
|
|
struct EffectRenderTarget : public TexturedEffect
|
|
|
|
{
|
2014-08-20 04:55:14 +00:00
|
|
|
explicit EffectRenderTarget(CompositingRenderTarget *aRenderTarget)
|
2014-04-26 02:34:06 +00:00
|
|
|
: TexturedEffect(EffectTypes::RENDER_TARGET, aRenderTarget, true, gfx::Filter::LINEAR)
|
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
|
|
|
, mRenderTarget(aRenderTarget)
|
|
|
|
{}
|
|
|
|
|
|
|
|
virtual const char* Name() { return "EffectRenderTarget"; }
|
2014-06-19 22:36:25 +00:00
|
|
|
virtual void PrintInfo(std::stringstream& aStream, const char* aPrefix);
|
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
|
|
|
|
|
|
|
RefPtr<CompositingRenderTarget> mRenderTarget;
|
2014-08-07 21:44:08 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
EffectRenderTarget(EffectTypes aType, CompositingRenderTarget *aRenderTarget)
|
|
|
|
: TexturedEffect(aType, aRenderTarget, true, gfx::Filter::LINEAR)
|
|
|
|
, mRenderTarget(aRenderTarget)
|
|
|
|
{}
|
|
|
|
|
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
|
|
|
};
|
|
|
|
|
2014-08-07 21:44:08 +00:00
|
|
|
// Render to a render target rather than the screen.
|
|
|
|
struct EffectColorMatrix : public Effect
|
|
|
|
{
|
2014-09-01 03:31:20 +00:00
|
|
|
explicit EffectColorMatrix(gfx::Matrix5x4 aMatrix)
|
2014-08-07 21:44:08 +00:00
|
|
|
: Effect(EffectTypes::COLOR_MATRIX)
|
|
|
|
, mColorMatrix(aMatrix)
|
|
|
|
{}
|
|
|
|
|
|
|
|
virtual const char* Name() { return "EffectColorMatrix"; }
|
|
|
|
virtual void PrintInfo(std::stringstream& aStream, const char* aPrefix);
|
|
|
|
const gfx::Matrix5x4 mColorMatrix;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2013-11-08 06:22:05 +00:00
|
|
|
struct EffectRGB : public TexturedEffect
|
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
|
|
|
{
|
2013-11-08 06:22:05 +00:00
|
|
|
EffectRGB(TextureSource *aTexture,
|
|
|
|
bool aPremultiplied,
|
|
|
|
gfx::Filter aFilter,
|
|
|
|
bool aFlipped = false)
|
2014-04-26 02:34:06 +00:00
|
|
|
: TexturedEffect(EffectTypes::RGB, aTexture, aPremultiplied, aFilter)
|
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
|
|
|
{}
|
|
|
|
|
2013-11-08 06:22:05 +00:00
|
|
|
virtual const char* Name() { return "EffectRGB"; }
|
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
|
|
|
};
|
|
|
|
|
|
|
|
struct EffectYCbCr : public TexturedEffect
|
|
|
|
{
|
|
|
|
EffectYCbCr(TextureSource *aSource, gfx::Filter aFilter)
|
2014-04-26 02:34:06 +00:00
|
|
|
: TexturedEffect(EffectTypes::YCBCR, aSource, false, aFilter)
|
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
|
|
|
{}
|
|
|
|
|
|
|
|
virtual const char* Name() { return "EffectYCbCr"; }
|
|
|
|
};
|
|
|
|
|
|
|
|
struct EffectComponentAlpha : public TexturedEffect
|
|
|
|
{
|
2013-04-22 02:40:52 +00:00
|
|
|
EffectComponentAlpha(TextureSource *aOnBlack,
|
|
|
|
TextureSource *aOnWhite,
|
|
|
|
gfx::Filter aFilter)
|
2014-04-26 02:34:06 +00:00
|
|
|
: TexturedEffect(EffectTypes::COMPONENT_ALPHA, nullptr, false, aFilter)
|
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
|
|
|
, mOnBlack(aOnBlack)
|
2013-04-22 02:40:52 +00:00
|
|
|
, mOnWhite(aOnWhite)
|
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
|
|
|
{}
|
|
|
|
|
|
|
|
virtual const char* Name() { return "EffectComponentAlpha"; }
|
|
|
|
|
|
|
|
TextureSource* mOnBlack;
|
2013-04-22 02:40:52 +00:00
|
|
|
TextureSource* mOnWhite;
|
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
|
|
|
};
|
|
|
|
|
|
|
|
struct EffectSolidColor : public Effect
|
|
|
|
{
|
2014-08-20 04:55:14 +00:00
|
|
|
explicit EffectSolidColor(const gfx::Color &aColor)
|
2014-04-26 02:34:06 +00:00
|
|
|
: Effect(EffectTypes::SOLID_COLOR)
|
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
|
|
|
, mColor(aColor)
|
|
|
|
{}
|
|
|
|
|
2014-06-19 22:36:25 +00:00
|
|
|
virtual void PrintInfo(std::stringstream& aStream, const char* aPrefix);
|
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
|
|
|
|
|
|
|
gfx::Color mColor;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct EffectChain
|
|
|
|
{
|
2014-01-06 15:06:04 +00:00
|
|
|
EffectChain() : mLayerRef(nullptr) {}
|
2013-11-29 04:11:49 +00:00
|
|
|
explicit EffectChain(void* aLayerRef) : mLayerRef(aLayerRef) {}
|
|
|
|
|
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
|
|
|
RefPtr<Effect> mPrimaryEffect;
|
2014-04-26 02:34:06 +00:00
|
|
|
EnumeratedArray<EffectTypes, EffectTypes::MAX_SECONDARY, RefPtr<Effect>>
|
|
|
|
mSecondaryEffects;
|
2013-11-29 04:11:49 +00:00
|
|
|
void* mLayerRef; //!< For LayerScope logging
|
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
|
|
|
};
|
|
|
|
|
2013-07-24 15:34:09 +00:00
|
|
|
/**
|
|
|
|
* Create a Textured effect corresponding to aFormat and using
|
|
|
|
* aSource as the (first) texture source.
|
|
|
|
*
|
|
|
|
* Note that aFormat can be different form aSource->GetFormat if, we are
|
|
|
|
* creating an effect that takes several texture sources (like with YCBCR
|
|
|
|
* where aFormat would be FOMRAT_YCBCR and each texture source would be
|
|
|
|
* a one-channel A8 texture)
|
|
|
|
*/
|
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
|
|
|
inline TemporaryRef<TexturedEffect>
|
2013-07-24 15:34:09 +00:00
|
|
|
CreateTexturedEffect(gfx::SurfaceFormat aFormat,
|
|
|
|
TextureSource* aSource,
|
2014-06-19 00:04:06 +00:00
|
|
|
const gfx::Filter& aFilter,
|
|
|
|
bool isAlphaPremultiplied)
|
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
|
|
|
{
|
2013-07-24 15:34:09 +00:00
|
|
|
MOZ_ASSERT(aSource);
|
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
|
|
|
RefPtr<TexturedEffect> result;
|
2013-07-24 15:34:09 +00:00
|
|
|
switch (aFormat) {
|
2014-01-10 19:06:16 +00:00
|
|
|
case gfx::SurfaceFormat::B8G8R8A8:
|
|
|
|
case gfx::SurfaceFormat::B8G8R8X8:
|
|
|
|
case gfx::SurfaceFormat::R8G8B8X8:
|
|
|
|
case gfx::SurfaceFormat::R5G6B5:
|
|
|
|
case gfx::SurfaceFormat::R8G8B8A8:
|
2014-06-19 00:04:06 +00:00
|
|
|
result = new EffectRGB(aSource, isAlphaPremultiplied, aFilter);
|
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
|
|
|
break;
|
2014-01-10 19:06:16 +00:00
|
|
|
case gfx::SurfaceFormat::YUV:
|
2013-07-24 15:34:09 +00:00
|
|
|
result = new EffectYCbCr(aSource, aFilter);
|
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
|
|
|
break;
|
|
|
|
default:
|
2013-11-21 22:07:56 +00:00
|
|
|
NS_WARNING("unhandled program type");
|
|
|
|
break;
|
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
|
|
|
}
|
|
|
|
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
2013-07-24 15:34:09 +00:00
|
|
|
/**
|
|
|
|
* Create a textured effect based on aSource format and the presence of
|
|
|
|
* aSourceOnWhite.
|
|
|
|
*
|
|
|
|
* aSourceOnWhite can be null.
|
|
|
|
*/
|
2013-04-22 02:40:52 +00:00
|
|
|
inline TemporaryRef<TexturedEffect>
|
2013-07-24 15:34:09 +00:00
|
|
|
CreateTexturedEffect(TextureSource* aSource,
|
|
|
|
TextureSource* aSourceOnWhite,
|
2014-06-19 00:04:06 +00:00
|
|
|
const gfx::Filter& aFilter,
|
|
|
|
bool isAlphaPremultiplied)
|
2013-04-22 02:40:52 +00:00
|
|
|
{
|
2013-07-24 15:34:09 +00:00
|
|
|
MOZ_ASSERT(aSource);
|
|
|
|
if (aSourceOnWhite) {
|
2014-01-10 19:06:16 +00:00
|
|
|
MOZ_ASSERT(aSource->GetFormat() == gfx::SurfaceFormat::R8G8B8X8 ||
|
|
|
|
aSourceOnWhite->GetFormat() == gfx::SurfaceFormat::B8G8R8X8);
|
2013-07-24 15:34:09 +00:00
|
|
|
return new EffectComponentAlpha(aSource, aSourceOnWhite, aFilter);
|
|
|
|
}
|
|
|
|
|
2014-06-19 00:04:06 +00:00
|
|
|
return CreateTexturedEffect(aSource->GetFormat(),
|
|
|
|
aSource,
|
|
|
|
aFilter,
|
|
|
|
isAlphaPremultiplied);
|
2013-04-22 02:40:52 +00:00
|
|
|
}
|
|
|
|
|
2013-07-24 15:34:09 +00:00
|
|
|
/**
|
|
|
|
* Create a textured effect based on aSource format.
|
|
|
|
*
|
|
|
|
* This version excudes the possibility of component alpha.
|
|
|
|
*/
|
|
|
|
inline TemporaryRef<TexturedEffect>
|
|
|
|
CreateTexturedEffect(TextureSource *aTexture,
|
|
|
|
const gfx::Filter& aFilter)
|
|
|
|
{
|
2014-06-19 00:04:06 +00:00
|
|
|
return CreateTexturedEffect(aTexture, nullptr, aFilter, true);
|
2013-07-24 15:34:09 +00: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 09:20:52 +00:00
|
|
|
} // namespace layers
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif
|