blob: ae35fdca19748c0566ced1c4d79e863bc3140b5c [file] [log] [blame]
kkinnunen63a47022014-12-30 23:03:56 -08001/*
2 * Copyright 2014 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8
9#ifndef SKDRAWCOMMANDGEOMETRYWIDGET_H_
10#define SKDRAWCOMMANDGEOMETRYWIDGET_H_
11
12#include <QFrame>
13
14#include "SkSurface.h"
15class SkDebugger;
16
17class SkDrawCommandGeometryWidget : public QFrame {
18 Q_OBJECT
19
20public:
21 SkDrawCommandGeometryWidget(SkDebugger* debugger);
kkinnunen0cfeaf32015-01-07 07:33:46 -080022 void setDrawCommandIndex(int index);
kkinnunen63a47022014-12-30 23:03:56 -080023
24protected:
25 void paintEvent(QPaintEvent* event);
26 void resizeEvent(QResizeEvent* event);
27
28private:
kkinnunen0cfeaf32015-01-07 07:33:46 -080029 void updateImage();
30
kkinnunen63a47022014-12-30 23:03:56 -080031 SkDebugger* fDebugger;
robertphillipsd98120e2016-03-24 08:29:40 -070032 sk_sp<SkSurface> fSurface;
kkinnunen0cfeaf32015-01-07 07:33:46 -080033 int fCommandIndex;
kkinnunen63a47022014-12-30 23:03:56 -080034};
35
36#endif /* SKDRAWCOMMANDGEOMETRYWIDGET_H_ */