aboutsummaryrefslogtreecommitdiffhomepage
path: root/debugger/QT/SkRasterWidget.h
blob: d88590ecdf67c21545808ab3084dba416219f862 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39

/*
 * Copyright 2016 Google Inc.
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#ifndef SKRASTERWIDGET_H_
#define SKRASTERWIDGET_H_

#include "SkSurface.h"
class SkDebugger;

#include <QWidget>

class  SkRasterWidget : public QWidget {
    Q_OBJECT

public:
    SkRasterWidget(SkDebugger* debugger);

    void updateImage();

Q_SIGNALS:
    void drawComplete();

protected:
    void paintEvent(QPaintEvent* event);

    void resizeEvent(QResizeEvent* event);

private:
    SkDebugger* fDebugger;
    sk_sp<SkSurface> fSurface;
    bool fNeedImageUpdate;
};

#endif /* SKRASTERWIDGET_H_ */