Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(518)

Unified Diff: src/utils/debugger/SkDebugCanvas.cpp

Issue 21789005: Fix OverdrawFilter not set on first call to SkDebugCanvas::drawTo() (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/debugger/SkDebugCanvas.cpp
diff --git a/src/utils/debugger/SkDebugCanvas.cpp b/src/utils/debugger/SkDebugCanvas.cpp
index c6fcb07b8c46ba5106d14ec38588f030fd127dca..0e07084e43ad77e6088f2816e35e99c64261138b 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++) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698