| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 Apple 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 779 bool debug = flags & LayerTreeIncludesDebugInfo; | 779 bool debug = flags & LayerTreeIncludesDebugInfo; |
| 780 RefPtr<JSONArray> compositingReasonsJSON = JSONArray::create(); | 780 RefPtr<JSONArray> compositingReasonsJSON = JSONArray::create(); |
| 781 for (size_t i = 0; i < kNumberOfCompositingReasons; ++i) { | 781 for (size_t i = 0; i < kNumberOfCompositingReasons; ++i) { |
| 782 if (m_debugInfo.getCompositingReasons() & kCompositingReasonStringMa
p[i].reason) | 782 if (m_debugInfo.getCompositingReasons() & kCompositingReasonStringMa
p[i].reason) |
| 783 compositingReasonsJSON->pushString(debug ? kCompositingReasonStr
ingMap[i].description : kCompositingReasonStringMap[i].shortName); | 783 compositingReasonsJSON->pushString(debug ? kCompositingReasonStr
ingMap[i].description : kCompositingReasonStringMap[i].shortName); |
| 784 } | 784 } |
| 785 json->setArray("compositingReasons", compositingReasonsJSON); | 785 json->setArray("compositingReasons", compositingReasonsJSON); |
| 786 | 786 |
| 787 RefPtr<JSONArray> squashingDisallowedReasonsJSON = JSONArray::create(); | 787 RefPtr<JSONArray> squashingDisallowedReasonsJSON = JSONArray::create(); |
| 788 for (size_t i = 0; i < kNumberOfSquashingDisallowedReasons; ++i) { | 788 for (size_t i = 0; i < kNumberOfSquashingDisallowedReasons; ++i) { |
| 789 if (m_debugInfo.squashingDisallowedReasons() & kSquashingDisallowedR
easonStringMap[i].reason) | 789 if (m_debugInfo.getSquashingDisallowedReasons() & kSquashingDisallow
edReasonStringMap[i].reason) |
| 790 squashingDisallowedReasonsJSON->pushString(debug ? kSquashingDis
allowedReasonStringMap[i].description : kSquashingDisallowedReasonStringMap[i].s
hortName); | 790 squashingDisallowedReasonsJSON->pushString(debug ? kSquashingDis
allowedReasonStringMap[i].description : kSquashingDisallowedReasonStringMap[i].s
hortName); |
| 791 } | 791 } |
| 792 json->setArray("squashingDisallowedReasons", squashingDisallowedReasonsJ
SON); | 792 json->setArray("squashingDisallowedReasons", squashingDisallowedReasonsJ
SON); |
| 793 } | 793 } |
| 794 | 794 |
| 795 if (m_children.size()) { | 795 if (m_children.size()) { |
| 796 RefPtr<JSONArray> childrenJSON = JSONArray::create(); | 796 RefPtr<JSONArray> childrenJSON = JSONArray::create(); |
| 797 for (size_t i = 0; i < m_children.size(); i++) | 797 for (size_t i = 0; i < m_children.size(); i++) |
| 798 childrenJSON->pushObject(m_children[i]->layerTreeAsJSON(flags, rende
ringContextMap)); | 798 childrenJSON->pushObject(m_children[i]->layerTreeAsJSON(flags, rende
ringContextMap)); |
| 799 json->setArray("children", childrenJSON); | 799 json->setArray("children", childrenJSON); |
| (...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1271 { | 1271 { |
| 1272 if (!layer) { | 1272 if (!layer) { |
| 1273 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n"); | 1273 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n"); |
| 1274 return; | 1274 return; |
| 1275 } | 1275 } |
| 1276 | 1276 |
| 1277 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); | 1277 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); |
| 1278 fprintf(stderr, "%s\n", output.utf8().data()); | 1278 fprintf(stderr, "%s\n", output.utf8().data()); |
| 1279 } | 1279 } |
| 1280 #endif | 1280 #endif |
| OLD | NEW |