]> git.cworth.org Git - apitrace/blob - gui/apisurface.cpp
Use skiplist-based FastCallSet within trace::CallSet
[apitrace] / gui / apisurface.cpp
1 #include "apisurface.h"
2 #include "thumbnail.h"
3
4 #include <QDebug>
5 #include <QSysInfo>
6
7 ApiSurface::ApiSurface()
8 {
9 }
10
11 QSize ApiSurface::size() const
12 {
13     return m_size;
14 }
15
16 void ApiSurface::setSize(const QSize &size)
17 {
18     m_size = size;
19 }
20
21 void ApiSurface::contentsFromBase64(const QByteArray &base64)
22 {
23     QByteArray dataArray = QByteArray::fromBase64(base64);
24     m_image.loadFromData(dataArray, "png");
25     m_thumb = thumbnail(m_image);
26 }
27
28 QImage ApiSurface::image() const
29 {
30     return m_image;
31 }
32
33 QImage ApiSurface::thumb() const
34 {
35     return m_thumb;
36 }
37
38 int ApiSurface::depth() const
39 {
40     return m_depth;
41 }
42
43 void ApiSurface::setDepth(int depth)
44 {
45     m_depth = depth;
46 }
47
48 QString ApiSurface::formatName() const
49 {
50     return m_formatName;
51 }
52
53 void ApiSurface::setFormatName(const QString &str)
54 {
55     m_formatName = str;
56 }
57
58
59 ApiTexture::ApiTexture()
60     : ApiSurface()
61 {
62 }
63
64 QString ApiTexture::label() const
65 {
66     return m_label;
67 }
68
69 void ApiTexture::setLabel(const QString &str)
70 {
71     m_label = str;
72 }
73
74 ApiFramebuffer::ApiFramebuffer()
75     : ApiSurface()
76 {
77 }
78
79 QString ApiFramebuffer::type() const
80 {
81     return m_type;
82 }
83
84 void ApiFramebuffer::setType(const QString &str)
85 {
86     m_type = str;
87 }
88