1 
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  */
8 
9 #ifndef SKRASTERWIDGET_H_
10 #define SKRASTERWIDGET_H_
11 
12 #include "SkSurface.h"
13 class SkDebugger;
14 
15 #include <QWidget>
16 
17 class  SkRasterWidget : public QWidget {
18     Q_OBJECT
19 
20 public:
21     SkRasterWidget(SkDebugger* debugger);
22 
23     void updateImage();
24 
25 Q_SIGNALS:
26     void drawComplete();
27 
28 protected:
29     void paintEvent(QPaintEvent* event);
30 
31     void resizeEvent(QResizeEvent* event);
32 
33 private:
34     SkDebugger* fDebugger;
35     sk_sp<SkSurface> fSurface;
36     bool fNeedImageUpdate;
37 };
38 
39 #endif /* SKRASTERWIDGET_H_ */
40