2017-10-27 23:10:06 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
2014-08-01 16:01:47 +00:00
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
#ifndef MOZILLA_GFX_DRAWCOMMAND_H_
|
|
|
|
#define MOZILLA_GFX_DRAWCOMMAND_H_
|
|
|
|
|
2015-06-10 17:57:08 +00:00
|
|
|
#include <math.h>
|
|
|
|
|
2014-08-01 16:01:47 +00:00
|
|
|
#include "2D.h"
|
2017-10-31 19:02:30 +00:00
|
|
|
#include "Blur.h"
|
2014-08-01 16:01:47 +00:00
|
|
|
#include "Filters.h"
|
|
|
|
#include <vector>
|
2017-12-07 02:21:49 +00:00
|
|
|
#include "FilterNodeCapture.h"
|
2018-02-06 04:00:45 +00:00
|
|
|
#include "Logging.h"
|
2014-08-01 16:01:47 +00:00
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace gfx {
|
|
|
|
|
2018-02-02 15:59:35 +00:00
|
|
|
class CaptureCommandList;
|
|
|
|
|
2015-01-25 22:22:07 +00:00
|
|
|
enum class CommandType : int8_t {
|
2014-08-01 16:01:47 +00:00
|
|
|
DRAWSURFACE = 0,
|
|
|
|
DRAWFILTER,
|
|
|
|
DRAWSURFACEWITHSHADOW,
|
|
|
|
CLEARRECT,
|
|
|
|
COPYSURFACE,
|
|
|
|
COPYRECT,
|
|
|
|
FILLRECT,
|
2019-01-17 19:34:21 +00:00
|
|
|
FILLROUNDEDRECT,
|
2014-08-01 16:01:47 +00:00
|
|
|
STROKERECT,
|
|
|
|
STROKELINE,
|
|
|
|
STROKE,
|
|
|
|
FILL,
|
|
|
|
FILLGLYPHS,
|
2017-07-15 00:48:00 +00:00
|
|
|
STROKEGLYPHS,
|
2014-08-01 16:01:47 +00:00
|
|
|
MASK,
|
|
|
|
MASKSURFACE,
|
|
|
|
PUSHCLIP,
|
|
|
|
PUSHCLIPRECT,
|
2017-06-21 21:19:42 +00:00
|
|
|
PUSHLAYER,
|
2014-08-01 16:01:47 +00:00
|
|
|
POPCLIP,
|
2017-06-21 21:19:42 +00:00
|
|
|
POPLAYER,
|
2015-06-10 17:57:08 +00:00
|
|
|
SETTRANSFORM,
|
2017-09-13 19:15:16 +00:00
|
|
|
SETPERMITSUBPIXELAA,
|
2017-10-31 19:02:30 +00:00
|
|
|
FLUSH,
|
2018-08-01 17:44:33 +00:00
|
|
|
BLUR,
|
|
|
|
PADEDGES,
|
2015-01-25 22:22:07 +00:00
|
|
|
};
|
2014-08-01 16:01:47 +00:00
|
|
|
|
|
|
|
class DrawingCommand {
|
|
|
|
public:
|
|
|
|
virtual ~DrawingCommand() {}
|
|
|
|
|
2018-06-27 23:26:38 +00:00
|
|
|
virtual CommandType GetType() const = 0;
|
2015-09-28 11:49:50 +00:00
|
|
|
virtual void ExecuteOnDT(DrawTarget* aDT,
|
|
|
|
const Matrix* aTransform = nullptr) const = 0;
|
2017-10-31 19:02:31 +00:00
|
|
|
virtual void CloneInto(CaptureCommandList* aList) = 0;
|
2019-03-18 18:42:04 +00:00
|
|
|
virtual void Log(TreeLog<>& aLog) const = 0;
|
2014-08-01 16:01:47 +00:00
|
|
|
};
|
|
|
|
|
2017-10-31 19:02:30 +00:00
|
|
|
} // namespace gfx
|
2015-07-13 15:25:42 +00:00
|
|
|
} // namespace mozilla
|
|
|
|
|
2014-08-01 16:01:47 +00:00
|
|
|
#endif /* MOZILLA_GFX_DRAWCOMMAND_H_ */
|