]> git.cworth.org Git - apitrace/blob - gui/apisurface.h
Add depth info to the surfaces.
[apitrace] / gui / apisurface.h
1 #ifndef APISURFACE_H
2 #define APISURFACE_H
3
4 #include <QImage>
5 #include <QSize>
6 #include <QString>
7
8 class ApiSurface
9 {
10 public:
11     ApiSurface();
12
13     QSize size() const;
14     void setSize(const QSize &size);
15
16     int numChannels() const;
17     void setNumChannels(int numChannels);
18
19     int depth() const;
20     void setDepth(int depth);
21
22     void contentsFromBase64(const QByteArray &base64);
23
24     QImage image() const;
25     QImage thumb() const;
26
27 private:
28     QSize  m_size;
29     int m_numChannels;
30     QImage m_image;
31     QImage m_thumb;
32     int m_depth;
33 };
34
35
36 class ApiTexture : public ApiSurface
37 {
38 public:
39     ApiTexture();
40
41     QString label() const;
42     void setLabel(const QString &str);
43
44 private:
45     QString m_label;
46 };
47
48 class ApiFramebuffer : public ApiSurface
49 {
50 public:
51     ApiFramebuffer();
52
53     QString type() const;
54     void setType(const QString &str);
55
56 private:
57     QString m_type;
58
59 };
60
61 #endif