From 4c7962e0a866b8416fa7046791c129eb5430b677 Mon Sep 17 00:00:00 2001 From: "chudy@google.com" Date: Tue, 14 Aug 2012 19:38:31 +0000 Subject: [PATCH] Bug Fix: Fixes transformation bug where debugger locked up during incremental draw due to nested clips not being cleared. Review URL: https://codereview.appspot.com/6462060 git-svn-id: http://skia.googlecode.com/svn/trunk@5095 2bbb7eff-a529-9590-31e7-b0007b416f81 --- debugger/QT/SkDebuggerGUI.cpp | 2 +- debugger/SkDebugCanvas.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/debugger/QT/SkDebuggerGUI.cpp b/debugger/QT/SkDebuggerGUI.cpp index f5c78d6..a03c878 100644 --- a/debugger/QT/SkDebuggerGUI.cpp +++ b/debugger/QT/SkDebuggerGUI.cpp @@ -577,7 +577,7 @@ void SkDebuggerGUI::loadPicture(QString fileName) { SkPicture* picture = new SkPicture(stream); fCanvasWidget.resetWidgetTransform(); fDebugger.loadPicture(picture); - fCanvasWidget.drawTo(fDebugger.index()); + SkSafeUnref(stream); SkSafeUnref(picture); diff --git a/debugger/SkDebugCanvas.cpp b/debugger/SkDebugCanvas.cpp index 59f982a..4751be7 100644 --- a/debugger/SkDebugCanvas.cpp +++ b/debugger/SkDebugCanvas.cpp @@ -89,6 +89,8 @@ void SkDebugCanvas::drawTo(SkCanvas* canvas, int index) { i = 0; canvas->clear(0); canvas->resetMatrix(); + SkRect rect = SkRect::MakeWH(fWidth, fHeight); + canvas->clipRect(rect, SkRegion::kReplace_Op ); applyUserTransform(canvas); } -- 2.7.4