aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--tools/ok.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/ok.cpp b/tools/ok.cpp
index 06c417a2de..8920aac7d0 100644
--- a/tools/ok.cpp
+++ b/tools/ok.cpp
@@ -396,7 +396,10 @@ int main(int argc, char** argv) {
auto size = src->size();
auto surface = SkSurface::MakeRasterN32Premul(size.width(), size.height());
- src->draw(surface->getCanvas());
+
+ auto canvas = surface->getCanvas();
+ src->draw(canvas);
+ canvas->restoreToCount(0);
if (!write_dir.empty()) {
auto image = surface->makeImageSnapshot();