Files
sousa-gecko/gfx/layers/client/TextureClientSharedSurface.h
T
Emilio Cobos Álvarez 02d691fdef Bug 2054311 - Sort includes in gfx/. r=gfx-reviewers,gw
Autogenerated with:

    cp dom/.clang-format gfx/ && mach format gfx/**.{cpp,h,mm}

Manual changes:

    * OSVRSession headers are not system headers and they are not
      standalone / rely on stdint, so tweaked to preserve previous
      ordering.
    * Missing include in GLDefs.h
    * Missing include in gfxOTSUtils.
    * Need to keep the windows header order in DCLayerTree.
    * missing hb_font include in MockScaledFont.h

Differential Revision: https://phabricator.services.mozilla.com/D311695
2026-07-13 09:51:18 +00:00

69 lines
2.1 KiB
C++

/* 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_TEXTURECLIENT_SHAREDSURFACE_H
#define MOZILLA_GFX_TEXTURECLIENT_SHAREDSURFACE_H
#include <stdint.h> // for uint32_t, uint8_t, uint64_t
#include <cstddef> // for size_t
#include "GLContextTypes.h" // for GLContext (ptr only), etc
#include "TextureClient.h"
#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc
#include "mozilla/RefPtr.h" // for RefPtr, RefCounted
#include "mozilla/gfx/Point.h" // for IntSize
#include "mozilla/gfx/Types.h" // for SurfaceFormat
#include "mozilla/layers/CompositorTypes.h" // for TextureFlags, etc
#include "mozilla/layers/LayersSurfaces.h" // for SurfaceDescriptor
namespace mozilla {
namespace gl {
class GLContext;
class SharedSurface;
class SurfaceFactory;
} // namespace gl
namespace layers {
class SharedSurfaceTextureClient;
class SharedSurfaceTextureData : public TextureData {
friend class SharedSurfaceTextureClient;
public:
const SurfaceDescriptor mDesc;
const gfx::SurfaceFormat mFormat;
const gfx::IntSize mSize;
static already_AddRefed<TextureClient> CreateTextureClient(
const layers::SurfaceDescriptor& aDesc, const gfx::SurfaceFormat aFormat,
gfx::IntSize aSize, TextureFlags aFlags, LayersIPCChannel* aAllocator);
SharedSurfaceTextureData(const SurfaceDescriptor&, gfx::SurfaceFormat,
gfx::IntSize);
virtual ~SharedSurfaceTextureData();
bool Lock(OpenMode) override { return false; }
void Unlock() override {}
void FillInfo(TextureData::Info& aInfo) const override;
bool Serialize(SurfaceDescriptor& aOutDescriptor) override;
void Deallocate(LayersIPCChannel*) override;
TextureFlags GetTextureFlags() const override;
Maybe<uint64_t> GetBufferId() const override;
UniqueFileHandle GetAcquireFence() override;
};
} // namespace layers
} // namespace mozilla
#endif // MOZILLA_GFX_TEXTURECLIENT_SHAREDSURFACE_H