Bug 1557368 [wpt PR 16856] - Update error type test for attachInternals(), a=testonly
[gecko.git] / gfx / webrender_bindings / RenderCompositorOGL.h
blobcec461263aa2c33cf1f3ea452d56d6e97e523053
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef MOZILLA_GFX_RENDERCOMPOSITOR_OGL_H
8 #define MOZILLA_GFX_RENDERCOMPOSITOR_OGL_H
10 #include "mozilla/webrender/RenderCompositor.h"
12 namespace mozilla {
14 namespace wr {
16 class RenderCompositorOGL : public RenderCompositor {
17 public:
18 static UniquePtr<RenderCompositor> Create(
19 RefPtr<widget::CompositorWidget>&& aWidget);
21 RenderCompositorOGL(RefPtr<gl::GLContext>&& aGL,
22 RefPtr<widget::CompositorWidget>&& aWidget);
23 virtual ~RenderCompositorOGL();
25 bool BeginFrame() override;
26 void EndFrame() override;
27 void WaitForGPU() override;
28 void Pause() override;
29 bool Resume() override;
31 gl::GLContext* gl() const override { return mGL; }
33 bool UseANGLE() const override { return false; }
35 LayoutDeviceIntSize GetBufferSize() override;
37 protected:
38 RefPtr<gl::GLContext> mGL;
41 } // namespace wr
42 } // namespace mozilla
44 #endif