diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-08-05 16:31:27 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-08-05 16:31:27 +0000 |
commit | a27622c18de99fdb2c68e23b01006d3aa2bd1699 (patch) | |
tree | 0ff78f081b068bd5b975135c7a5a91e5c8c425b0 /src | |
parent | b0145ce60ea1a3bacc786ec1285218c6fe70c8a3 (diff) |
Fix OverdrawFilter not set on first call to SkDebugCanvas::drawTo()
R=robertphillips@google.com
Author: egraether@chromium.org
Review URL: https://chromiumcodereview.appspot.com/21789005
git-svn-id: http://skia.googlecode.com/svn/trunk@10535 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src')
-rw-r--r-- | src/utils/debugger/SkDebugCanvas.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/utils/debugger/SkDebugCanvas.cpp b/src/utils/debugger/SkDebugCanvas.cpp index c6fcb07b8c..0e07084e43 100644 --- a/src/utils/debugger/SkDebugCanvas.cpp +++ b/src/utils/debugger/SkDebugCanvas.cpp @@ -153,22 +153,22 @@ void SkDebugCanvas::drawTo(SkCanvas* canvas, int index) { canvas->clipRect(rect, SkRegion::kReplace_Op ); applyUserTransform(canvas); fOutstandingSaveCount = 0; + } - // The setting of the draw filter has to go here (rather than in - // SkRasterWidget) due to the canvas restores this class performs. - // Since the draw filter is stored in the layer stack if we - // call setDrawFilter on anything but the root layer odd things happen - if (fOverdrawViz) { - if (NULL == fOverdrawFilter) { - fOverdrawFilter = new OverdrawFilter; - } + // The setting of the draw filter has to go here (rather than in + // SkRasterWidget) due to the canvas restores this class performs. + // Since the draw filter is stored in the layer stack if we + // call setDrawFilter on anything but the root layer odd things happen. + if (fOverdrawViz) { + if (NULL == fOverdrawFilter) { + fOverdrawFilter = new OverdrawFilter; + } - if (fOverdrawFilter != canvas->getDrawFilter()) { - canvas->setDrawFilter(fOverdrawFilter); - } - } else { - canvas->setDrawFilter(NULL); + if (fOverdrawFilter != canvas->getDrawFilter()) { + canvas->setDrawFilter(fOverdrawFilter); } + } else { + canvas->setDrawFilter(NULL); } for (; i <= index; i++) { |