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_TEXTURECLIENTOGL_H
|
|
|
|
#define MOZILLA_GFX_TEXTURECLIENTOGL_H
|
|
|
|
|
2013-09-04 12:14:52 +00:00
|
|
|
#include "GLContextTypes.h" // for SharedTextureHandle, etc
|
2013-09-24 20:45:14 +00:00
|
|
|
#include "gfxTypes.h"
|
2013-08-11 23:17:23 +00:00
|
|
|
#include "mozilla/Attributes.h" // for MOZ_OVERRIDE
|
|
|
|
#include "mozilla/gfx/Point.h" // for IntSize
|
|
|
|
#include "mozilla/layers/CompositorTypes.h"
|
|
|
|
#include "mozilla/layers/LayersSurfaces.h" // for SurfaceDescriptor
|
2014-04-03 06:04:04 +00:00
|
|
|
#include "mozilla/layers/TextureClient.h" // for TextureClient, etc
|
2014-10-17 23:34:01 +00:00
|
|
|
#include "nsSurfaceTexture.h"
|
2013-08-12 02:21:17 +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 mozilla {
|
|
|
|
namespace layers {
|
|
|
|
|
2013-08-11 23:17:23 +00:00
|
|
|
class CompositableForwarder;
|
|
|
|
|
2014-09-17 13:13:29 +00:00
|
|
|
class EGLImageTextureClient : public TextureClient
|
2013-07-30 09:59:51 +00:00
|
|
|
{
|
|
|
|
public:
|
2014-09-17 13:13:29 +00:00
|
|
|
EGLImageTextureClient(TextureFlags aFlags,
|
|
|
|
EGLImage aImage,
|
|
|
|
gfx::IntSize aSize,
|
|
|
|
bool aInverted);
|
2013-07-30 09:59:51 +00:00
|
|
|
|
2014-09-17 13:13:29 +00:00
|
|
|
~EGLImageTextureClient();
|
2013-07-30 09:59:51 +00:00
|
|
|
|
2014-09-17 13:13:29 +00:00
|
|
|
virtual bool IsAllocated() const MOZ_OVERRIDE { return true; }
|
|
|
|
|
|
|
|
virtual bool HasInternalBuffer() const MOZ_OVERRIDE { return false; }
|
|
|
|
|
|
|
|
virtual gfx::IntSize GetSize() const { return mSize; }
|
2013-07-30 09:59:51 +00:00
|
|
|
|
|
|
|
virtual bool ToSurfaceDescriptor(SurfaceDescriptor& aOutDescriptor) MOZ_OVERRIDE;
|
|
|
|
|
2014-09-17 13:13:29 +00:00
|
|
|
// Useless functions.
|
2014-01-24 14:25:04 +00:00
|
|
|
virtual bool Lock(OpenMode mode) MOZ_OVERRIDE;
|
|
|
|
|
|
|
|
virtual void Unlock() MOZ_OVERRIDE;
|
|
|
|
|
|
|
|
virtual bool IsLocked() const MOZ_OVERRIDE { return mIsLocked; }
|
|
|
|
|
2014-09-17 13:13:29 +00:00
|
|
|
virtual gfx::SurfaceFormat GetFormat() const MOZ_OVERRIDE
|
|
|
|
{
|
|
|
|
return gfx::SurfaceFormat::UNKNOWN;
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual TemporaryRef<TextureClient>
|
|
|
|
CreateSimilar(TextureFlags aFlags = TextureFlags::DEFAULT,
|
|
|
|
TextureAllocationFlags aAllocFlags = ALLOC_DEFAULT) const MOZ_OVERRIDE
|
|
|
|
{
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual bool AllocateForSurface(gfx::IntSize aSize, TextureAllocationFlags aFlags) MOZ_OVERRIDE
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
protected:
|
|
|
|
const EGLImage mImage;
|
|
|
|
const gfx::IntSize mSize;
|
|
|
|
bool mIsLocked;
|
|
|
|
};
|
|
|
|
|
|
|
|
#ifdef MOZ_WIDGET_ANDROID
|
|
|
|
|
|
|
|
class SurfaceTextureClient : public TextureClient
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
SurfaceTextureClient(TextureFlags aFlags,
|
2014-10-17 23:34:01 +00:00
|
|
|
nsSurfaceTexture* aSurfTex,
|
2014-09-17 13:13:29 +00:00
|
|
|
gfx::IntSize aSize,
|
|
|
|
bool aInverted);
|
|
|
|
|
|
|
|
~SurfaceTextureClient();
|
2013-07-30 09:59:51 +00:00
|
|
|
|
2014-09-17 13:13:29 +00:00
|
|
|
virtual bool IsAllocated() const MOZ_OVERRIDE { return true; }
|
|
|
|
|
|
|
|
virtual bool HasInternalBuffer() const MOZ_OVERRIDE { return false; }
|
2014-09-12 18:39:20 +00:00
|
|
|
|
2014-09-12 19:01:26 +00:00
|
|
|
virtual gfx::IntSize GetSize() const { return mSize; }
|
2014-09-12 18:39:20 +00:00
|
|
|
|
2014-09-17 13:13:29 +00:00
|
|
|
virtual bool ToSurfaceDescriptor(SurfaceDescriptor& aOutDescriptor) MOZ_OVERRIDE;
|
|
|
|
|
|
|
|
// Useless functions.
|
|
|
|
virtual bool Lock(OpenMode mode) MOZ_OVERRIDE;
|
|
|
|
|
|
|
|
virtual void Unlock() MOZ_OVERRIDE;
|
|
|
|
|
|
|
|
virtual bool IsLocked() const MOZ_OVERRIDE { return mIsLocked; }
|
|
|
|
|
2014-04-10 08:14:28 +00:00
|
|
|
virtual gfx::SurfaceFormat GetFormat() const MOZ_OVERRIDE
|
|
|
|
{
|
|
|
|
return gfx::SurfaceFormat::UNKNOWN;
|
|
|
|
}
|
|
|
|
|
2014-07-25 09:24:46 +00:00
|
|
|
virtual TemporaryRef<TextureClient>
|
2014-09-17 13:13:29 +00:00
|
|
|
CreateSimilar(TextureFlags aFlags = TextureFlags::DEFAULT,
|
|
|
|
TextureAllocationFlags aAllocFlags = ALLOC_DEFAULT) const MOZ_OVERRIDE
|
|
|
|
{
|
|
|
|
return nullptr;
|
|
|
|
}
|
2014-07-25 09:24:46 +00:00
|
|
|
|
2014-04-10 08:14:28 +00:00
|
|
|
virtual bool AllocateForSurface(gfx::IntSize aSize, TextureAllocationFlags aFlags) MOZ_OVERRIDE
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2013-07-30 09:59:51 +00:00
|
|
|
protected:
|
2014-10-17 23:34:01 +00:00
|
|
|
const nsRefPtr<nsSurfaceTexture> mSurfTex;
|
2014-09-17 13:13:29 +00:00
|
|
|
const gfx::IntSize mSize;
|
2014-01-24 14:25:04 +00:00
|
|
|
bool mIsLocked;
|
2013-07-30 09:59:51 +00:00
|
|
|
};
|
|
|
|
|
2014-09-17 13:13:29 +00:00
|
|
|
#endif // MOZ_WIDGET_ANDROID
|
|
|
|
|
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
|
|
|
|
} // namespace
|
|
|
|
|
|
|
|
#endif
|