2016-03-01 17:34:38 +00:00
|
|
|
|
2012-07-28 23:26:10 +00:00
|
|
|
/*
|
2016-03-01 17:34:38 +00:00
|
|
|
* Copyright 2016 Google Inc.
|
2012-07-28 23:26:10 +00:00
|
|
|
*
|
2016-03-01 17:34:38 +00:00
|
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
|
|
* found in the LICENSE file.
|
2012-07-28 23:26:10 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef SKRASTERWIDGET_H_
|
|
|
|
#define SKRASTERWIDGET_H_
|
|
|
|
|
2015-01-14 06:49:02 +00:00
|
|
|
#include "SkSurface.h"
|
|
|
|
class SkDebugger;
|
2013-02-13 13:26:13 +00:00
|
|
|
|
2012-07-28 23:26:10 +00:00
|
|
|
#include <QWidget>
|
|
|
|
|
|
|
|
class SkRasterWidget : public QWidget {
|
2012-08-03 17:32:05 +00:00
|
|
|
Q_OBJECT
|
2012-07-28 23:26:10 +00:00
|
|
|
|
|
|
|
public:
|
2012-08-07 16:12:23 +00:00
|
|
|
SkRasterWidget(SkDebugger* debugger);
|
2012-07-28 23:26:10 +00:00
|
|
|
|
2015-01-14 06:49:02 +00:00
|
|
|
void updateImage();
|
2012-07-28 23:26:10 +00:00
|
|
|
|
2016-03-01 17:34:38 +00:00
|
|
|
Q_SIGNALS:
|
2012-08-03 17:32:05 +00:00
|
|
|
void drawComplete();
|
|
|
|
|
2012-07-28 23:26:10 +00:00
|
|
|
protected:
|
|
|
|
void paintEvent(QPaintEvent* event);
|
|
|
|
|
|
|
|
void resizeEvent(QResizeEvent* event);
|
|
|
|
|
|
|
|
private:
|
2012-08-07 16:12:23 +00:00
|
|
|
SkDebugger* fDebugger;
|
2016-03-24 15:29:40 +00:00
|
|
|
sk_sp<SkSurface> fSurface;
|
2015-01-14 06:49:02 +00:00
|
|
|
bool fNeedImageUpdate;
|
2012-07-28 23:26:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* SKRASTERWIDGET_H_ */
|