Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/gfx/layers/client/GPUVideoTextureClient.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_GPUVIDEOTEXTURECLIENT_H
8
#define MOZILLA_GFX_GPUVIDEOTEXTURECLIENT_H
9
10
#include "mozilla/layers/TextureClient.h"
11
12
namespace mozilla {
13
namespace gfx {
14
class SourceSurface;
15
}
16
namespace dom {
17
class VideoDecoderManagerChild;
18
}
19
namespace layers {
20
21
class GPUVideoTextureData : public TextureData
22
{
23
public:
24
  GPUVideoTextureData(dom::VideoDecoderManagerChild* aManager,
25
                      const SurfaceDescriptorGPUVideo& aSD,
26
                      const gfx::IntSize& aSize);
27
  ~GPUVideoTextureData();
28
29
  virtual void FillInfo(TextureData::Info& aInfo) const override;
30
31
0
  virtual bool Lock(OpenMode) override { return true; };
32
33
0
  virtual void Unlock() override {};
34
35
  virtual bool Serialize(SurfaceDescriptor& aOutDescriptor) override;
36
37
  virtual void Deallocate(LayersIPCChannel* aAllocator) override;
38
39
  virtual void Forget(LayersIPCChannel* aAllocator) override;
40
41
  already_AddRefed<gfx::SourceSurface> GetAsSourceSurface();
42
43
  virtual GPUVideoTextureData* AsGPUVideoTextureData() override
44
0
  {
45
0
    return this;
46
0
  }
47
48
protected:
49
  RefPtr<dom::VideoDecoderManagerChild> mManager;
50
  SurfaceDescriptorGPUVideo mSD;
51
  gfx::IntSize mSize;
52
53
public:
54
  const decltype(mSD)& SD() const { return mSD; }
55
};
56
57
} // namespace layers
58
} // namespace mozilla
59
60
#endif // MOZILLA_GFX_GPUVIDEOTEXTURECLIENT_H