]> git.cworth.org Git - apitrace/blob - gui/apisurface.h
Linearize texture data in JSON.
[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     void contentsFromBase64(const QByteArray &base64);
20
21     QImage image() const;
22     QImage thumb() const;
23
24 private:
25     QSize  m_size;
26     int m_numChannels;
27     QImage m_image;
28     QImage m_thumb;
29 };
30
31
32 class ApiTexture : public ApiSurface
33 {
34 public:
35     ApiTexture();
36
37     QString label() const;
38     void setLabel(const QString &str);
39
40 private:
41     QString m_label;
42 };
43
44 class ApiFramebuffer : public ApiSurface
45 {
46 public:
47     ApiFramebuffer();
48
49     QString type() const;
50     void setType(const QString &str);
51
52 private:
53     QString m_type;
54
55 };
56
57 #endif