2018-01-15 16:22:15 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
|
|
|
/* 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/. */
|
|
|
|
|
|
|
|
#ifndef MOZILLA_GFX_RENDERCOMPOSITOR_OGL_H
|
|
|
|
#define MOZILLA_GFX_RENDERCOMPOSITOR_OGL_H
|
|
|
|
|
|
|
|
#include "mozilla/webrender/RenderCompositor.h"
|
|
|
|
|
|
|
|
namespace mozilla {
|
2018-01-19 05:01:04 +03:00
|
|
|
|
2018-01-15 16:22:15 +03:00
|
|
|
namespace wr {
|
|
|
|
|
|
|
|
class RenderCompositorOGL : public RenderCompositor {
|
|
|
|
public:
|
|
|
|
static UniquePtr<RenderCompositor> Create(
|
|
|
|
RefPtr<widget::CompositorWidget>&& aWidget);
|
|
|
|
|
|
|
|
RenderCompositorOGL(RefPtr<gl::GLContext>&& aGL,
|
2018-01-19 05:01:04 +03:00
|
|
|
RefPtr<widget::CompositorWidget>&& aWidget);
|
2018-01-15 16:22:15 +03:00
|
|
|
virtual ~RenderCompositorOGL();
|
|
|
|
|
|
|
|
bool BeginFrame() override;
|
|
|
|
void EndFrame() override;
|
2018-11-12 04:36:13 +03:00
|
|
|
void WaitForGPU() override;
|
2018-01-15 16:22:15 +03:00
|
|
|
void Pause() override;
|
|
|
|
bool Resume() override;
|
|
|
|
|
|
|
|
gl::GLContext* gl() const override { return mGL; }
|
|
|
|
|
2018-01-19 05:01:04 +03:00
|
|
|
bool UseANGLE() const override { return false; }
|
2018-01-15 16:22:15 +03:00
|
|
|
|
2018-02-01 15:39:31 +03:00
|
|
|
LayoutDeviceIntSize GetBufferSize() override;
|
2018-01-15 16:22:15 +03:00
|
|
|
|
|
|
|
protected:
|
|
|
|
RefPtr<gl::GLContext> mGL;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace wr
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif
|