diff options
-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) { |