Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/dist/include/SkiaGLGlue.h
Line
Count
Source (jump to first uncovered line)
1
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
2
/* This Source Code Form is subject to the terms of the Mozilla Public
3
* License, v. 2.0. If a copy of the MPL was not distributed with this
4
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5
6
#ifndef SKIA_GL_GLUE_H_
7
#define SKIA_GL_GLUE_H_
8
9
#ifdef USE_SKIA_GPU
10
11
#include "skia/include/core/SkRefCnt.h"
12
#include "mozilla/RefPtr.h"
13
14
struct GrGLInterface;
15
class GrContext;
16
17
namespace mozilla {
18
namespace gl {
19
20
class GLContext;
21
22
class SkiaGLGlue : public GenericAtomicRefCounted
23
{
24
public:
25
  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(SkiaGLGlue, override)
26
27
  explicit SkiaGLGlue(GLContext* context);
28
0
  GLContext* GetGLContext() const { return mGLContext.get(); }
29
0
  GrContext* GetGrContext() const { return mGrContext.get(); }
30
31
protected:
32
  virtual ~SkiaGLGlue();
33
34
private:
35
  RefPtr<GLContext> mGLContext;
36
  sk_sp<GrGLInterface> mGrGLInterface;
37
  sk_sp<GrContext> mGrContext;
38
};
39
40
} // namespace gl
41
} // namespace mozilla
42
43
#else // USE_SKIA_GPU
44
45
class GrContext;
46
47
namespace mozilla {
48
namespace gl {
49
50
class GLContext;
51
52
class SkiaGLGlue : public GenericAtomicRefCounted
53
{
54
public:
55
  SkiaGLGlue(GLContext* context);
56
  GLContext* GetGLContext() const { return nullptr; }
57
  GrContext* GetGrContext() const { return nullptr; }
58
};
59
60
} // namespace gl
61
} // namespace mozilla
62
63
#endif // USE_SKIA_GPU
64
65
#endif // SKIA_GL_GLUE_H_