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 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 } | 341 } |
342 | 342 |
343 void LoggingCanvas::onClipRegion(const SkRegion& region, SkRegion::Op op) | 343 void LoggingCanvas::onClipRegion(const SkRegion& region, SkRegion::Op op) |
344 { | 344 { |
345 AutoLogger logger(this); | 345 AutoLogger logger(this); |
346 RefPtr<JSONObject> params = logger.logItemWithParams("clipRegion"); | 346 RefPtr<JSONObject> params = logger.logItemWithParams("clipRegion"); |
347 params->setString("op", regionOpName(op)); | 347 params->setString("op", regionOpName(op)); |
348 this->SkCanvas::onClipRegion(region, op); | 348 this->SkCanvas::onClipRegion(region, op); |
349 } | 349 } |
350 | 350 |
351 void LoggingCanvas::onDrawPicture(const SkPicture* picture) | |
352 { | |
353 AutoLogger logger(this); | |
354 logger.logItemWithParams("drawPicture")->setObject("picture", objectForSkPic
ture(*picture)); | |
355 this->SkCanvas::onDrawPicture(picture); | |
356 } | |
357 | |
358 void LoggingCanvas::onDrawPicture(const SkPicture* picture, const SkMatrix* matr
ix, const SkPaint* paint) | 351 void LoggingCanvas::onDrawPicture(const SkPicture* picture, const SkMatrix* matr
ix, const SkPaint* paint) |
359 { | 352 { |
360 AutoLogger logger(this); | 353 AutoLogger logger(this); |
361 logger.logItemWithParams("drawPicture")->setObject("picture", objectForSkPic
ture(*picture)); | 354 logger.logItemWithParams("drawPicture")->setObject("picture", objectForSkPic
ture(*picture)); |
362 this->SkCanvas::onDrawPicture(picture, matrix, paint); | 355 this->SkCanvas::onDrawPicture(picture, matrix, paint); |
363 } | 356 } |
364 | 357 |
365 void LoggingCanvas::didSetMatrix(const SkMatrix& matrix) | 358 void LoggingCanvas::didSetMatrix(const SkMatrix& matrix) |
366 { | 359 { |
367 AutoLogger logger(this); | 360 AutoLogger logger(this); |
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
873 SkUnichar* textData = dataVector.data(); | 866 SkUnichar* textData = dataVector.data(); |
874 paint.glyphsToUnichars(static_cast<const uint16_t*>(text), byteLength /
2, textData); | 867 paint.glyphsToUnichars(static_cast<const uint16_t*>(text), byteLength /
2, textData); |
875 return WTF::UTF32LittleEndianEncoding().decode(reinterpret_cast<const ch
ar*>(textData), byteLength * 2); | 868 return WTF::UTF32LittleEndianEncoding().decode(reinterpret_cast<const ch
ar*>(textData), byteLength * 2); |
876 } | 869 } |
877 default: | 870 default: |
878 ASSERT_NOT_REACHED(); | 871 ASSERT_NOT_REACHED(); |
879 return "?"; | 872 return "?"; |
880 } | 873 } |
881 } | 874 } |
882 } | 875 } |
OLD | NEW |