Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/gfx/2d/DrawCommand.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_DRAWCOMMAND_H_
8
#define MOZILLA_GFX_DRAWCOMMAND_H_
9
10
#include <math.h>
11
12
#include "2D.h"
13
#include "Blur.h"
14
#include "Filters.h"
15
#include <vector>
16
#include "FilterNodeCapture.h"
17
#include "Logging.h"
18
19
namespace mozilla {
20
namespace gfx {
21
22
class CaptureCommandList;
23
24
enum class CommandType : int8_t {
25
  DRAWSURFACE = 0,
26
  DRAWFILTER,
27
  DRAWSURFACEWITHSHADOW,
28
  CLEARRECT,
29
  COPYSURFACE,
30
  COPYRECT,
31
  FILLRECT,
32
  STROKERECT,
33
  STROKELINE,
34
  STROKE,
35
  FILL,
36
  FILLGLYPHS,
37
  STROKEGLYPHS,
38
  MASK,
39
  MASKSURFACE,
40
  PUSHCLIP,
41
  PUSHCLIPRECT,
42
  PUSHLAYER,
43
  POPCLIP,
44
  POPLAYER,
45
  SETTRANSFORM,
46
  SETPERMITSUBPIXELAA,
47
  FLUSH,
48
  BLUR,
49
  PADEDGES,
50
};
51
52
class DrawingCommand
53
{
54
public:
55
0
  virtual ~DrawingCommand() {}
56
57
  virtual CommandType GetType() const = 0;
58
  virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix* aTransform = nullptr) const = 0;
59
  virtual void CloneInto(CaptureCommandList* aList) = 0;
60
  virtual void Log(TreeLog& aLog) const = 0;
61
};
62
63
} // namespace gfx
64
} // namespace mozilla
65
66
#endif /* MOZILLA_GFX_DRAWCOMMAND_H_ */