State reset and gpu timers added.

git-svn-id: http://skia.googlecode.com/svn/trunk@5177 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tools/PictureRenderer.h b/tools/PictureRenderer.h
index 914857d..b419900 100644
--- a/tools/PictureRenderer.h
+++ b/tools/PictureRenderer.h
@@ -28,6 +28,7 @@
     virtual void init(SkPicture* pict);
     virtual void render() = 0;
     virtual void end();
+    virtual void resetState();
 
     SkCanvas* getCanvas() {
         return fCanvas.get();
@@ -49,6 +50,14 @@
     bool isUsingGpuDevice() {
         return kGPU_DeviceType == fDeviceType;
     }
+
+    SkGLContext* getGLContext() {
+        if (this->isUsingGpuDevice()) {
+            return fGrContextFactory.getGLContext(GrContextFactory::kNative_GLContextType);
+        } else {
+            return NULL;
+        }
+    }
 #endif
 
     PictureRenderer()