diff options
author | keyar@chromium.org <keyar@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-08-20 15:04:00 +0000 |
---|---|---|
committer | keyar@chromium.org <keyar@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-08-20 15:04:00 +0000 |
commit | 275be533fa54ea52840cec9c635f6b7de90716a7 (patch) | |
tree | ea7733cf06eeed8ef48558ed278eb6cc5f3e1ceb | |
parent | a474ce3c0b7f72539e20a57b583b99046dfb7706 (diff) |
The tiles are properly reset.
git-svn-id: http://skia.googlecode.com/svn/trunk@5181 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r-- | tools/PictureRenderer.cpp | 8 | ||||
-rw-r--r-- | tools/PictureRenderer.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/tools/PictureRenderer.cpp b/tools/PictureRenderer.cpp index d014f0ddf3..afa7ce8286 100644 --- a/tools/PictureRenderer.cpp +++ b/tools/PictureRenderer.cpp @@ -186,6 +186,14 @@ void TiledPictureRenderer::drawTiles() { } } +void TiledPictureRenderer::resetState() { + for (int i = 0; i < fTiles.count(); ++i) { + fTiles[i].fCanvas->flush(); + } + + this->INHERITED::resetState(); +} + void TiledPictureRenderer::copyTilesToCanvas() { int tile_index = 0; for (int tile_y_start = 0; tile_y_start < fPicture->height(); diff --git a/tools/PictureRenderer.h b/tools/PictureRenderer.h index 78c19f0090..b7e4850606 100644 --- a/tools/PictureRenderer.h +++ b/tools/PictureRenderer.h @@ -115,6 +115,7 @@ public: virtual void init(SkPicture* pict) SK_OVERRIDE; virtual void render() SK_OVERRIDE; virtual void end() SK_OVERRIDE; + virtual void resetState() SK_OVERRIDE; void drawTiles(); void setTileWidth(int width) { |