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 13:20:52 +04: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 16:14:52 +04:00
|
|
|
#include "GLContextTypes.h" // for SharedTextureHandle, etc
|
2014-11-27 00:16:07 +03:00
|
|
|
#include "GLImages.h"
|
2013-09-25 00:45:14 +04:00
|
|
|
#include "gfxTypes.h"
|
2015-03-21 19:28:04 +03:00
|
|
|
#include "mozilla/Attributes.h" // for override
|
2013-08-12 03:17:23 +04:00
|
|
|
#include "mozilla/gfx/Point.h" // for IntSize
|
|
|
|
#include "mozilla/layers/CompositorTypes.h"
|
|
|
|
#include "mozilla/layers/LayersSurfaces.h" // for SurfaceDescriptor
|
2014-04-03 10:04:04 +04:00
|
|
|
#include "mozilla/layers/TextureClient.h" // for TextureClient, etc
|
2014-10-21 17:53:00 +04:00
|
|
|
#include "AndroidSurfaceTexture.h"
|
2013-08-12 06:21:17 +04: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 13:20:52 +04:00
|
|
|
namespace mozilla {
|
2014-10-21 17:53:00 +04: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 13:20:52 +04:00
|
|
|
namespace layers {
|
|
|
|
|
2015-11-20 16:24:49 +03:00
|
|
|
class EGLImageTextureData : public TextureData
|
2013-07-30 13:59:51 +04:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2015-11-20 16:24:49 +03:00
|
|
|
static already_AddRefed<TextureClient>
|
|
|
|
CreateTextureClient(EGLImageImage* aImage, gfx::IntSize aSize,
|
2016-09-27 06:22:20 +03:00
|
|
|
LayersIPCChannel* aAllocator, TextureFlags aFlags);
|
2014-09-17 17:13:29 +04:00
|
|
|
|
2016-04-22 19:05:26 +03:00
|
|
|
virtual void FillInfo(TextureData::Info& aInfo) const override;
|
2013-07-30 13:59:51 +04:00
|
|
|
|
2015-11-20 16:24:49 +03:00
|
|
|
virtual bool Serialize(SurfaceDescriptor& aOutDescriptor) override;
|
|
|
|
|
2016-09-27 06:22:20 +03:00
|
|
|
virtual void Deallocate(LayersIPCChannel*) override { mImage = nullptr; }
|
2015-11-20 16:24:49 +03:00
|
|
|
|
2016-09-27 06:22:20 +03:00
|
|
|
virtual void Forget(LayersIPCChannel*) override { mImage = nullptr; }
|
2014-01-24 18:25:04 +04:00
|
|
|
|
2015-11-20 16:24:49 +03:00
|
|
|
// Unused functions.
|
|
|
|
virtual bool Lock(OpenMode, FenceHandle*) override { return true; }
|
2014-01-24 18:25:04 +04:00
|
|
|
|
2015-11-20 16:24:49 +03:00
|
|
|
virtual void Unlock() override {}
|
2014-01-24 18:25:04 +04:00
|
|
|
|
2015-11-24 21:07:02 +03:00
|
|
|
protected:
|
2015-11-20 16:24:49 +03:00
|
|
|
EGLImageTextureData(EGLImageImage* aImage, gfx::IntSize aSize);
|
|
|
|
|
2015-10-18 08:24:48 +03:00
|
|
|
RefPtr<EGLImageImage> mImage;
|
2014-09-17 17:13:29 +04:00
|
|
|
const gfx::IntSize mSize;
|
|
|
|
};
|
|
|
|
|
|
|
|
#ifdef MOZ_WIDGET_ANDROID
|
|
|
|
|
2015-11-20 16:24:52 +03:00
|
|
|
class AndroidSurfaceTextureData : public TextureData
|
2014-09-17 17:13:29 +04:00
|
|
|
{
|
|
|
|
public:
|
2015-11-20 16:24:52 +03:00
|
|
|
static already_AddRefed<TextureClient>
|
|
|
|
CreateTextureClient(gl::AndroidSurfaceTexture* aSurfTex,
|
|
|
|
gfx::IntSize aSize,
|
|
|
|
gl::OriginPos aOriginPos,
|
2016-09-27 06:22:20 +03:00
|
|
|
LayersIPCChannel* aAllocator,
|
2015-11-20 16:24:52 +03:00
|
|
|
TextureFlags aFlags);
|
2015-11-24 21:07:02 +03:00
|
|
|
|
2015-11-20 16:24:52 +03:00
|
|
|
~AndroidSurfaceTextureData();
|
2014-09-17 17:13:29 +04:00
|
|
|
|
2016-04-22 19:05:26 +03:00
|
|
|
virtual void FillInfo(TextureData::Info& aInfo) const override;
|
2014-09-12 22:39:20 +04:00
|
|
|
|
2015-11-20 16:24:52 +03:00
|
|
|
virtual bool Serialize(SurfaceDescriptor& aOutDescriptor) override;
|
2014-09-17 17:13:29 +04:00
|
|
|
|
|
|
|
// Useless functions.
|
2015-11-20 16:24:52 +03:00
|
|
|
virtual bool Lock(OpenMode, FenceHandle*) override { return true; }
|
2014-09-17 17:13:29 +04:00
|
|
|
|
2015-11-20 16:24:52 +03:00
|
|
|
virtual void Unlock() override {}
|
2014-09-17 17:13:29 +04:00
|
|
|
|
2015-11-20 16:24:52 +03:00
|
|
|
// Our data is always owned externally.
|
2016-09-27 06:22:20 +03:00
|
|
|
virtual void Deallocate(LayersIPCChannel*) override {}
|
2015-11-20 16:24:52 +03:00
|
|
|
|
2015-11-24 21:07:02 +03:00
|
|
|
protected:
|
2016-04-22 19:05:26 +03:00
|
|
|
AndroidSurfaceTextureData(gl::AndroidSurfaceTexture* aSurfTex, gfx::IntSize aSize);
|
2015-11-20 16:24:52 +03:00
|
|
|
|
2015-10-18 08:24:48 +03:00
|
|
|
const RefPtr<gl::AndroidSurfaceTexture> mSurfTex;
|
2014-09-17 17:13:29 +04:00
|
|
|
const gfx::IntSize mSize;
|
2013-07-30 13:59:51 +04:00
|
|
|
};
|
|
|
|
|
2014-09-17 17:13:29 +04:00
|
|
|
#endif // MOZ_WIDGET_ANDROID
|
|
|
|
|
2015-07-13 18:25:42 +03:00
|
|
|
} // namespace layers
|
|
|
|
} // namespace mozilla
|
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 13:20:52 +04:00
|
|
|
|
|
|
|
#endif
|