blob: a0355c1f174ce5746dfeda9e9b63ecac241cdd36 [file] [log] [blame]
chudy@google.com38b08ce2012-07-28 23:26:10 +00001/*
2 * SkRasterWidget.h
3 *
4 * Created on: Jul 28, 2012
5 * Author: chudy
6 */
7
8
9#ifndef SKRASTERWIDGET_H_
10#define SKRASTERWIDGET_H_
11
12#include "SkGpuDevice.h"
13#include "SkDevice.h"
chudy@google.com607357f2012-08-07 16:12:23 +000014#include "SkDebugger.h"
chudy@google.com38b08ce2012-07-28 23:26:10 +000015
16#include <QApplication>
17#include <QtGui>
18#include <QWidget>
19
20class SkRasterWidget : public QWidget {
chudy@google.coma9e937c2012-08-03 17:32:05 +000021 Q_OBJECT
chudy@google.com38b08ce2012-07-28 23:26:10 +000022
23public:
chudy@google.com607357f2012-08-07 16:12:23 +000024 SkRasterWidget(SkDebugger* debugger);
chudy@google.com38b08ce2012-07-28 23:26:10 +000025
26 ~SkRasterWidget();
27
chudy@google.com607357f2012-08-07 16:12:23 +000028 void draw() {
chudy@google.com38b08ce2012-07-28 23:26:10 +000029 this->update();
30 }
31
chudy@google.coma9e937c2012-08-03 17:32:05 +000032signals:
33 void drawComplete();
34
chudy@google.com38b08ce2012-07-28 23:26:10 +000035protected:
36 void paintEvent(QPaintEvent* event);
37
38 void resizeEvent(QResizeEvent* event);
39
40private:
41 SkBitmap fBitmap;
chudy@google.com607357f2012-08-07 16:12:23 +000042 SkDebugger* fDebugger;
chudy@google.com830b8792012-08-01 15:57:52 +000043 SkCanvas* fCanvas;
chudy@google.com38b08ce2012-07-28 23:26:10 +000044 SkDevice* fDevice;
chudy@google.com38b08ce2012-07-28 23:26:10 +000045};
46
47#endif /* SKRASTERWIDGET_H_ */