]> git.siccegge.de Git - frida/frida.git/commitdiff
Multiply stepsize by 3
authorChristoph Egger <christoph@christoph-egger.org>
Mon, 25 May 2015 11:18:04 +0000 (13:18 +0200)
committerChristoph Egger <christoph@christoph-egger.org>
Mon, 25 May 2015 11:18:04 +0000 (13:18 +0200)
As profiling show rather some time spent in that are, cut down number
of iterations to one third. Shouldn't impact quality at all

src/gui/widgets/CFGScene.cxx
src/gui/widgets/FunctionWidget.cxx

index aa27f2c1722caed1bfc2bb5e277ec10ab5495573..2c18c7bedc4871cdaed7b90906f45ff4be1c636f 100644 (file)
@@ -88,12 +88,12 @@ void CFGScene::spaceWidgets() {
                        if (NULL != next[0]
                            && (next[0]->getEntry() - widget->getEntry()).y() > 0
                            && (next[0]->getEntry() - out).y() < 50) {
-                               widget->moveBy(0, -1);
+                               widget->moveBy(0, -3);
                                changed = true;
                        } else if (NULL != next[1]
                            && (next[1]->getEntry() - widget->getEntry()).y() > 0
                            && (next[1]->getEntry() - out).y() < 50) {
-                               widget->moveBy(0, -1);
+                               widget->moveBy(0, -3);
                                changed = true;
                        }
                }
@@ -113,10 +113,10 @@ void CFGScene::spaceWidgets() {
                        itemrect.moveTo(item->scenePos());
                        while (relevantRect.intersects(itemrect)) {
                                if (widget->scenePos().x() > item->scenePos().x()) {
-                                       widget->moveBy(1, 0);
+                                       widget->moveBy(3, 0);
                                        relevantRect.moveTo(widget->scenePos());
                                } else {
-                                       item->moveBy(1, 0);
+                                       item->moveBy(3, 0);
                                        itemrect.moveTo(item->scenePos());
                                }
                        }
index d717171755e0b223b171cde61f543d6594f64c33..17b539f4b93db26a749212f83cfd357a97a3ee5e 100644 (file)
@@ -38,7 +38,7 @@ FunctionWidget::FunctionWidget(Function* function, Mainwindow* mainwindow)
 
        std::map<uint64_t, BasicBlockWidget*> _blocks;
        local__add_basic_block(block, mainwindow,
-                              manager, _blocks, scene, start_address, 100);
+                              manager, _blocks, scene, 3*start_address, 100);
 
        QGraphicsView * view = new QGraphicsView(scene);
        view->setDragMode(QGraphicsView::ScrollHandDrag);
@@ -77,7 +77,7 @@ namespace {
 
                scene->addItem(widget);
                widget->setFlag(QGraphicsItem::ItemIsMovable, true);
-               widget->moveBy(100*startx, block->getStartAddress() - starty);
+               widget->moveBy(100*startx, 3*block->getStartAddress() - starty);
 
                BasicBlockWidget *tmp, *nextl(NULL), *nextr(NULL);
                BasicBlock * tmpblock;