OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "gpu/tools/compositor_model_bench/render_tree.h" | 5 #include "gpu/tools/compositor_model_bench/render_tree.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 return InterpretContentLayer(node); | 435 return InterpretContentLayer(node); |
436 if (type == "CanvasLayer") | 436 if (type == "CanvasLayer") |
437 return InterpretCanvasLayer(node); | 437 return InterpretCanvasLayer(node); |
438 if (type == "VideoLayer") | 438 if (type == "VideoLayer") |
439 return InterpretVideoLayer(node); | 439 return InterpretVideoLayer(node); |
440 if (type == "ImageLayer") | 440 if (type == "ImageLayer") |
441 return InterpretImageLayer(node); | 441 return InterpretImageLayer(node); |
442 | 442 |
443 | 443 |
444 string outjson; | 444 string outjson; |
445 JSONWriter::WriteWithOptions(node, base::JSONWriter::OPTIONS_PRETTY_PRINT, | 445 JSONWriter::WriteWithOptions(*node, base::JSONWriter::OPTIONS_PRETTY_PRINT, |
446 &outjson); | 446 &outjson); |
447 LOG(ERROR) << "Unrecognized node type! JSON:\n\n" | 447 LOG(ERROR) << "Unrecognized node type! JSON:\n\n" |
448 "-----------------------\n" << | 448 "-----------------------\n" << |
449 outjson << | 449 outjson << |
450 "-----------------------"; | 450 "-----------------------"; |
451 | 451 |
452 return NULL; | 452 return NULL; |
453 } | 453 } |
454 | 454 |
455 RenderNode* BuildRenderTreeFromFile(const base::FilePath& path) { | 455 RenderNode* BuildRenderTreeFromFile(const base::FilePath& path) { |
(...skipping 19 matching lines...) Expand all Loading... |
475 base::DictionaryValue* v = static_cast<base::DictionaryValue*>(root.get()); | 475 base::DictionaryValue* v = static_cast<base::DictionaryValue*>(root.get()); |
476 RenderNode* tree = InterpretContentLayer(v); | 476 RenderNode* tree = InterpretContentLayer(v); |
477 return tree; | 477 return tree; |
478 } else { | 478 } else { |
479 LOG(ERROR) << path.LossyDisplayName() << | 479 LOG(ERROR) << path.LossyDisplayName() << |
480 " doesn not encode a JSON dictionary."; | 480 " doesn not encode a JSON dictionary."; |
481 return NULL; | 481 return NULL; |
482 } | 482 } |
483 } | 483 } |
484 | 484 |
OLD | NEW |