1 /* 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" 15 class SkDebugger; 16 17 class SkDrawCommandGeometryWidget : public QFrame { 18 Q_OBJECT 19 20 public: 21 SkDrawCommandGeometryWidget(SkDebugger* debugger); 22 void setDrawCommandIndex(int index); 23 24 protected: 25 void paintEvent(QPaintEvent* event); 26 void resizeEvent(QResizeEvent* event); 27 28 private: 29 void updateImage(); 30 31 SkDebugger* fDebugger; 32 sk_sp<SkSurface> fSurface; 33 int fCommandIndex; 34 }; 35 36 #endif /* SKDRAWCOMMANDGEOMETRYWIDGET_H_ */ 37