Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/gfx/webrender_bindings/RenderCompositor.cpp
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
#include "RenderCompositor.h"
8
9
#include "GLContext.h"
10
#include "mozilla/gfx/gfxVars.h"
11
#include "mozilla/layers/SyncObject.h"
12
#include "mozilla/webrender/RenderCompositorOGL.h"
13
#include "mozilla/widget/CompositorWidget.h"
14
15
#ifdef XP_WIN
16
#include "mozilla/webrender/RenderCompositorANGLE.h"
17
#endif
18
19
namespace mozilla {
20
namespace wr {
21
22
/* static */ UniquePtr<RenderCompositor>
23
RenderCompositor::Create(RefPtr<widget::CompositorWidget>&& aWidget)
24
0
{
25
#ifdef XP_WIN
26
  if (gfx::gfxVars::UseWebRenderANGLE()) {
27
    return RenderCompositorANGLE::Create(std::move(aWidget));
28
  }
29
#endif
30
  return RenderCompositorOGL::Create(std::move(aWidget));
31
0
}
32
33
RenderCompositor::RenderCompositor(RefPtr<widget::CompositorWidget>&& aWidget)
34
  : mWidget(aWidget)
35
0
{
36
0
}
37
38
RenderCompositor::~RenderCompositor()
39
0
{
40
0
}
41
42
} // namespace wr
43
} // namespace mozilla