| 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 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 492 scalarsArray->pushDouble(scalars[i]); | 492 scalarsArray->pushDouble(scalars[i]); |
| 493 return scalarsArray; | 493 return scalarsArray; |
| 494 } | 494 } |
| 495 | 495 |
| 496 String clipOpName(SkClipOp op) { | 496 String clipOpName(SkClipOp op) { |
| 497 switch (op) { | 497 switch (op) { |
| 498 case SkClipOp::kDifference: | 498 case SkClipOp::kDifference: |
| 499 return "kDifference_Op"; | 499 return "kDifference_Op"; |
| 500 case SkClipOp::kIntersect: | 500 case SkClipOp::kIntersect: |
| 501 return "kIntersect_Op"; | 501 return "kIntersect_Op"; |
| 502 case SkClipOp::kUnion: | |
| 503 return "kUnion_Op"; | |
| 504 case SkClipOp::kXOR: | |
| 505 return "kXOR_Op"; | |
| 506 case SkClipOp::kReverseDifference: | |
| 507 return "kReverseDifference_Op"; | |
| 508 case SkClipOp::kReplace: | |
| 509 return "kReplace_Op"; | |
| 510 default: | 502 default: |
| 511 return "Unknown type"; | 503 return "Unknown type"; |
| 512 }; | 504 }; |
| 513 } | 505 } |
| 514 | 506 |
| 515 String saveLayerFlagsToString(SkCanvas::SaveLayerFlags flags) { | 507 String saveLayerFlagsToString(SkCanvas::SaveLayerFlags flags) { |
| 516 String flagsString = ""; | 508 String flagsString = ""; |
| 517 if (flags & SkCanvas::kIsOpaque_SaveLayerFlag) | 509 if (flags & SkCanvas::kIsOpaque_SaveLayerFlag) |
| 518 flagsString.append("kIsOpaque_SaveLayerFlag "); | 510 flagsString.append("kIsOpaque_SaveLayerFlag "); |
| 519 if (flags & SkCanvas::kPreserveLCDText_SaveLayerFlag) | 511 if (flags & SkCanvas::kPreserveLCDText_SaveLayerFlag) |
| (...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 932 pictureAsJSON->setArray("operations", canvas.log()); | 924 pictureAsJSON->setArray("operations", canvas.log()); |
| 933 return pictureAsJSON->toPrettyJSONString(); | 925 return pictureAsJSON->toPrettyJSONString(); |
| 934 } | 926 } |
| 935 | 927 |
| 936 void showSkPicture(const SkPicture* picture) { | 928 void showSkPicture(const SkPicture* picture) { |
| 937 WTFLogAlways("%s\n", pictureAsDebugString(picture).utf8().data()); | 929 WTFLogAlways("%s\n", pictureAsDebugString(picture).utf8().data()); |
| 938 } | 930 } |
| 939 #endif | 931 #endif |
| 940 | 932 |
| 941 } // namespace blink | 933 } // namespace blink |
| OLD | NEW |