From 275be533fa54ea52840cec9c635f6b7de90716a7 Mon Sep 17 00:00:00 2001 From: "keyar@chromium.org" Date: Mon, 20 Aug 2012 15:04:00 +0000 Subject: The tiles are properly reset. git-svn-id: http://skia.googlecode.com/svn/trunk@5181 2bbb7eff-a529-9590-31e7-b0007b416f81 --- tools/PictureRenderer.cpp | 8 ++++++++ tools/PictureRenderer.h | 1 + 2 files changed, 9 insertions(+) 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) { -- cgit v1.2.3