aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar keyar@chromium.org <keyar@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-08-20 15:04:00 +0000
committerGravatar keyar@chromium.org <keyar@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-08-20 15:04:00 +0000
commit275be533fa54ea52840cec9c635f6b7de90716a7 (patch)
treeea7733cf06eeed8ef48558ed278eb6cc5f3e1ceb
parenta474ce3c0b7f72539e20a57b583b99046dfb7706 (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.cpp8
-rw-r--r--tools/PictureRenderer.h1
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) {