aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/utils/debugger
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2014-12-12 08:46:25 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2014-12-12 08:46:25 -0800
commitf0f14113431ace669f278fdd97b50950f2cf4c80 (patch)
tree1fab64f424d97fdd089622f10b3d5335bc4f1380 /src/utils/debugger
parent59dba146fe4170c4986b2494414c08be2c93d4a2 (diff)
Cull pushCull and popCull from Skia.
These calls are unused and going away. Waiting on crrev.com/796083002. BUG=skia: Review URL: https://codereview.chromium.org/794263002
Diffstat (limited to 'src/utils/debugger')
-rw-r--r--src/utils/debugger/SkDebugCanvas.cpp22
-rw-r--r--src/utils/debugger/SkDebugCanvas.h8
-rw-r--r--src/utils/debugger/SkDrawCommand.cpp26
-rw-r--r--src/utils/debugger/SkDrawCommand.h35
4 files changed, 5 insertions, 86 deletions
diff --git a/src/utils/debugger/SkDebugCanvas.cpp b/src/utils/debugger/SkDebugCanvas.cpp
index 40277b047e..f2f92b8492 100644
--- a/src/utils/debugger/SkDebugCanvas.cpp
+++ b/src/utils/debugger/SkDebugCanvas.cpp
@@ -209,7 +209,6 @@ private:
// return true in their 'active' method
void SkDebugCanvas::markActiveCommands(int index) {
fActiveLayers.rewind();
- fActiveCulls.rewind();
for (int i = 0; i < fCommandVector.count(); ++i) {
fCommandVector[i]->setActive(false);
@@ -221,10 +220,6 @@ void SkDebugCanvas::markActiveCommands(int index) {
fActiveLayers.push(fCommandVector[i]);
} else if (SkDrawCommand::kPopLayer_Action == result) {
fActiveLayers.pop();
- } else if (SkDrawCommand::kPushCull_Action == result) {
- fActiveCulls.push(fCommandVector[i]);
- } else if (SkDrawCommand::kPopCull_Action == result) {
- fActiveCulls.pop();
}
}
@@ -232,9 +227,6 @@ void SkDebugCanvas::markActiveCommands(int index) {
fActiveLayers[i]->setActive(true);
}
- for (int i = 0; i < fActiveCulls.count(); ++i) {
- fActiveCulls[i]->setActive(true);
- }
}
void SkDebugCanvas::drawTo(SkCanvas* canvas, int index) {
@@ -315,7 +307,7 @@ void SkDebugCanvas::drawTo(SkCanvas* canvas, int index) {
}
if (fMegaVizMode) {
- SkRect r = SkRect::MakeWH(SkIntToScalar(fWindowSize.fWidth),
+ SkRect r = SkRect::MakeWH(SkIntToScalar(fWindowSize.fWidth),
SkIntToScalar(fWindowSize.fHeight));
r.outset(SK_Scalar1, SK_Scalar1);
@@ -505,8 +497,8 @@ void SkDebugCanvas::drawPath(const SkPath& path, const SkPaint& paint) {
this->addDrawCommand(new SkDrawPathCommand(path, paint));
}
-void SkDebugCanvas::onDrawPicture(const SkPicture* picture,
- const SkMatrix* matrix,
+void SkDebugCanvas::onDrawPicture(const SkPicture* picture,
+ const SkMatrix* matrix,
const SkPaint* paint) {
this->addDrawCommand(new SkDrawPictureCommand(picture, matrix, paint));
}
@@ -570,14 +562,6 @@ void SkDebugCanvas::drawVertices(VertexMode vmode, int vertexCount,
texs, colors, NULL, indices, indexCount, paint));
}
-void SkDebugCanvas::onPushCull(const SkRect& cullRect) {
- this->addDrawCommand(new SkPushCullCommand(cullRect));
-}
-
-void SkDebugCanvas::onPopCull() {
- this->addDrawCommand(new SkPopCullCommand());
-}
-
void SkDebugCanvas::willRestore() {
this->addDrawCommand(new SkRestoreCommand());
this->INHERITED::willRestore();
diff --git a/src/utils/debugger/SkDebugCanvas.h b/src/utils/debugger/SkDebugCanvas.h
index 6ec26e2581..18f4c8d713 100644
--- a/src/utils/debugger/SkDebugCanvas.h
+++ b/src/utils/debugger/SkDebugCanvas.h
@@ -237,8 +237,6 @@ protected:
const SkMatrix* matrix, const SkPaint&) SK_OVERRIDE;
virtual void onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y,
const SkPaint& paint) SK_OVERRIDE;
- virtual void onPushCull(const SkRect& cullRect) SK_OVERRIDE;
- virtual void onPopCull() SK_OVERRIDE;
virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE;
virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE;
@@ -286,12 +284,6 @@ private:
SkTDArray<SkDrawCommand*> fActiveLayers;
/**
- The active cull commands at a given point in the rendering.
- Only used when "mega" visualization is enabled.
- */
- SkTDArray<SkDrawCommand*> fActiveCulls;
-
- /**
Adds the command to the classes vector of commands.
@param command The draw command for execution
*/
diff --git a/src/utils/debugger/SkDrawCommand.cpp b/src/utils/debugger/SkDrawCommand.cpp
index 02beee7ced..e7989cc001 100644
--- a/src/utils/debugger/SkDrawCommand.cpp
+++ b/src/utils/debugger/SkDrawCommand.cpp
@@ -65,8 +65,6 @@ const char* SkDrawCommand::GetCommandString(DrawType type) {
case COMMENT: return "Comment";
case END_COMMENT_GROUP: return "EndCommentGroup";
case DRAW_DRRECT: return "Draw DRRect";
- case PUSH_CULL: return "PushCull";
- case POP_CULL: return "PopCull";
default:
SkDebugf("DrawType error 0x%08x\n", type);
SkASSERT(0);
@@ -972,27 +970,3 @@ void SkTranslateCommand::execute(SkCanvas* canvas) const {
canvas->translate(fDx, fDy);
}
-SkPushCullCommand::SkPushCullCommand(const SkRect& cullRect)
- : INHERITED(PUSH_CULL)
- , fCullRect(cullRect) {
- fInfo.push(SkObjectParser::RectToString(cullRect));
-}
-
-void SkPushCullCommand::execute(SkCanvas* canvas) const {
- canvas->pushCull(fCullRect);
-}
-
-void SkPushCullCommand::vizExecute(SkCanvas* canvas) const {
- canvas->pushCull(fCullRect);
-
- SkPaint p;
- p.setColor(SK_ColorCYAN);
- p.setStyle(SkPaint::kStroke_Style);
- canvas->drawRect(fCullRect, p);
-}
-
-SkPopCullCommand::SkPopCullCommand() : INHERITED(POP_CULL) { }
-
-void SkPopCullCommand::execute(SkCanvas* canvas) const {
- canvas->popCull();
-}
diff --git a/src/utils/debugger/SkDrawCommand.h b/src/utils/debugger/SkDrawCommand.h
index 6da419e23a..951d15e195 100644
--- a/src/utils/debugger/SkDrawCommand.h
+++ b/src/utils/debugger/SkDrawCommand.h
@@ -46,23 +46,16 @@ public:
subclasses to track unresolved save() calls. */
virtual void trackSaveState(int* state) {}
- // The next "active" system is only used by save, saveLayer, restore,
- // pushCull and popCull. It is used in two ways:
- // To determine which saveLayers are currently active (at a
+ // The next "active" system is only used by save, saveLayer, and restore.
+ // It is used to determine which saveLayers are currently active (at a
// given point in the rendering).
// saves just return a kPushLayer action but don't track active state
// restores just return a kPopLayer action
// saveLayers return kPushLayer but also track the active state
- // To determine which culls are currently active (at a given point)
- // in the rendering).
- // pushCulls return a kPushCull action
- // popCulls return a kPopCull action
enum Action {
kNone_Action,
kPopLayer_Action,
kPushLayer_Action,
- kPopCull_Action,
- kPushCull_Action
};
virtual Action action() const { return kNone_Action; }
virtual void setActive(bool active) {}
@@ -613,28 +606,4 @@ private:
typedef SkDrawCommand INHERITED;
};
-class SkPushCullCommand : public SkDrawCommand {
-public:
- SkPushCullCommand(const SkRect&);
- virtual void execute(SkCanvas*) const SK_OVERRIDE;
- virtual void vizExecute(SkCanvas* canvas) const SK_OVERRIDE;
- virtual Action action() const { return kPushCull_Action; }
- virtual void setActive(bool active) { fActive = active; }
- virtual bool active() const { return fActive; }
-private:
- SkRect fCullRect;
- bool fActive;
-
- typedef SkDrawCommand INHERITED;
-};
-
-class SkPopCullCommand : public SkDrawCommand {
-public:
- SkPopCullCommand();
- virtual void execute(SkCanvas* canvas) const SK_OVERRIDE;
- virtual Action action() const { return kPopCull_Action; }
-private:
- typedef SkDrawCommand INHERITED;
-};
-
#endif