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
42 lines
1.3 KiB
C++
42 lines
1.3 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/. */
|
|
|
|
#include "SharedSurfaceGL.h"
|
|
|
|
#include "GLBlitHelper.h"
|
|
#include "GLContext.h"
|
|
#include "GLReadTexImageHelper.h"
|
|
#include "ScopedGLHelpers.h"
|
|
#include "mozilla/gfx/2D.h"
|
|
#include "mozilla/layers/TextureForwarder.h"
|
|
|
|
namespace mozilla {
|
|
namespace gl {
|
|
|
|
/*static*/
|
|
UniquePtr<SharedSurface_Basic> SharedSurface_Basic::Create(
|
|
const SharedSurfaceDesc& desc) {
|
|
auto fb = MozFramebuffer::Create(desc.gl, desc.size, 0, false);
|
|
if (!fb) return nullptr;
|
|
|
|
return AsUnique(new SharedSurface_Basic(desc, std::move(fb)));
|
|
}
|
|
|
|
SharedSurface_Basic::SharedSurface_Basic(const SharedSurfaceDesc& desc,
|
|
UniquePtr<MozFramebuffer>&& fb)
|
|
: SharedSurface(desc, std::move(fb)) {}
|
|
|
|
Maybe<layers::SurfaceDescriptor> SharedSurface_Basic::ToSurfaceDescriptor() {
|
|
return Nothing();
|
|
}
|
|
|
|
////////////////////////////////////////////////////////////////////////
|
|
|
|
SurfaceFactory_Basic::SurfaceFactory_Basic(GLContext& gl)
|
|
: SurfaceFactory({&gl, SharedSurfaceType::Basic,
|
|
layers::TextureType::Unknown, true}) {}
|
|
|
|
} // namespace gl
|
|
} // namespace mozilla
|