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/. */
|
|
|
|
|
2013-08-11 23:17:23 +00:00
|
|
|
#include <stdint.h> // for uint8_t, uint32_t
|
|
|
|
#include "ImageContainer.h" // for PlanarYCbCrImage, etc
|
2015-03-21 16:28:04 +00:00
|
|
|
#include "mozilla/Attributes.h" // for override
|
2013-08-11 23:17:23 +00:00
|
|
|
#include "mozilla/RefPtr.h" // for RefPtr
|
|
|
|
#include "mozilla/ipc/Shmem.h" // for Shmem
|
|
|
|
#include "nsCOMPtr.h" // for already_AddRefed
|
|
|
|
#include "nsDebug.h" // for NS_WARNING
|
2014-02-26 21:36:35 +00:00
|
|
|
#include "nsISupportsImpl.h" // for MOZ_COUNT_CTOR
|
2013-08-11 23:17:23 +00:00
|
|
|
|
2014-04-01 06:28:00 +00:00
|
|
|
#ifndef MOZILLA_LAYERS_SHAREDPLANARYCBCRIMAGE_H
|
|
|
|
#define MOZILLA_LAYERS_SHAREDPLANARYCBCRIMAGE_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 {
|
|
|
|
|
2013-08-11 23:17:23 +00:00
|
|
|
class BufferTextureClient;
|
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 ImageClient;
|
2013-07-30 09:59:51 +00:00
|
|
|
class TextureClient;
|
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-30 09:59:51 +00:00
|
|
|
class SharedPlanarYCbCrImage : public PlanarYCbCrImage
|
|
|
|
{
|
|
|
|
public:
|
2014-08-20 04:55:14 +00:00
|
|
|
explicit SharedPlanarYCbCrImage(ImageClient* aCompositable);
|
2014-07-15 15:37:45 +00:00
|
|
|
|
|
|
|
protected:
|
2013-07-30 09:59:51 +00:00
|
|
|
~SharedPlanarYCbCrImage();
|
|
|
|
|
2014-07-15 15:37:45 +00:00
|
|
|
public:
|
2015-03-21 16:28:04 +00:00
|
|
|
virtual TextureClient* GetTextureClient(CompositableClient* aClient) override;
|
|
|
|
virtual uint8_t* GetBuffer() override;
|
2013-07-30 09:59:51 +00:00
|
|
|
|
2015-03-21 16:28:04 +00:00
|
|
|
virtual TemporaryRef<gfx::SourceSurface> GetAsSourceSurface() override;
|
|
|
|
virtual void SetData(const PlanarYCbCrData& aData) override;
|
|
|
|
virtual void SetDataNoCopy(const Data &aData) override;
|
2013-07-30 09:59:51 +00:00
|
|
|
|
2013-10-02 00:57:50 +00:00
|
|
|
virtual bool Allocate(PlanarYCbCrData& aData);
|
2015-03-21 16:28:04 +00:00
|
|
|
virtual uint8_t* AllocateBuffer(uint32_t aSize) override;
|
2013-07-30 09:59:51 +00:00
|
|
|
// needs to be overriden because the parent class sets mBuffer which we
|
|
|
|
// do not want to happen.
|
2015-03-21 16:28:04 +00:00
|
|
|
virtual uint8_t* AllocateAndGetNewBuffer(uint32_t aSize) override;
|
2013-07-30 09:59:51 +00:00
|
|
|
|
2015-03-21 16:28:04 +00:00
|
|
|
virtual bool IsValid() override;
|
2013-07-30 09:59:51 +00:00
|
|
|
|
2015-03-21 16:28:04 +00:00
|
|
|
virtual size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override
|
2014-03-19 21:33:12 +00:00
|
|
|
{
|
|
|
|
return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
|
|
|
|
}
|
|
|
|
|
2015-03-21 16:28:04 +00:00
|
|
|
virtual size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const override;
|
2014-03-19 21:33:12 +00:00
|
|
|
|
2013-07-30 09:59:51 +00:00
|
|
|
private:
|
|
|
|
RefPtr<BufferTextureClient> mTextureClient;
|
2013-09-06 09:04:50 +00:00
|
|
|
RefPtr<ImageClient> mCompositable;
|
2013-07-30 09:59:51 +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
|
|
|
|
} // namespace
|
|
|
|
|
|
|
|
#endif
|