Optimized hit testing feature, refactored into seperate function from canvas draw calls

Review URL: https://codereview.appspot.com/6443068

git-svn-id: http://skia.googlecode.com/svn/trunk@4867 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/debugger/QT/SkRasterWidget.cpp b/debugger/QT/SkRasterWidget.cpp
index db89de7..2cf1f34 100644
--- a/debugger/QT/SkRasterWidget.cpp
+++ b/debugger/QT/SkRasterWidget.cpp
@@ -28,12 +28,8 @@
 void SkRasterWidget::resizeEvent(QResizeEvent* event) {
     fBitmap.setConfig(SkBitmap::kARGB_8888_Config, event->size().width(), event->size().height());
     fBitmap.allocPixels();
-    if (fDevice) {
-        delete fDevice;
-    }
-        fDevice = new SkDevice(fBitmap);
-
-
+    delete fDevice;
+    fDevice = new SkDevice(fBitmap);
     this->update();
 }
 
@@ -50,7 +46,7 @@
 
         fMatrix = canvas.getTotalMatrix();
         fClip = canvas.getTotalClip().getBounds();
-        fDebugCanvas->drawTo(&canvas, fIndex+1, &fBitmap);
+        fDebugCanvas->drawTo(&canvas, fIndex);
 
         QPainter painter(this);
         QStyleOption opt;