chudy@google.com | 38b08ce | 2012-07-28 23:26:10 +0000 | [diff] [blame] | 1 | |
robertphillips | 9ea8acd | 2016-03-01 09:34:38 -0800 | [diff] [blame] | 2 | /* |
3 | * Copyright 2016 Google Inc. | ||||
4 | * | ||||
5 | * Use of this source code is governed by a BSD-style license that can be | ||||
6 | * found in the LICENSE file. | ||||
7 | */ | ||||
chudy@google.com | 38b08ce | 2012-07-28 23:26:10 +0000 | [diff] [blame] | 8 | |
9 | #ifndef SKRASTERWIDGET_H_ | ||||
10 | #define SKRASTERWIDGET_H_ | ||||
11 | |||||
kkinnunen | cfdc0e3 | 2015-01-13 22:49:02 -0800 | [diff] [blame] | 12 | #include "SkSurface.h" |
13 | class SkDebugger; | ||||
robertphillips@google.com | e8fe4bc | 2013-02-13 13:26:13 +0000 | [diff] [blame] | 14 | |
chudy@google.com | 38b08ce | 2012-07-28 23:26:10 +0000 | [diff] [blame] | 15 | #include <QWidget> |
16 | |||||
17 | class SkRasterWidget : public QWidget { | ||||
chudy@google.com | a9e937c | 2012-08-03 17:32:05 +0000 | [diff] [blame] | 18 | Q_OBJECT |
chudy@google.com | 38b08ce | 2012-07-28 23:26:10 +0000 | [diff] [blame] | 19 | |
20 | public: | ||||
chudy@google.com | 607357f | 2012-08-07 16:12:23 +0000 | [diff] [blame] | 21 | SkRasterWidget(SkDebugger* debugger); |
chudy@google.com | 38b08ce | 2012-07-28 23:26:10 +0000 | [diff] [blame] | 22 | |
kkinnunen | cfdc0e3 | 2015-01-13 22:49:02 -0800 | [diff] [blame] | 23 | void updateImage(); |
chudy@google.com | 38b08ce | 2012-07-28 23:26:10 +0000 | [diff] [blame] | 24 | |
robertphillips | 9ea8acd | 2016-03-01 09:34:38 -0800 | [diff] [blame] | 25 | Q_SIGNALS: |
chudy@google.com | a9e937c | 2012-08-03 17:32:05 +0000 | [diff] [blame] | 26 | void drawComplete(); |
27 | |||||
chudy@google.com | 38b08ce | 2012-07-28 23:26:10 +0000 | [diff] [blame] | 28 | protected: |
29 | void paintEvent(QPaintEvent* event); | ||||
30 | |||||
31 | void resizeEvent(QResizeEvent* event); | ||||
32 | |||||
33 | private: | ||||
chudy@google.com | 607357f | 2012-08-07 16:12:23 +0000 | [diff] [blame] | 34 | SkDebugger* fDebugger; |
robertphillips | d98120e | 2016-03-24 08:29:40 -0700 | [diff] [blame] | 35 | sk_sp<SkSurface> fSurface; |
kkinnunen | cfdc0e3 | 2015-01-13 22:49:02 -0800 | [diff] [blame] | 36 | bool fNeedImageUpdate; |
chudy@google.com | 38b08ce | 2012-07-28 23:26:10 +0000 | [diff] [blame] | 37 | }; |
38 | |||||
39 | #endif /* SKRASTERWIDGET_H_ */ |