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 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
384 default: | 384 default: |
385 params = logger.logItemWithParams("concat"); | 385 params = logger.logItemWithParams("concat"); |
386 params->setArray("matrix", arrayForSkMatrix(matrix)); | 386 params->setArray("matrix", arrayForSkMatrix(matrix)); |
387 } | 387 } |
388 this->SkCanvas::didConcat(matrix); | 388 this->SkCanvas::didConcat(matrix); |
389 } | 389 } |
390 | 390 |
391 void LoggingCanvas::willSave() | 391 void LoggingCanvas::willSave() |
392 { | 392 { |
393 AutoLogger logger(this); | 393 AutoLogger logger(this); |
394 RefPtr<JSONObject> params = logger.logItemWithParams("save"); | 394 RefPtr<JSONObject> params = logger.logItem("save"); |
395 this->SkCanvas::willSave(); | 395 this->SkCanvas::willSave(); |
396 } | 396 } |
397 | 397 |
398 SkCanvas::SaveLayerStrategy LoggingCanvas::willSaveLayer(const SkRect* bounds, c
onst SkPaint* paint, SaveFlags flags) | 398 SkCanvas::SaveLayerStrategy LoggingCanvas::willSaveLayer(const SkRect* bounds, c
onst SkPaint* paint, SaveFlags flags) |
399 { | 399 { |
400 AutoLogger logger(this); | 400 AutoLogger logger(this); |
401 RefPtr<JSONObject> params = logger.logItemWithParams("saveLayer"); | 401 RefPtr<JSONObject> params = logger.logItemWithParams("saveLayer"); |
402 if (bounds) | 402 if (bounds) |
403 params->setObject("bounds", objectForSkRect(*bounds)); | 403 params->setObject("bounds", objectForSkRect(*bounds)); |
404 params->setObject("paint", objectForSkPaint(*paint)); | 404 params->setObject("paint", objectForSkPaint(*paint)); |
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
867 paint.glyphsToUnichars(static_cast<const uint16_t*>(text), byteLength /
2, textData); | 867 paint.glyphsToUnichars(static_cast<const uint16_t*>(text), byteLength /
2, textData); |
868 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); |
869 } | 869 } |
870 default: | 870 default: |
871 ASSERT_NOT_REACHED(); | 871 ASSERT_NOT_REACHED(); |
872 return "?"; | 872 return "?"; |
873 } | 873 } |
874 } | 874 } |
875 | 875 |
876 } // namespace blink | 876 } // namespace blink |
OLD | NEW |