Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/gfx/webrender_bindings/RenderCompositorOGL.h
Line
Count
Source (jump to first uncovered line)
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/. */
6
7
#ifndef MOZILLA_GFX_RENDERCOMPOSITOR_OGL_H
8
#define MOZILLA_GFX_RENDERCOMPOSITOR_OGL_H
9
10
#include "mozilla/webrender/RenderCompositor.h"
11
12
namespace mozilla {
13
14
namespace wr {
15
16
class RenderCompositorOGL : public RenderCompositor
17
{
18
public:
19
  static UniquePtr<RenderCompositor> Create(RefPtr<widget::CompositorWidget>&& aWidget);
20
21
  RenderCompositorOGL(RefPtr<gl::GLContext>&& aGL,
22
                      RefPtr<widget::CompositorWidget>&& aWidget);
23
  virtual ~RenderCompositorOGL();
24
25
  bool BeginFrame() override;
26
  void EndFrame() override;
27
  void Pause() override;
28
  bool Resume() override;
29
30
0
  gl::GLContext* gl() const override { return mGL; }
31
32
0
  bool UseANGLE() const override { return false; }
33
34
  LayoutDeviceIntSize GetBufferSize() override;
35
36
protected:
37
  RefPtr<gl::GLContext> mGL;
38
};
39
40
} // namespace wr
41
} // namespace mozilla
42
43
#endif