Index: src/utils/debugger/SkDrawCommand.cpp |
diff --git a/src/utils/debugger/SkDrawCommand.cpp b/src/utils/debugger/SkDrawCommand.cpp |
index 93c436df6494cf4a0127b0e0ed1a73a47838769e..142c4a44b1f818a00821e63535b210acc3b7ef65 100644 |
--- a/src/utils/debugger/SkDrawCommand.cpp |
+++ b/src/utils/debugger/SkDrawCommand.cpp |
@@ -18,11 +18,6 @@ |
: fDrawType(type) |
, fOffset(0) |
, fVisible(true) { |
-} |
- |
-SkDrawCommand::SkDrawCommand() { |
- fOffset = 0; |
- fVisible = true; |
} |
SkDrawCommand::~SkDrawCommand() { |
@@ -81,7 +76,7 @@ |
return NULL; |
} |
-SkString SkDrawCommand::toString() { |
+SkString SkDrawCommand::toString() const { |
return SkString(GetCommandString(fDrawType)); |
} |
@@ -90,7 +85,7 @@ |
fInfo.push(SkObjectParser::CustomTextToString("No Parameters")); |
} |
-void SkClearCommand::execute(SkCanvas* canvas) { |
+void SkClearCommand::execute(SkCanvas* canvas) const { |
canvas->clear(fColor); |
} |
@@ -207,7 +202,7 @@ |
fInfo.push(SkObjectParser::BoolToString(doAA)); |
} |
-void SkClipPathCommand::execute(SkCanvas* canvas) { |
+void SkClipPathCommand::execute(SkCanvas* canvas) const { |
canvas->clipPath(fPath, fOp, fDoAA); |
} |
@@ -225,7 +220,7 @@ |
fInfo.push(SkObjectParser::RegionOpToString(op)); |
} |
-void SkClipRegionCommand::execute(SkCanvas* canvas) { |
+void SkClipRegionCommand::execute(SkCanvas* canvas) const { |
canvas->clipRegion(fRegion, fOp); |
} |
@@ -240,7 +235,7 @@ |
fInfo.push(SkObjectParser::BoolToString(doAA)); |
} |
-void SkClipRectCommand::execute(SkCanvas* canvas) { |
+void SkClipRectCommand::execute(SkCanvas* canvas) const { |
canvas->clipRect(fRect, fOp, fDoAA); |
} |
@@ -255,7 +250,7 @@ |
fInfo.push(SkObjectParser::BoolToString(doAA)); |
} |
-void SkClipRRectCommand::execute(SkCanvas* canvas) { |
+void SkClipRRectCommand::execute(SkCanvas* canvas) const { |
canvas->clipRRect(fRRect, fOp, fDoAA); |
} |
@@ -271,7 +266,7 @@ |
fInfo.push(SkObjectParser::MatrixToString(matrix)); |
} |
-void SkConcatCommand::execute(SkCanvas* canvas) { |
+void SkConcatCommand::execute(SkCanvas* canvas) const { |
canvas->concat(fMatrix); |
} |
@@ -296,7 +291,7 @@ |
} |
} |
-void SkDrawBitmapCommand::execute(SkCanvas* canvas) { |
+void SkDrawBitmapCommand::execute(SkCanvas* canvas) const { |
canvas->drawBitmap(fBitmap, fLeft, fTop, fPaintPtr); |
} |
@@ -325,7 +320,7 @@ |
} |
} |
-void SkDrawBitmapMatrixCommand::execute(SkCanvas* canvas) { |
+void SkDrawBitmapMatrixCommand::execute(SkCanvas* canvas) const { |
canvas->drawBitmapMatrix(fBitmap, fMatrix, fPaintPtr); |
} |
@@ -355,7 +350,7 @@ |
} |
} |
-void SkDrawBitmapNineCommand::execute(SkCanvas* canvas) { |
+void SkDrawBitmapNineCommand::execute(SkCanvas* canvas) const { |
canvas->drawBitmapNine(fBitmap, fCenter, fDst, fPaintPtr); |
} |
@@ -395,7 +390,7 @@ |
fInfo.push(SkObjectParser::IntToString(fFlags, "Flags: ")); |
} |
-void SkDrawBitmapRectCommand::execute(SkCanvas* canvas) { |
+void SkDrawBitmapRectCommand::execute(SkCanvas* canvas) const { |
canvas->drawBitmapRectToRect(fBitmap, this->srcRect(), fDst, fPaintPtr, fFlags); |
} |
@@ -416,7 +411,7 @@ |
fInfo.push(str); |
} |
-void SkDrawDataCommand::execute(SkCanvas* canvas) { |
+void SkDrawDataCommand::execute(SkCanvas* canvas) const { |
canvas->drawData(fData, fLength); |
} |
@@ -450,7 +445,7 @@ |
fInfo.push(SkObjectParser::PaintToString(paint)); |
} |
-void SkDrawOvalCommand::execute(SkCanvas* canvas) { |
+void SkDrawOvalCommand::execute(SkCanvas* canvas) const { |
canvas->drawOval(fOval, fPaint); |
} |
@@ -477,7 +472,7 @@ |
fInfo.push(SkObjectParser::PaintToString(paint)); |
} |
-void SkDrawPaintCommand::execute(SkCanvas* canvas) { |
+void SkDrawPaintCommand::execute(SkCanvas* canvas) const { |
canvas->drawPaint(fPaint); |
} |
@@ -496,7 +491,7 @@ |
fInfo.push(SkObjectParser::PaintToString(paint)); |
} |
-void SkDrawPathCommand::execute(SkCanvas* canvas) { |
+void SkDrawPathCommand::execute(SkCanvas* canvas) const { |
canvas->drawPath(fPath, fPaint); |
} |
@@ -535,7 +530,7 @@ |
} |
} |
-void SkDrawPictureCommand::execute(SkCanvas* canvas) { |
+void SkDrawPictureCommand::execute(SkCanvas* canvas) const { |
canvas->drawPicture(fPicture, fMatrixPtr, fPaintPtr); |
} |
@@ -568,7 +563,7 @@ |
fInfo.push(SkObjectParser::PaintToString(paint)); |
} |
-void SkDrawPointsCommand::execute(SkCanvas* canvas) { |
+void SkDrawPointsCommand::execute(SkCanvas* canvas) const { |
canvas->drawPoints(fMode, fCount, fPts, fPaint); |
} |
@@ -615,7 +610,7 @@ |
fInfo.push(SkObjectParser::PaintToString(paint)); |
} |
-void SkDrawPosTextCommand::execute(SkCanvas* canvas) { |
+void SkDrawPosTextCommand::execute(SkCanvas* canvas) const { |
canvas->drawPosText(fText, fByteLength, fPos, fPaint); |
} |
@@ -642,7 +637,7 @@ |
fInfo.push(SkObjectParser::PaintToString(paint)); |
} |
-void SkDrawPosTextHCommand::execute(SkCanvas* canvas) { |
+void SkDrawPosTextHCommand::execute(SkCanvas* canvas) const { |
canvas->drawPosTextH(fText, fByteLength, fXpos, fConstY, fPaint); |
} |
@@ -662,7 +657,7 @@ |
fInfo.push(SkObjectParser::PaintToString(paint)); |
} |
-void SkDrawTextBlobCommand::execute(SkCanvas* canvas) { |
+void SkDrawTextBlobCommand::execute(SkCanvas* canvas) const { |
canvas->drawTextBlob(fBlob, fXPos, fYPos, fPaint); |
} |
@@ -689,7 +684,7 @@ |
fInfo.push(SkObjectParser::PaintToString(paint)); |
} |
-void SkDrawRectCommand::execute(SkCanvas* canvas) { |
+void SkDrawRectCommand::execute(SkCanvas* canvas) const { |
canvas->drawRect(fRect, fPaint); |
} |
@@ -702,7 +697,7 @@ |
fInfo.push(SkObjectParser::PaintToString(paint)); |
} |
-void SkDrawRRectCommand::execute(SkCanvas* canvas) { |
+void SkDrawRRectCommand::execute(SkCanvas* canvas) const { |
canvas->drawRRect(fRRect, fPaint); |
} |
@@ -724,7 +719,7 @@ |
fInfo.push(SkObjectParser::PaintToString(paint)); |
} |
-void SkDrawDRRectCommand::execute(SkCanvas* canvas) { |
+void SkDrawDRRectCommand::execute(SkCanvas* canvas) const { |
canvas->drawDRRect(fOuter, fInner, fPaint); |
} |
@@ -754,7 +749,7 @@ |
} |
} |
-void SkDrawSpriteCommand::execute(SkCanvas* canvas) { |
+void SkDrawSpriteCommand::execute(SkCanvas* canvas) const { |
canvas->drawSprite(fBitmap, fLeft, fTop, fPaintPtr); |
} |
@@ -779,7 +774,7 @@ |
fInfo.push(SkObjectParser::PaintToString(paint)); |
} |
-void SkDrawTextCommand::execute(SkCanvas* canvas) { |
+void SkDrawTextCommand::execute(SkCanvas* canvas) const { |
canvas->drawText(fText, fByteLength, fX, fY, fPaint); |
} |
@@ -806,7 +801,7 @@ |
fInfo.push(SkObjectParser::PaintToString(paint)); |
} |
-void SkDrawTextOnPathCommand::execute(SkCanvas* canvas) { |
+void SkDrawTextOnPathCommand::execute(SkCanvas* canvas) const { |
canvas->drawTextOnPath(fText, fByteLength, fPath, |
fMatrix.isIdentity() ? NULL : &fMatrix, |
fPaint); |
@@ -867,7 +862,7 @@ |
delete [] fIndices; |
} |
-void SkDrawVerticesCommand::execute(SkCanvas* canvas) { |
+void SkDrawVerticesCommand::execute(SkCanvas* canvas) const { |
canvas->drawVertices(fVmode, fVertexCount, fVertices, |
fTexs, fColors, fXfermode, fIndices, |
fIndexCount, fPaint); |
@@ -878,7 +873,7 @@ |
fInfo.push(SkObjectParser::CustomTextToString("No Parameters")); |
} |
-void SkRestoreCommand::execute(SkCanvas* canvas) { |
+void SkRestoreCommand::execute(SkCanvas* canvas) const { |
canvas->restore(); |
} |
@@ -893,7 +888,7 @@ |
fInfo.push(SkObjectParser::ScalarToString(degrees, "SkScalar degrees: ")); |
} |
-void SkRotateCommand::execute(SkCanvas* canvas) { |
+void SkRotateCommand::execute(SkCanvas* canvas) const { |
canvas->rotate(fDegrees); |
} |
@@ -901,7 +896,7 @@ |
: INHERITED(SAVE) { |
} |
-void SkSaveCommand::execute(SkCanvas* canvas) { |
+void SkSaveCommand::execute(SkCanvas* canvas) const { |
canvas->save(); |
} |
@@ -935,13 +930,13 @@ |
fInfo.push(SkObjectParser::SaveFlagsToString(flags)); |
} |
-void SkSaveLayerCommand::execute(SkCanvas* canvas) { |
+void SkSaveLayerCommand::execute(SkCanvas* canvas) const { |
canvas->saveLayer(fBounds.isEmpty() ? NULL : &fBounds, |
fPaintPtr, |
fFlags); |
} |
-void SkSaveLayerCommand::vizExecute(SkCanvas* canvas) { |
+void SkSaveLayerCommand::vizExecute(SkCanvas* canvas) const { |
canvas->save(); |
} |
@@ -958,7 +953,7 @@ |
fInfo.push(SkObjectParser::ScalarToString(sy, "SkScalar sy: ")); |
} |
-void SkScaleCommand::execute(SkCanvas* canvas) { |
+void SkScaleCommand::execute(SkCanvas* canvas) const { |
canvas->scale(fSx, fSy); |
} |
@@ -974,7 +969,7 @@ |
fUserMatrix = userMatrix; |
} |
-void SkSetMatrixCommand::execute(SkCanvas* canvas) { |
+void SkSetMatrixCommand::execute(SkCanvas* canvas) const { |
SkMatrix temp = SkMatrix::Concat(fUserMatrix, fMatrix); |
canvas->setMatrix(temp); |
} |
@@ -988,7 +983,7 @@ |
fInfo.push(SkObjectParser::ScalarToString(sy, "SkScalar sy: ")); |
} |
-void SkSkewCommand::execute(SkCanvas* canvas) { |
+void SkSkewCommand::execute(SkCanvas* canvas) const { |
canvas->skew(fSx, fSy); |
} |
@@ -1001,7 +996,7 @@ |
fInfo.push(SkObjectParser::ScalarToString(dy, "SkScalar dy: ")); |
} |
-void SkTranslateCommand::execute(SkCanvas* canvas) { |
+void SkTranslateCommand::execute(SkCanvas* canvas) const { |
canvas->translate(fDx, fDy); |
} |
@@ -1011,11 +1006,11 @@ |
fInfo.push(SkObjectParser::RectToString(cullRect)); |
} |
-void SkPushCullCommand::execute(SkCanvas* canvas) { |
+void SkPushCullCommand::execute(SkCanvas* canvas) const { |
canvas->pushCull(fCullRect); |
} |
-void SkPushCullCommand::vizExecute(SkCanvas* canvas) { |
+void SkPushCullCommand::vizExecute(SkCanvas* canvas) const { |
canvas->pushCull(fCullRect); |
SkPaint p; |
@@ -1026,6 +1021,6 @@ |
SkPopCullCommand::SkPopCullCommand() : INHERITED(POP_CULL) { } |
-void SkPopCullCommand::execute(SkCanvas* canvas) { |
+void SkPopCullCommand::execute(SkCanvas* canvas) const { |
canvas->popCull(); |
} |