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"
16 class RenderCompositorOGL
: public RenderCompositor
{
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
;
38 RefPtr
<gl::GLContext
> mGL
;
42 } // namespace mozilla