OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 this->SkCanvas::onClipRegion(region, op); | 348 this->SkCanvas::onClipRegion(region, op); |
349 } | 349 } |
350 | 350 |
351 void LoggingCanvas::onDrawPicture(const SkPicture* picture) | 351 void LoggingCanvas::onDrawPicture(const SkPicture* picture) |
352 { | 352 { |
353 AutoLogger logger(this); | 353 AutoLogger logger(this); |
354 logger.logItemWithParams("drawPicture")->setObject("picture", objectForSkPic
ture(*picture)); | 354 logger.logItemWithParams("drawPicture")->setObject("picture", objectForSkPic
ture(*picture)); |
355 this->SkCanvas::onDrawPicture(picture); | 355 this->SkCanvas::onDrawPicture(picture); |
356 } | 356 } |
357 | 357 |
| 358 void LoggingCanvas::onDrawPicture(const SkPicture* picture, const SkMatrix* matr
ix, const SkPaint* paint) |
| 359 { |
| 360 AutoLogger logger(this); |
| 361 logger.logItemWithParams("drawPicture")->setObject("picture", objectForSkPic
ture(*picture)); |
| 362 this->SkCanvas::onDrawPicture(picture, matrix, paint); |
| 363 } |
| 364 |
358 void LoggingCanvas::didSetMatrix(const SkMatrix& matrix) | 365 void LoggingCanvas::didSetMatrix(const SkMatrix& matrix) |
359 { | 366 { |
360 AutoLogger logger(this); | 367 AutoLogger logger(this); |
361 RefPtr<JSONObject> params = logger.logItemWithParams("setMatrix"); | 368 RefPtr<JSONObject> params = logger.logItemWithParams("setMatrix"); |
362 params->setArray("matrix", arrayForSkMatrix(matrix)); | 369 params->setArray("matrix", arrayForSkMatrix(matrix)); |
363 this->SkCanvas::didSetMatrix(matrix); | 370 this->SkCanvas::didSetMatrix(matrix); |
364 } | 371 } |
365 | 372 |
366 void LoggingCanvas::didConcat(const SkMatrix& matrix) | 373 void LoggingCanvas::didConcat(const SkMatrix& matrix) |
367 { | 374 { |
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
879 SkUnichar* textData = dataVector.data(); | 886 SkUnichar* textData = dataVector.data(); |
880 paint.glyphsToUnichars(static_cast<const uint16_t*>(text), byteLength /
2, textData); | 887 paint.glyphsToUnichars(static_cast<const uint16_t*>(text), byteLength /
2, textData); |
881 return WTF::UTF32LittleEndianEncoding().decode(reinterpret_cast<const ch
ar*>(textData), byteLength * 2); | 888 return WTF::UTF32LittleEndianEncoding().decode(reinterpret_cast<const ch
ar*>(textData), byteLength * 2); |
882 } | 889 } |
883 default: | 890 default: |
884 ASSERT_NOT_REACHED(); | 891 ASSERT_NOT_REACHED(); |
885 return "?"; | 892 return "?"; |
886 } | 893 } |
887 } | 894 } |
888 } | 895 } |
OLD | NEW |