Update configs. IGNORE BROKEN CHANGESETS CLOSED TREE NO BUG a=release ba=release
[gecko.git] / gfx / gl / SharedSurfaceGL.h
blobfef3d59fb0258291158bb6b5caad68236fa76c25
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"
11 namespace mozilla {
12 namespace gl {
14 class MozFramebuffer;
16 // For readback and bootstrapping:
17 class SharedSurface_Basic final : public SharedSurface {
18 public:
19 static UniquePtr<SharedSurface_Basic> Create(const SharedSurfaceDesc&);
21 private:
22 SharedSurface_Basic(const SharedSurfaceDesc& desc,
23 UniquePtr<MozFramebuffer>&& fb);
25 public:
26 Maybe<layers::SurfaceDescriptor> ToSurfaceDescriptor() override;
29 class SurfaceFactory_Basic final : public SurfaceFactory {
30 public:
31 explicit SurfaceFactory_Basic(GLContext& gl);
33 virtual UniquePtr<SharedSurface> CreateSharedImpl(
34 const SharedSurfaceDesc& desc) override {
35 return SharedSurface_Basic::Create(desc);
39 } // namespace gl
40 } // namespace mozilla
42 #endif // SHARED_SURFACE_GL_H_