Reuse one canvas for every tile in bench_pictures (in single threaded mode).

Turn off multi threaded option for now.

In bench_pictures, do not create a large canvas, since we never use it.

Remove unused functions on TiledPictureRenderer.

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

git-svn-id: http://skia.googlecode.com/svn/trunk@5583 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tools/PictureRenderer.h b/tools/PictureRenderer.h
index 9eeb03d..5ae3f29 100644
--- a/tools/PictureRenderer.h
+++ b/tools/PictureRenderer.h
@@ -11,6 +11,7 @@
 #include "SkPicture.h"
 #include "SkTypes.h"
 #include "SkTDArray.h"
+#include "SkRect.h"
 #include "SkRefCnt.h"
 #include "SkString.h"
 
@@ -147,7 +148,6 @@
     virtual void init(SkPicture* pict) SK_OVERRIDE;
     virtual void render(bool doExtraWorkToDrawToBaseCanvas) SK_OVERRIDE;
     virtual void end() SK_OVERRIDE;
-    void drawTiles();
 
     void setTileWidth(int width) {
         fTileWidth = width;
@@ -194,26 +194,14 @@
         return fTileMinPowerOf2Width;
     }
 
-    int numTiles() const {
-        return fTiles.count();
-    }
-
     void setMultiThreaded(bool multi) {
         fMultiThreaded = multi;
     }
 
-    bool isMultiThreaded() const {
-        return fMultiThreaded;
-    }
-
     void setUsePipe(bool usePipe) {
         fUsePipe = usePipe;
     }
 
-    bool isUsePipe() const {
-        return fUsePipe;
-    }
-
     ~TiledPictureRenderer();
 
 private:
@@ -225,18 +213,11 @@
     double fTileHeightPercentage;
     int fTileMinPowerOf2Width;
 
-    SkTDArray<SkCanvas*> fTiles;
+    SkTDArray<SkRect> fTileRects;
 
-    // Clips the tile to an area that is completely in what the SkPicture says is the
-    // drawn-to area. This is mostly important for tiles on the right and bottom edges
-    // as they may go over this area and the picture may have some commands that
-    // draw outside of this area and so should not actually be written.
-    void clipTile(SkCanvas* tile);
-    void addTile(int tile_x_start, int tile_y_start, int width, int height);
     void setupTiles();
     void setupPowerOf2Tiles();
     void deleteTiles();
-    void copyTilesToCanvas();
 
     typedef PictureRenderer INHERITED;
 };