chudy@google.com | 38b08ce | 2012-07-28 23:26:10 +0000 | [diff] [blame] | 1 | /* |
| 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.com | 607357f | 2012-08-07 16:12:23 +0000 | [diff] [blame] | 14 | #include "SkDebugger.h" |
chudy@google.com | 38b08ce | 2012-07-28 23:26:10 +0000 | [diff] [blame] | 15 | |
| 16 | #include <QApplication> |
| 17 | #include <QtGui> |
| 18 | #include <QWidget> |
| 19 | |
| 20 | class SkRasterWidget : public QWidget { |
chudy@google.com | a9e937c | 2012-08-03 17:32:05 +0000 | [diff] [blame] | 21 | Q_OBJECT |
chudy@google.com | 38b08ce | 2012-07-28 23:26:10 +0000 | [diff] [blame] | 22 | |
| 23 | public: |
chudy@google.com | 607357f | 2012-08-07 16:12:23 +0000 | [diff] [blame] | 24 | SkRasterWidget(SkDebugger* debugger); |
chudy@google.com | 38b08ce | 2012-07-28 23:26:10 +0000 | [diff] [blame] | 25 | |
| 26 | ~SkRasterWidget(); |
| 27 | |
chudy@google.com | 607357f | 2012-08-07 16:12:23 +0000 | [diff] [blame] | 28 | void draw() { |
chudy@google.com | 38b08ce | 2012-07-28 23:26:10 +0000 | [diff] [blame] | 29 | this->update(); |
| 30 | } |
| 31 | |
chudy@google.com | a9e937c | 2012-08-03 17:32:05 +0000 | [diff] [blame] | 32 | signals: |
| 33 | void drawComplete(); |
| 34 | |
chudy@google.com | 38b08ce | 2012-07-28 23:26:10 +0000 | [diff] [blame] | 35 | protected: |
| 36 | void paintEvent(QPaintEvent* event); |
| 37 | |
| 38 | void resizeEvent(QResizeEvent* event); |
| 39 | |
| 40 | private: |
| 41 | SkBitmap fBitmap; |
chudy@google.com | 607357f | 2012-08-07 16:12:23 +0000 | [diff] [blame] | 42 | SkDebugger* fDebugger; |
chudy@google.com | 830b879 | 2012-08-01 15:57:52 +0000 | [diff] [blame] | 43 | SkCanvas* fCanvas; |
chudy@google.com | 38b08ce | 2012-07-28 23:26:10 +0000 | [diff] [blame] | 44 | SkDevice* fDevice; |
chudy@google.com | 38b08ce | 2012-07-28 23:26:10 +0000 | [diff] [blame] | 45 | }; |
| 46 | |
| 47 | #endif /* SKRASTERWIDGET_H_ */ |