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