diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /gfx/layers/ipc/SharedPlanarYCbCrImage.h | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'gfx/layers/ipc/SharedPlanarYCbCrImage.h')
-rw-r--r-- | gfx/layers/ipc/SharedPlanarYCbCrImage.h | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/gfx/layers/ipc/SharedPlanarYCbCrImage.h b/gfx/layers/ipc/SharedPlanarYCbCrImage.h new file mode 100644 index 000000000..0c1b6e9c8 --- /dev/null +++ b/gfx/layers/ipc/SharedPlanarYCbCrImage.h @@ -0,0 +1,60 @@ +/* -*- 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/. */ + +#include <stdint.h> // for uint8_t, uint32_t +#include "ImageContainer.h" // for PlanarYCbCrImage, etc +#include "mozilla/Attributes.h" // for override +#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 +#include "nsISupportsImpl.h" // for MOZ_COUNT_CTOR + +#ifndef MOZILLA_LAYERS_SHAREDPLANARYCBCRIMAGE_H +#define MOZILLA_LAYERS_SHAREDPLANARYCBCRIMAGE_H + +namespace mozilla { +namespace layers { + +class ImageClient; +class TextureClient; + +class SharedPlanarYCbCrImage : public PlanarYCbCrImage +{ +public: + explicit SharedPlanarYCbCrImage(ImageClient* aCompositable); + +protected: + ~SharedPlanarYCbCrImage(); + +public: + virtual TextureClient* GetTextureClient(KnowsCompositor* aForwarder) override; + virtual uint8_t* GetBuffer() override; + + virtual already_AddRefed<gfx::SourceSurface> GetAsSourceSurface() override; + virtual bool CopyData(const PlanarYCbCrData& aData) override; + virtual bool AdoptData(const Data &aData) override; + + virtual bool Allocate(PlanarYCbCrData& aData); + virtual uint8_t* AllocateAndGetNewBuffer(uint32_t aSize) override; + + virtual bool IsValid() override; + + virtual size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override + { + return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf); + } + + virtual size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const override; + +private: + RefPtr<TextureClient> mTextureClient; + RefPtr<ImageClient> mCompositable; +}; + +} // namespace layers +} // namespace mozilla + +#endif |