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_GFX_COMPOSITOROGL_H
|
|
|
|
#define MOZILLA_GFX_COMPOSITOROGL_H
|
|
|
|
|
2013-09-04 12:14:52 +00:00
|
|
|
#include "GLContextTypes.h" // for GLContext, etc
|
|
|
|
#include "GLDefs.h" // for GLuint, LOCAL_GL_TEXTURE_2D, etc
|
2013-11-26 22:15:17 +00:00
|
|
|
#include "OGLShaderProgram.h" // for ShaderProgramOGL, etc
|
2013-08-11 23:17:23 +00:00
|
|
|
#include "Units.h" // for ScreenPoint
|
|
|
|
#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc
|
|
|
|
#include "mozilla/Attributes.h" // for MOZ_OVERRIDE, MOZ_FINAL
|
|
|
|
#include "mozilla/RefPtr.h" // for TemporaryRef, RefPtr
|
2013-09-27 00:37:19 +00:00
|
|
|
#include "mozilla/gfx/2D.h" // for DrawTarget
|
2013-08-11 23:17:23 +00:00
|
|
|
#include "mozilla/gfx/BaseSize.h" // for BaseSize
|
|
|
|
#include "mozilla/gfx/Point.h" // for IntSize, Point
|
|
|
|
#include "mozilla/gfx/Rect.h" // for Rect, IntRect
|
|
|
|
#include "mozilla/gfx/Types.h" // for Float, SurfaceFormat, etc
|
|
|
|
#include "mozilla/layers/Compositor.h" // for SurfaceInitMode, Compositor, etc
|
|
|
|
#include "mozilla/layers/CompositorTypes.h" // for MaskType::NumMaskTypes, etc
|
|
|
|
#include "mozilla/layers/LayersTypes.h"
|
|
|
|
#include "nsAutoPtr.h" // for nsRefPtr, nsAutoPtr
|
|
|
|
#include "nsCOMPtr.h" // for already_AddRefed
|
|
|
|
#include "nsDebug.h" // for NS_ASSERTION, NS_WARNING
|
|
|
|
#include "nsSize.h" // for nsIntSize
|
|
|
|
#include "nsTArray.h" // for nsAutoTArray, nsTArray, etc
|
|
|
|
#include "nsThreadUtils.h" // for nsRunnable
|
|
|
|
#include "nsTraceRefcnt.h" // for MOZ_COUNT_CTOR, etc
|
|
|
|
#include "nsXULAppAPI.h" // for XRE_GetProcessType
|
|
|
|
#include "nscore.h" // for NS_IMETHOD
|
2013-08-22 19:04:55 +00:00
|
|
|
#include "VBOArena.h" // for gl::VBOArena
|
|
|
|
|
2013-08-11 23:17:23 +00:00
|
|
|
class gfx3DMatrix;
|
|
|
|
class nsIWidget;
|
|
|
|
struct gfxMatrix;
|
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 {
|
2013-08-24 06:12:51 +00:00
|
|
|
class TimeStamp;
|
|
|
|
|
2013-08-11 23:17:23 +00:00
|
|
|
namespace gfx {
|
|
|
|
class Matrix4x4;
|
|
|
|
}
|
|
|
|
|
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 {
|
|
|
|
|
2013-08-11 23:17:23 +00:00
|
|
|
class CompositingRenderTarget;
|
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
|
|
|
class CompositingRenderTargetOGL;
|
2013-08-11 23:17:23 +00:00
|
|
|
class DataTextureSource;
|
2013-04-16 21:35:57 +00:00
|
|
|
class GLManagerCompositor;
|
2013-08-11 23:17:23 +00:00
|
|
|
class TextureSource;
|
|
|
|
struct Effect;
|
|
|
|
struct EffectChain;
|
|
|
|
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 09:20:52 +00:00
|
|
|
|
|
|
|
class CompositorOGL : public Compositor
|
|
|
|
{
|
|
|
|
typedef mozilla::gl::GLContext GLContext;
|
2013-11-01 15:51:32 +00:00
|
|
|
typedef ShaderProgramType ProgramType;
|
2013-04-16 21:35:57 +00:00
|
|
|
|
|
|
|
friend class GLManagerCompositor;
|
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
|
|
|
|
|
|
|
public:
|
|
|
|
CompositorOGL(nsIWidget *aWidget, int aSurfaceWidth = -1, int aSurfaceHeight = -1,
|
2013-04-30 03:16:04 +00:00
|
|
|
bool aUseExternalSurfaceSize = 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 09:20:52 +00:00
|
|
|
|
|
|
|
virtual ~CompositorOGL();
|
|
|
|
|
2013-07-30 09:59:51 +00:00
|
|
|
virtual TemporaryRef<DataTextureSource>
|
|
|
|
CreateDataTextureSource(TextureFlags aFlags = 0) 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 09:20:52 +00:00
|
|
|
virtual bool Initialize() MOZ_OVERRIDE;
|
|
|
|
|
|
|
|
virtual void Destroy() MOZ_OVERRIDE;
|
|
|
|
|
|
|
|
virtual TextureFactoryIdentifier GetTextureFactoryIdentifier() MOZ_OVERRIDE
|
|
|
|
{
|
2013-05-16 03:45:43 +00:00
|
|
|
return TextureFactoryIdentifier(LAYERS_OPENGL,
|
2013-08-04 07:46:17 +00:00
|
|
|
XRE_GetProcessType(),
|
2013-05-16 03:45:43 +00:00
|
|
|
GetMaxTextureSize(),
|
|
|
|
mFBOTextureTarget == LOCAL_GL_TEXTURE_2D,
|
|
|
|
SupportsPartialTextureUpdate());
|
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 TemporaryRef<CompositingRenderTarget>
|
|
|
|
CreateRenderTarget(const gfx::IntRect &aRect, SurfaceInitMode aInit) MOZ_OVERRIDE;
|
|
|
|
|
|
|
|
virtual TemporaryRef<CompositingRenderTarget>
|
|
|
|
CreateRenderTargetFromSource(const gfx::IntRect &aRect,
|
2013-11-07 09:53:07 +00:00
|
|
|
const CompositingRenderTarget *aSource,
|
|
|
|
const gfx::IntPoint &aSourcePoint) 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 09:20:52 +00:00
|
|
|
|
|
|
|
virtual void SetRenderTarget(CompositingRenderTarget *aSurface) MOZ_OVERRIDE;
|
|
|
|
virtual CompositingRenderTarget* GetCurrentRenderTarget() MOZ_OVERRIDE;
|
|
|
|
|
2013-11-07 09:53:08 +00:00
|
|
|
virtual void DrawQuad(const gfx::Rect& aRect,
|
|
|
|
const gfx::Rect& aClipRect,
|
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
|
|
|
const EffectChain &aEffectChain,
|
2013-11-07 09:53:08 +00:00
|
|
|
gfx::Float aOpacity,
|
|
|
|
const gfx::Matrix4x4 &aTransform) 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 09:20:52 +00:00
|
|
|
|
|
|
|
virtual void EndFrame() MOZ_OVERRIDE;
|
|
|
|
virtual void EndFrameForExternalComposition(const gfxMatrix& aTransform) MOZ_OVERRIDE;
|
|
|
|
virtual void AbortFrame() MOZ_OVERRIDE;
|
|
|
|
|
2013-09-04 12:14:52 +00:00
|
|
|
virtual bool SupportsPartialTextureUpdate() 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 09:20:52 +00:00
|
|
|
|
2013-09-27 00:37:19 +00: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 09:20:52 +00:00
|
|
|
{
|
|
|
|
if (!mGLContext)
|
|
|
|
return false;
|
|
|
|
int32_t maxSize = GetMaxTextureSize();
|
2013-09-27 00:37:19 +00:00
|
|
|
return aSize <= gfx::IntSize(maxSize, maxSize);
|
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-09-04 12:14:52 +00:00
|
|
|
virtual int32_t GetMaxTextureSize() const 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 09:20:52 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Set the size of the EGL surface we're rendering to, if we're rendering to
|
|
|
|
* an EGL surface.
|
|
|
|
*/
|
|
|
|
virtual void SetDestinationSurfaceSize(const gfx::IntSize& aSize) MOZ_OVERRIDE;
|
|
|
|
|
2013-06-03 14:00:02 +00:00
|
|
|
virtual void SetScreenRenderOffset(const ScreenPoint& aOffset) MOZ_OVERRIDE {
|
2013-04-25 17:47:08 +00:00
|
|
|
mRenderOffset = aOffset;
|
|
|
|
}
|
|
|
|
|
2013-09-04 12:14:52 +00:00
|
|
|
virtual void MakeCurrent(MakeCurrentFlags aFlags = 0) 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 09:20:52 +00:00
|
|
|
|
2013-09-27 00:37:19 +00:00
|
|
|
virtual void SetTargetContext(gfx::DrawTarget* aTarget) 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 09:20:52 +00:00
|
|
|
{
|
|
|
|
mTarget = aTarget;
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual void PrepareViewport(const gfx::IntSize& aSize,
|
|
|
|
const gfxMatrix& aWorldTransform) MOZ_OVERRIDE;
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef MOZ_DUMP_PAINTING
|
|
|
|
virtual const char* Name() const MOZ_OVERRIDE { return "OGL"; }
|
|
|
|
#endif // MOZ_DUMP_PAINTING
|
|
|
|
|
|
|
|
virtual void NotifyLayersTransaction() MOZ_OVERRIDE;
|
|
|
|
|
|
|
|
virtual void Pause() MOZ_OVERRIDE;
|
|
|
|
virtual bool Resume() MOZ_OVERRIDE;
|
|
|
|
|
|
|
|
virtual nsIWidget* GetWidget() const MOZ_OVERRIDE { return mWidget; }
|
|
|
|
virtual const nsIntSize& GetWidgetSize() MOZ_OVERRIDE {
|
|
|
|
return mWidgetSize;
|
|
|
|
}
|
|
|
|
|
|
|
|
GLContext* gl() const { return mGLContext; }
|
2013-11-01 15:51:32 +00:00
|
|
|
ShaderProgramType GetFBOLayerProgramType() const {
|
|
|
|
return mFBOTextureTarget == LOCAL_GL_TEXTURE_RECTANGLE_ARB ?
|
|
|
|
RGBARectLayerProgramType : RGBALayerProgramType;
|
|
|
|
}
|
2013-07-04 17:25:50 +00:00
|
|
|
gfx::SurfaceFormat GetFBOFormat() const {
|
|
|
|
return gfx::FORMAT_R8G8B8A8;
|
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-10-04 12:03:09 +00:00
|
|
|
virtual void SaveState() MOZ_OVERRIDE;
|
|
|
|
virtual void RestoreState() MOZ_OVERRIDE;
|
|
|
|
|
2013-06-04 18:44:37 +00:00
|
|
|
/**
|
|
|
|
* The compositor provides with temporary textures for use with direct
|
|
|
|
* textruing like gralloc texture.
|
|
|
|
* Doing so lets us use gralloc the way it has been designed to be used
|
|
|
|
* (see https://wiki.mozilla.org/Platform/GFX/Gralloc)
|
|
|
|
*/
|
|
|
|
GLuint GetTemporaryTexture(GLenum aUnit);
|
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
|
|
|
private:
|
|
|
|
/**
|
|
|
|
* Context target, nullptr when drawing directly to our swap chain.
|
|
|
|
*/
|
2013-09-27 00:37:19 +00:00
|
|
|
RefPtr<gfx::DrawTarget> mTarget;
|
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
|
|
|
|
|
|
|
/** Widget associated with this compositor */
|
|
|
|
nsIWidget *mWidget;
|
|
|
|
nsIntSize mWidgetSize;
|
|
|
|
nsRefPtr<GLContext> mGLContext;
|
|
|
|
|
|
|
|
/** The size of the surface we are rendering to */
|
|
|
|
nsIntSize mSurfaceSize;
|
|
|
|
|
2013-06-03 14:00:02 +00:00
|
|
|
ScreenPoint mRenderOffset;
|
2013-04-25 17:47:08 +00:00
|
|
|
|
2013-04-17 22:34:26 +00:00
|
|
|
/** Helper-class used by Initialize **/
|
|
|
|
class ReadDrawFPSPref MOZ_FINAL : public nsRunnable {
|
|
|
|
public:
|
|
|
|
NS_IMETHOD Run() 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 09:20:52 +00:00
|
|
|
already_AddRefed<mozilla::gl::GLContext> CreateContext();
|
|
|
|
|
2013-11-01 15:51:32 +00:00
|
|
|
/** Shader Programs */
|
|
|
|
struct ShaderProgramVariations {
|
|
|
|
nsAutoTArray<nsAutoPtr<ShaderProgramOGL>, NumMaskTypes> mVariations;
|
|
|
|
ShaderProgramVariations() {
|
|
|
|
MOZ_COUNT_CTOR(ShaderProgramVariations);
|
|
|
|
mVariations.SetLength(NumMaskTypes);
|
|
|
|
}
|
|
|
|
~ShaderProgramVariations() {
|
|
|
|
MOZ_COUNT_DTOR(ShaderProgramVariations);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
nsTArray<ShaderProgramVariations> mPrograms;
|
|
|
|
|
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
|
|
|
/** Texture target to use for FBOs */
|
|
|
|
GLenum mFBOTextureTarget;
|
|
|
|
|
|
|
|
/** Currently bound render target */
|
|
|
|
RefPtr<CompositingRenderTargetOGL> mCurrentRenderTarget;
|
|
|
|
#ifdef DEBUG
|
|
|
|
CompositingRenderTargetOGL* mWindowRenderTarget;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/** VBO that has some basics in it for a textured quad,
|
|
|
|
* including vertex coords and texcoords for both
|
|
|
|
* flipped and unflipped textures */
|
|
|
|
GLuint mQuadVBO;
|
|
|
|
|
2013-08-22 19:04:55 +00:00
|
|
|
/**
|
|
|
|
* When we can't use mQuadVBO, we allocate VBOs from this arena instead.
|
|
|
|
*/
|
|
|
|
gl::VBOArena mVBOs;
|
|
|
|
|
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
|
|
|
bool mHasBGRA;
|
|
|
|
|
|
|
|
/**
|
2013-04-30 03:16:04 +00:00
|
|
|
* When rendering to some EGL surfaces (e.g. on Android), we rely on being told
|
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
|
|
|
* about size changes (via SetSurfaceSize) rather than pulling this information
|
|
|
|
* from the widget.
|
|
|
|
*/
|
2013-04-30 03:16:04 +00:00
|
|
|
bool mUseExternalSurfaceSize;
|
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
|
|
|
|
|
|
|
/**
|
|
|
|
* Have we had DrawQuad calls since the last frame was rendered?
|
|
|
|
*/
|
|
|
|
bool mFrameInProgress;
|
|
|
|
|
|
|
|
/* Start a new frame. If aClipRectIn is null and aClipRectOut is non-null,
|
|
|
|
* sets *aClipRectOut to the screen dimensions.
|
|
|
|
*/
|
2013-11-21 19:25:16 +00:00
|
|
|
virtual void BeginFrame(const nsIntRegion& aInvalidRegion,
|
|
|
|
const gfx::Rect *aClipRectIn,
|
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
|
|
|
const gfxMatrix& aTransform,
|
|
|
|
const gfx::Rect& aRenderBounds,
|
|
|
|
gfx::Rect *aClipRectOut = nullptr,
|
|
|
|
gfx::Rect *aRenderBoundsOut = nullptr) MOZ_OVERRIDE;
|
|
|
|
|
2013-07-04 17:25:50 +00:00
|
|
|
ShaderProgramType GetProgramTypeForEffect(Effect* aEffect) const;
|
2013-11-01 15:51:32 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Updates all layer programs with a new projection matrix.
|
|
|
|
*/
|
|
|
|
void SetLayerProgramProjectionMatrix(const gfx3DMatrix& aMatrix);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Helper method for Initialize, creates all valid variations of a program
|
|
|
|
* and adds them to mPrograms
|
|
|
|
*/
|
|
|
|
void AddPrograms(ShaderProgramType aType);
|
|
|
|
|
|
|
|
ShaderProgramOGL* GetProgram(ShaderProgramType aType,
|
|
|
|
MaskType aMask = MaskNone) {
|
|
|
|
MOZ_ASSERT(ProgramProfileOGL::ProgramExists(aType, aMask),
|
|
|
|
"Invalid program type.");
|
|
|
|
return mPrograms[aType].mVariations[aMask];
|
|
|
|
}
|
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
|
|
|
|
|
|
|
/**
|
|
|
|
* Create a FBO backed by a texture.
|
|
|
|
* Note that the texture target type will be
|
|
|
|
* of the type returned by FBOTextureTarget; different
|
|
|
|
* shaders are required to sample from the different
|
|
|
|
* texture types.
|
|
|
|
*/
|
2013-11-07 09:53:07 +00:00
|
|
|
void CreateFBOWithTexture(const gfx::IntRect& aRect, bool aCopyFromSource,
|
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
|
|
|
GLuint aSourceFrameBuffer,
|
|
|
|
GLuint *aFBO, GLuint *aTexture);
|
|
|
|
|
|
|
|
GLintptr QuadVBOVertexOffset() { return 0; }
|
|
|
|
GLintptr QuadVBOTexCoordOffset() { return sizeof(float)*4*2; }
|
|
|
|
GLintptr QuadVBOFlippedTexCoordOffset() { return sizeof(float)*8*2; }
|
|
|
|
|
2013-09-04 12:14:52 +00:00
|
|
|
void BindQuadVBO();
|
|
|
|
void QuadVBOVerticesAttrib(GLuint aAttribIndex);
|
|
|
|
void QuadVBOTexCoordsAttrib(GLuint aAttribIndex);
|
|
|
|
void QuadVBOFlippedTexCoordsAttrib(GLuint aAttribIndex);
|
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
|
|
|
void BindAndDrawQuad(GLuint aVertAttribIndex,
|
|
|
|
GLuint aTexCoordAttribIndex,
|
2013-09-04 12:14:52 +00:00
|
|
|
bool aFlipped = 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 09:20:52 +00:00
|
|
|
void BindAndDrawQuad(ShaderProgramOGL *aProg,
|
2013-09-04 12:14:52 +00:00
|
|
|
bool aFlipped = 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 09:20:52 +00:00
|
|
|
void BindAndDrawQuadWithTextureRect(ShaderProgramOGL *aProg,
|
|
|
|
const gfx::Rect& aTexCoordRect,
|
|
|
|
TextureSource *aTexture);
|
|
|
|
|
|
|
|
void CleanupResources();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Copies the content of our backbuffer to the set transaction target.
|
|
|
|
* Does not restore the target FBO, so only call from EndFrame.
|
|
|
|
*/
|
2013-09-27 00:37:19 +00:00
|
|
|
void CopyToTarget(gfx::DrawTarget* aTarget, const gfxMatrix& aWorldMatrix);
|
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
|
|
|
|
|
|
|
/**
|
|
|
|
* Records the passed frame timestamp and returns the current estimated FPS.
|
|
|
|
*/
|
|
|
|
double AddFrameAndGetFps(const TimeStamp& timestamp);
|
|
|
|
|
|
|
|
bool mDestroyed;
|
|
|
|
|
|
|
|
nsAutoPtr<FPSState> mFPS;
|
2013-06-04 18:44:37 +00:00
|
|
|
// Textures used for direct texturing of buffers like gralloc.
|
|
|
|
// The index of the texture in this array must correspond to the texture unit.
|
2013-06-12 09:05:06 +00:00
|
|
|
nsTArray<GLuint> mTextures;
|
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
|
|
|
static bool sDrawFPS;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* MOZILLA_GFX_COMPOSITOROGL_H */
|