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 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 std::unique_ptr<JSONObject> shaderItem = JSONObject::create(); | 318 std::unique_ptr<JSONObject> shaderItem = JSONObject::create(); |
319 const SkMatrix localMatrix = shader.getLocalMatrix(); | 319 const SkMatrix localMatrix = shader.getLocalMatrix(); |
320 if (!localMatrix.isIdentity()) | 320 if (!localMatrix.isIdentity()) |
321 shaderItem->setArray("localMatrix", arrayForSkMatrix(localMatrix)); | 321 shaderItem->setArray("localMatrix", arrayForSkMatrix(localMatrix)); |
322 return shaderItem; | 322 return shaderItem; |
323 } | 323 } |
324 | 324 |
325 String stringForSkColor(const SkColor& color) { | 325 String stringForSkColor(const SkColor& color) { |
326 // #AARRGGBB. | 326 // #AARRGGBB. |
327 Vector<LChar, 9> result; | 327 Vector<LChar, 9> result; |
328 result.append('#'); | 328 result.push_back('#'); |
329 appendUnsignedAsHex(color, result); | 329 appendUnsignedAsHex(color, result); |
330 return String(result.data(), result.size()); | 330 return String(result.data(), result.size()); |
331 } | 331 } |
332 | 332 |
333 void appendFlagToString(String* flagsString, bool isSet, const String& name) { | 333 void appendFlagToString(String* flagsString, bool isSet, const String& name) { |
334 if (!isSet) | 334 if (!isSet) |
335 return; | 335 return; |
336 if (flagsString->length()) | 336 if (flagsString->length()) |
337 flagsString->append("|"); | 337 flagsString->append("|"); |
338 flagsString->append(name); | 338 flagsString->append(name); |
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
924 pictureAsJSON->setArray("operations", canvas.log()); | 924 pictureAsJSON->setArray("operations", canvas.log()); |
925 return pictureAsJSON->toPrettyJSONString(); | 925 return pictureAsJSON->toPrettyJSONString(); |
926 } | 926 } |
927 | 927 |
928 void showSkPicture(const SkPicture* picture) { | 928 void showSkPicture(const SkPicture* picture) { |
929 WTFLogAlways("%s\n", pictureAsDebugString(picture).utf8().data()); | 929 WTFLogAlways("%s\n", pictureAsDebugString(picture).utf8().data()); |
930 } | 930 } |
931 #endif | 931 #endif |
932 | 932 |
933 } // namespace blink | 933 } // namespace blink |
OLD | NEW |