add init() method, so we don't draw in our constructor (makes debugging harder)



git-svn-id: http://skia.googlecode.com/svn/trunk@3368 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/samplecode/SampleSlides.cpp b/samplecode/SampleSlides.cpp
index d39cee0..9b72afb 100644
--- a/samplecode/SampleSlides.cpp
+++ b/samplecode/SampleSlides.cpp
@@ -724,8 +724,18 @@
 
 class SlideView : public SampleView {
     int fIndex;
+    bool fOnce;
 public:
     SlideView() {
+        fOnce = false;
+    }
+    
+    void init() {
+        if (fOnce) {
+            return;
+        }
+        fOnce = true;
+
         fIndex = 0;
         
         SkBitmap bm;
@@ -757,10 +767,12 @@
     }
     
     virtual void onDrawContent(SkCanvas* canvas) {
+        this->init();
         gProc[fIndex](canvas);
     }
 
     virtual SkView::Click* onFindClickHandler(SkScalar x, SkScalar y) {
+        this->init();
         fIndex = (fIndex + 1) % SK_ARRAY_COUNT(gProc);
         this->inval(NULL);
         return NULL;