Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/gfx/layers/mlgpu/CanvasLayerMLGPU.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 GFX_CanvasLayerMLGPU_H
8
#define GFX_CanvasLayerMLGPU_H
9
10
#include "Layers.h"                     // for CanvasLayer, etc
11
#include "TexturedLayerMLGPU.h"
12
#include "mozilla/Attributes.h"         // for override
13
#include "mozilla/RefPtr.h"             // for RefPtr
14
#include "mozilla/layers/LayerManagerMLGPU.h"  // for LayerComposite, etc
15
#include "mozilla/layers/LayersTypes.h"  // for LayerRenderState, etc
16
#include "nsRect.h"                     // for mozilla::gfx::IntRect
17
#include "nscore.h"                     // for nsACString
18
19
namespace mozilla {
20
namespace layers {
21
22
class CompositableHost;
23
class ImageHost;
24
25
class CanvasLayerMLGPU final : public CanvasLayer,
26
                               public TexturedLayerMLGPU
27
{
28
public:
29
  explicit CanvasLayerMLGPU(LayerManagerMLGPU* aManager);
30
31
protected:
32
  ~CanvasLayerMLGPU() override;
33
34
public:
35
  Layer* GetLayer() override;
36
  void Disconnect() override;
37
38
0
  HostLayer* AsHostLayer() override { return this; }
39
0
  CanvasLayerMLGPU* AsCanvasLayerMLGPU() override { return this; }
40
  gfx::SamplingFilter GetSamplingFilter() override;
41
  void ClearCachedResources() override;
42
  void SetRenderRegion(LayerIntRegion&& aRegion) override;
43
44
  MOZ_LAYER_DECL_NAME("CanvasLayerMLGPU", TYPE_CANVAS)
45
46
protected:
47
0
  CanvasRenderer* CreateCanvasRendererInternal() override {
48
0
    MOZ_CRASH("Incompatible surface type");
49
0
    return nullptr;
50
0
  }
51
52
  void PrintInfo(std::stringstream& aStream, const char* aPrefix) override;
53
  void CleanupResources();
54
};
55
56
} // namespace layers
57
} // namespace mozilla
58
59
#endif /* GFX_CanvasLayerMLGPU_H */