Replace reference parameter with pointer so that we can pass NULL
in SkDrawPaint::add(); check the pointer when it's used to avoid
dereferencing NULL.

Add title to Animator sample slide.



git-svn-id: http://skia.googlecode.com/svn/trunk@1825 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/samplecode/SampleAnimator.cpp b/samplecode/SampleAnimator.cpp
index 99173fc..b4e487a 100644
--- a/samplecode/SampleAnimator.cpp
+++ b/samplecode/SampleAnimator.cpp
@@ -24,6 +24,7 @@
 protected:
     // overrides
     virtual void onDraw(SkCanvas*);
+    virtual bool onQuery(SkEvent* evt);
     
 private:
     SkString fBaseURI;
@@ -140,6 +141,14 @@
     }
 }
 
+bool SkAnimatorView::onQuery(SkEvent* evt) {
+    if (SampleCode::TitleQ(*evt)) {
+        SampleCode::TitleR(evt, "Animator");
+        return true;
+    }
+    return this->INHERITED::onQuery(evt);
+}
+
 //////////////////////////////////////////////////////////////////////////////
 
 static SkView* MyFactory() {