aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/utils/debugger/SkDebugCanvas.h
diff options
context:
space:
mode:
authorGravatar kkinnunen <kkinnunen@nvidia.com>2015-01-13 23:09:19 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-01-13 23:09:19 -0800
commit26a00de4f303fe74527f00b777a871843ae4437e (patch)
tree8b9d745e38d2002d9bca2f81bad191002311d8ba /src/utils/debugger/SkDebugCanvas.h
parentcfdc0e3fee69694e0f6b083d8455665b2a810589 (diff)
Remove incremental draw optimization from SkDebugCanvas
The SkDebugCanvas can be (or is currently) being used to draw to multiple different canvases. If this use-case is intended, then storing draw -related state in the canvas causes bugs. Remove incremental draw from SkDebugCanvas. It can only optimize the case where draw command index is advanced, no other changes are done and no visualization is used. This case is not that critical, as it happens only once per new frame at most. It causes bugs, because one SkDebugCanvas is used to draw to multiple canvases. Leave the draw to canvas in same state as it was passed in. This fixes the debugger bugs where: * Old, stale image would stay on the raster canvas when a new image is loaded. Also happened with resizes. * Proper image for overdraw filter would be visible only for the first frame Review URL: https://codereview.chromium.org/844493003
Diffstat (limited to 'src/utils/debugger/SkDebugCanvas.h')
-rw-r--r--src/utils/debugger/SkDebugCanvas.h14
1 files changed, 0 insertions, 14 deletions
diff --git a/src/utils/debugger/SkDebugCanvas.h b/src/utils/debugger/SkDebugCanvas.h
index 3d9983b504..e1ad077f83 100644
--- a/src/utils/debugger/SkDebugCanvas.h
+++ b/src/utils/debugger/SkDebugCanvas.h
@@ -35,9 +35,6 @@ public:
void setOverdrawViz(bool overdrawViz) { fOverdrawViz = overdrawViz; }
bool getOverdrawViz() const { return fOverdrawViz; }
- void setOutstandingSaveCount(int saveCount) { fOutstandingSaveCount = saveCount; }
- int getOutstandingSaveCount() const { return fOutstandingSaveCount; }
-
bool getAllowSimplifyClip() const { return fAllowSimplifyClip; }
void setPicture(SkPicture* picture) { fPicture = picture; }
@@ -137,7 +134,6 @@ public:
void setUserMatrix(SkMatrix matrix) {
fUserMatrix = matrix;
- fDrawNeedsReset = true;
}
SkString clipStackData() const { return fClipStackData; }
@@ -225,9 +221,7 @@ private:
SkPicture* fPicture;
bool fFilter;
bool fMegaVizMode;
- int fIndex;
SkMatrix fUserMatrix;
- bool fDrawNeedsReset; // fUserMatrix has changed so the incremental draw won't work
SkMatrix fMatrix;
SkIRect fClip;
@@ -242,14 +236,6 @@ private:
SkTexOverrideFilter* fTexOverrideFilter;
/**
- Number of unmatched save() calls at any point during a draw.
- If there are any saveLayer() calls outstanding, we need to resolve
- all of them, which in practice means resolving all save() calls,
- to avoid corruption of our canvas.
- */
- int fOutstandingSaveCount;
-
- /**
The active saveLayer commands at a given point in the renderering.
Only used when "mega" visualization is enabled.
*/