1 /* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 4; -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef SHARED_SURFACE_GL_H_
7 #define SHARED_SURFACE_GL_H_
9 #include "SharedSurface.h"
16 // For readback and bootstrapping:
17 class SharedSurface_Basic final
: public SharedSurface
{
19 static UniquePtr
<SharedSurface_Basic
> Create(const SharedSurfaceDesc
&);
22 SharedSurface_Basic(const SharedSurfaceDesc
& desc
,
23 UniquePtr
<MozFramebuffer
>&& fb
);
26 Maybe
<layers::SurfaceDescriptor
> ToSurfaceDescriptor() override
;
29 class SurfaceFactory_Basic final
: public SurfaceFactory
{
31 explicit SurfaceFactory_Basic(GLContext
& gl
);
33 virtual UniquePtr
<SharedSurface
> CreateSharedImpl(
34 const SharedSurfaceDesc
& desc
) override
{
35 return SharedSurface_Basic::Create(desc
);
40 } // namespace mozilla
42 #endif // SHARED_SURFACE_GL_H_