aboutsummaryrefslogtreecommitdiffhomepage
path: root/debugger/QT/SkCanvasWidget.h
diff options
context:
space:
mode:
Diffstat (limited to 'debugger/QT/SkCanvasWidget.h')
-rw-r--r--debugger/QT/SkCanvasWidget.h73
1 files changed, 3 insertions, 70 deletions
diff --git a/debugger/QT/SkCanvasWidget.h b/debugger/QT/SkCanvasWidget.h
index 13e4b2733b..ff72c60066 100644
--- a/debugger/QT/SkCanvasWidget.h
+++ b/debugger/QT/SkCanvasWidget.h
@@ -15,12 +15,13 @@
#include "SkStream.h"
#include "SkRasterWidget.h"
#include "SkGLWidget.h"
+#include "SkDebugger.h"
class SkCanvasWidget : public QWidget {
Q_OBJECT
public:
- SkCanvasWidget(QWidget* parent);
+ SkCanvasWidget(QWidget* parent, SkDebugger* debugger);
~SkCanvasWidget();
@@ -29,77 +30,10 @@ public:
kGPU_WidgetType = 1 << 1,
};
- /**
- Returns the visibility of the command at the specified index.
- @param index The index of the draw command
- */
- bool commandIsVisibleAtIndex(int index) {
- return fDebugCanvas->getDrawCommandVisibilityAt(index);
- }
-
- /**
- Toggles the visibility / execution of the draw command at index i with
- the value of toggle.
- */
- void setCommandVisibliltyAtIndex(int index, bool toggle) {
- fDebugCanvas->toggleCommand(index, toggle);
- }
-
- /**
- Returns a vector of strings with all the current canvas draw
- commands.
- */
- std::vector<std::string>* getDrawCommands() {
- return fDebugCanvas->getDrawCommandsAsStrings();
- }
-
- SkDebugCanvas* getCurrentDebugCanvas() {
- return fDebugCanvas;
- }
-
void drawTo(int index);
void setWidgetVisibility(WidgetType type, bool isHidden);
- /**
- Toggles drawing filter on all drawing commands previous to current.
- */
- void toggleCurrentCommandFilter(bool toggle) {
- fDebugCanvas->toggleFilter(toggle);
- }
-
- /**
- TODO(chudy): Refactor into a struct of char**
- Returns parameter information about the ith draw command.
- @param: i The index of the draw command we are accessing
- */
- std::vector<std::string>* getCurrentCommandInfo(int i) {
- return fDebugCanvas->getCommandInfoAt(i);
- }
-
- const SkMatrix& getCurrentMatrix() {
- return fDebugCanvas->getCurrentMatrix();
- }
-
- const SkIRect& getCurrentClip() {
- return fDebugCanvas->getCurrentClip();
- }
-
- void loadPicture(QString filename);
-
- // TODO(chudy): Not full proof since fRasterWidget isn't always drawn to.
- int getBitmapHeight() {
- return fRasterWidget.getBitmapHeight();
- }
-
- int getBitmapWidth() {
- return fRasterWidget.getBitmapWidth();
- }
-
- SkRasterWidget* getRasterWidget() {
- return &fRasterWidget;
- }
-
void zoom(float zoomIncrement);
signals:
@@ -116,11 +50,10 @@ private:
QHBoxLayout fHorizontalLayout;
SkRasterWidget fRasterWidget;
SkGLWidget fGLWidget;
- SkDebugCanvas* fDebugCanvas;
+ SkDebugger* fDebugger;
SkIPoint fPreviousPoint;
SkIPoint fUserOffset;
float fUserScaleFactor;
- int fIndex;
void resetWidgetTransform();