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 661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
672 | 672 |
673 void LoggingCanvas::onDrawVertices(VertexMode vmode, int vertexCount, const SkPo
int vertices[], const SkPoint texs[], const SkColor colors[], SkXfermode* xmode, | 673 void LoggingCanvas::onDrawVertices(VertexMode vmode, int vertexCount, const SkPo
int vertices[], const SkPoint texs[], const SkColor colors[], SkXfermode* xmode, |
674 const uint16_t indices[], int indexCount, const SkPaint& paint) | 674 const uint16_t indices[], int indexCount, const SkPaint& paint) |
675 { | 675 { |
676 AutoLogger logger(this); | 676 AutoLogger logger(this); |
677 RefPtr<JSONObject> params = logger.logItemWithParams("drawVertices"); | 677 RefPtr<JSONObject> params = logger.logItemWithParams("drawVertices"); |
678 params->setObject("paint", objectForSkPaint(paint)); | 678 params->setObject("paint", objectForSkPaint(paint)); |
679 this->SkCanvas::onDrawVertices(vmode, vertexCount, vertices, texs, colors, x
mode, indices, indexCount, paint); | 679 this->SkCanvas::onDrawVertices(vmode, vertexCount, vertices, texs, colors, x
mode, indices, indexCount, paint); |
680 } | 680 } |
681 | 681 |
682 void LoggingCanvas::beginCommentGroup(const char* description) | |
683 { | |
684 AutoLogger logger(this); | |
685 RefPtr<JSONObject> params = logger.logItemWithParams("beginCommentGroup"); | |
686 params->setString("description", description); | |
687 this->SkCanvas::beginCommentGroup(description); | |
688 } | |
689 | |
690 void LoggingCanvas::addComment(const char* keyword, const char* value) | |
691 { | |
692 AutoLogger logger(this); | |
693 RefPtr<JSONObject> params = logger.logItemWithParams("addComment"); | |
694 params->setString("key", keyword); | |
695 params->setString("value", value); | |
696 this->SkCanvas::addComment(keyword, value); | |
697 } | |
698 | |
699 void LoggingCanvas::endCommentGroup() | |
700 { | |
701 AutoLogger logger(this); | |
702 logger.logItem("endCommentGroup"); | |
703 this->SkCanvas::endCommentGroup(); | |
704 } | |
705 | |
706 void LoggingCanvas::onDrawDRRect(const SkRRect& outer, const SkRRect& inner, con
st SkPaint& paint) | 682 void LoggingCanvas::onDrawDRRect(const SkRRect& outer, const SkRRect& inner, con
st SkPaint& paint) |
707 { | 683 { |
708 AutoLogger logger(this); | 684 AutoLogger logger(this); |
709 RefPtr<JSONObject> params = logger.logItemWithParams("drawDRRect"); | 685 RefPtr<JSONObject> params = logger.logItemWithParams("drawDRRect"); |
710 params->setObject("outer", objectForSkRRect(outer)); | 686 params->setObject("outer", objectForSkRRect(outer)); |
711 params->setObject("inner", objectForSkRRect(inner)); | 687 params->setObject("inner", objectForSkRRect(inner)); |
712 params->setObject("paint", objectForSkPaint(paint)); | 688 params->setObject("paint", objectForSkPaint(paint)); |
713 this->SkCanvas::onDrawDRRect(outer, inner, paint); | 689 this->SkCanvas::onDrawDRRect(outer, inner, paint); |
714 } | 690 } |
715 | 691 |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
891 return pictureAsJSON->toPrettyJSONString(); | 867 return pictureAsJSON->toPrettyJSONString(); |
892 } | 868 } |
893 | 869 |
894 void showSkPicture(const SkPicture* picture) | 870 void showSkPicture(const SkPicture* picture) |
895 { | 871 { |
896 WTFLogAlways("%s\n", pictureAsDebugString(picture).utf8().data()); | 872 WTFLogAlways("%s\n", pictureAsDebugString(picture).utf8().data()); |
897 } | 873 } |
898 #endif | 874 #endif |
899 | 875 |
900 } // namespace blink | 876 } // namespace blink |
OLD | NEW |