Source code

Revision control

Other Tools

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
#include "CanvasRenderer.h"
8
9
#include "OOPCanvasRenderer.h"
10
11
namespace mozilla {
12
namespace layers {
13
14
CanvasInitializeData::CanvasInitializeData() = default;
15
CanvasInitializeData::~CanvasInitializeData() = default;
16
17
CanvasRenderer::CanvasRenderer()
18
: mPreTransCallback(nullptr),
19
mPreTransCallbackData(nullptr),
20
mDidTransCallback(nullptr),
21
mDidTransCallbackData(nullptr),
22
mDirty(false) {
23
MOZ_COUNT_CTOR(CanvasRenderer);
24
}
25
26
CanvasRenderer::~CanvasRenderer() {
27
Destroy();
28
MOZ_COUNT_DTOR(CanvasRenderer);
29
}
30
31
void CanvasRenderer::Initialize(const CanvasInitializeData& aData) {
32
mPreTransCallback = aData.mPreTransCallback;
33
mPreTransCallbackData = aData.mPreTransCallbackData;
34
mDidTransCallback = aData.mDidTransCallback;
35
mDidTransCallbackData = aData.mDidTransCallbackData;
36
37
mSize = aData.mSize;
38
}
39
40
} // namespace layers
41
} // namespace mozilla