Chromium Code Reviews| 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 900 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 911 const SkIRect enclosing_bounds = bounds.roundOut(); | 911 const SkIRect enclosing_bounds = bounds.roundOut(); |
| 912 LoggingCanvas canvas(enclosing_bounds.width(), enclosing_bounds.height()); | 912 LoggingCanvas canvas(enclosing_bounds.width(), enclosing_bounds.height()); |
| 913 record->playback(&canvas); | 913 record->playback(&canvas); |
| 914 std::unique_ptr<JSONObject> record_as_json = JSONObject::Create(); | 914 std::unique_ptr<JSONObject> record_as_json = JSONObject::Create(); |
| 915 record_as_json->SetObject("cullRect", ObjectForSkRect(bounds)); | 915 record_as_json->SetObject("cullRect", ObjectForSkRect(bounds)); |
| 916 record_as_json->SetArray("operations", canvas.Log()); | 916 record_as_json->SetArray("operations", canvas.Log()); |
| 917 return record_as_json->ToPrettyJSONString(); | 917 return record_as_json->ToPrettyJSONString(); |
| 918 } | 918 } |
| 919 | 919 |
| 920 void ShowPaintRecord(const PaintRecord* record, const SkRect& bounds) { | 920 void ShowPaintRecord(const PaintRecord* record, const SkRect& bounds) { |
| 921 WTFLogAlways("%s\n", RecordAsDebugString(record, bounds).Utf8().data()); | 921 LOG(INFO) << "\n" |
|
tkent
2017/06/14 23:27:11
Use DLOG(). LOG() usage should be avoided.
| |
| 922 << RecordAsDebugString(record, bounds).Utf8().data() << "\n"; | |
|
tkent
2017/06/14 23:27:11
The trailing \n is unnecessary.
| |
| 922 } | 923 } |
| 923 #endif | 924 #endif |
| 924 | 925 |
| 925 } // namespace blink | 926 } // namespace blink |
| OLD | NEW |