| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 #include "SkDumpCanvas.h" | 9 #include "SkDumpCanvas.h" |
| 10 | 10 |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 } | 215 } |
| 216 this->dump(kSave_Verb, paint, str.c_str()); | 216 this->dump(kSave_Verb, paint, str.c_str()); |
| 217 return this->INHERITED::willSaveLayer(bounds, paint, flags); | 217 return this->INHERITED::willSaveLayer(bounds, paint, flags); |
| 218 } | 218 } |
| 219 | 219 |
| 220 void SkDumpCanvas::willRestore() { | 220 void SkDumpCanvas::willRestore() { |
| 221 this->dump(kRestore_Verb, NULL, "restore"); | 221 this->dump(kRestore_Verb, NULL, "restore"); |
| 222 this->INHERITED::willRestore(); | 222 this->INHERITED::willRestore(); |
| 223 } | 223 } |
| 224 | 224 |
| 225 bool SkDumpCanvas::translate(SkScalar dx, SkScalar dy) { | 225 void SkDumpCanvas::didTranslate(SkScalar dx, SkScalar dy) { |
| 226 this->dump(kMatrix_Verb, NULL, "translate(%g %g)", | 226 this->dump(kMatrix_Verb, NULL, "translate(%g %g)", |
| 227 SkScalarToFloat(dx), SkScalarToFloat(dy)); | 227 SkScalarToFloat(dx), SkScalarToFloat(dy)); |
| 228 return this->INHERITED::translate(dx, dy); | 228 this->INHERITED::didTranslate(dx, dy); |
| 229 } | 229 } |
| 230 | 230 |
| 231 bool SkDumpCanvas::scale(SkScalar sx, SkScalar sy) { | 231 void SkDumpCanvas::didScale(SkScalar sx, SkScalar sy) { |
| 232 this->dump(kMatrix_Verb, NULL, "scale(%g %g)", | 232 this->dump(kMatrix_Verb, NULL, "scale(%g %g)", |
| 233 SkScalarToFloat(sx), SkScalarToFloat(sy)); | 233 SkScalarToFloat(sx), SkScalarToFloat(sy)); |
| 234 return this->INHERITED::scale(sx, sy); | 234 this->INHERITED::didScale(sx, sy); |
| 235 } | 235 } |
| 236 | 236 |
| 237 bool SkDumpCanvas::rotate(SkScalar degrees) { | 237 void SkDumpCanvas::didRotate(SkScalar degrees) { |
| 238 this->dump(kMatrix_Verb, NULL, "rotate(%g)", SkScalarToFloat(degrees)); | 238 this->dump(kMatrix_Verb, NULL, "rotate(%g)", SkScalarToFloat(degrees)); |
| 239 return this->INHERITED::rotate(degrees); | 239 this->INHERITED::didRotate(degrees); |
| 240 } | 240 } |
| 241 | 241 |
| 242 bool SkDumpCanvas::skew(SkScalar sx, SkScalar sy) { | 242 void SkDumpCanvas::didSkew(SkScalar sx, SkScalar sy) { |
| 243 this->dump(kMatrix_Verb, NULL, "skew(%g %g)", | 243 this->dump(kMatrix_Verb, NULL, "skew(%g %g)", |
| 244 SkScalarToFloat(sx), SkScalarToFloat(sy)); | 244 SkScalarToFloat(sx), SkScalarToFloat(sy)); |
| 245 return this->INHERITED::skew(sx, sy); | 245 this->INHERITED::didSkew(sx, sy); |
| 246 } | 246 } |
| 247 | 247 |
| 248 bool SkDumpCanvas::concat(const SkMatrix& matrix) { | 248 void SkDumpCanvas::didConcat(const SkMatrix& matrix) { |
| 249 SkString str; | 249 SkString str; |
| 250 matrix.toString(&str); | 250 matrix.toString(&str); |
| 251 this->dump(kMatrix_Verb, NULL, "concat(%s)", str.c_str()); | 251 this->dump(kMatrix_Verb, NULL, "concat(%s)", str.c_str()); |
| 252 return this->INHERITED::concat(matrix); | 252 this->INHERITED::didConcat(matrix); |
| 253 } | 253 } |
| 254 | 254 |
| 255 void SkDumpCanvas::setMatrix(const SkMatrix& matrix) { | 255 void SkDumpCanvas::didSetMatrix(const SkMatrix& matrix) { |
| 256 SkString str; | 256 SkString str; |
| 257 matrix.toString(&str); | 257 matrix.toString(&str); |
| 258 this->dump(kMatrix_Verb, NULL, "setMatrix(%s)", str.c_str()); | 258 this->dump(kMatrix_Verb, NULL, "setMatrix(%s)", str.c_str()); |
| 259 this->INHERITED::setMatrix(matrix); | 259 this->INHERITED::didSetMatrix(matrix); |
| 260 } | 260 } |
| 261 | 261 |
| 262 /////////////////////////////////////////////////////////////////////////////// | 262 /////////////////////////////////////////////////////////////////////////////// |
| 263 | 263 |
| 264 const char* SkDumpCanvas::EdgeStyleToAAString(ClipEdgeStyle edgeStyle) { | 264 const char* SkDumpCanvas::EdgeStyleToAAString(ClipEdgeStyle edgeStyle) { |
| 265 return kSoft_ClipEdgeStyle == edgeStyle ? "AA" : "BW"; | 265 return kSoft_ClipEdgeStyle == edgeStyle ? "AA" : "BW"; |
| 266 } | 266 } |
| 267 | 267 |
| 268 void SkDumpCanvas::onClipRect(const SkRect& rect, SkRegion::Op op, ClipEdgeStyle
edgeStyle) { | 268 void SkDumpCanvas::onClipRect(const SkRect& rect, SkRegion::Op op, ClipEdgeStyle
edgeStyle) { |
| 269 SkString str; | 269 SkString str; |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 528 | 528 |
| 529 /////////////////////////////////////////////////////////////////////////////// | 529 /////////////////////////////////////////////////////////////////////////////// |
| 530 | 530 |
| 531 static void dumpToDebugf(const char text[], void*) { | 531 static void dumpToDebugf(const char text[], void*) { |
| 532 SkDebugf("%s\n", text); | 532 SkDebugf("%s\n", text); |
| 533 } | 533 } |
| 534 | 534 |
| 535 SkDebugfDumper::SkDebugfDumper() : INHERITED(dumpToDebugf, NULL) {} | 535 SkDebugfDumper::SkDebugfDumper() : INHERITED(dumpToDebugf, NULL) {} |
| 536 | 536 |
| 537 #endif | 537 #endif |
| OLD | NEW |