| 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 #define _USE_MATH_DEFINES // For VC++ to get M_PI. This has to be first. | 5 #define _USE_MATH_DEFINES // For VC++ to get M_PI. This has to be first. |
| 6 | 6 |
| 7 #include "ui/compositor/debug_utils.h" | 7 #include "ui/compositor/debug_utils.h" |
| 8 | 8 |
| 9 #include <stddef.h> | 9 #include <stddef.h> |
| 10 | 10 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 *out << " textured"; | 50 *out << " textured"; |
| 51 if (layer->fills_bounds_opaquely()) | 51 if (layer->fills_bounds_opaquely()) |
| 52 *out << " opaque"; | 52 *out << " opaque"; |
| 53 break; | 53 break; |
| 54 case ui::LAYER_SOLID_COLOR: | 54 case ui::LAYER_SOLID_COLOR: |
| 55 *out << " solid"; | 55 *out << " solid"; |
| 56 break; | 56 break; |
| 57 case ui::LAYER_NINE_PATCH: | 57 case ui::LAYER_NINE_PATCH: |
| 58 *out << " nine_patch"; | 58 *out << " nine_patch"; |
| 59 break; | 59 break; |
| 60 case ui::LAYER_SURFACE: |
| 61 *out << " surface"; |
| 60 } | 62 } |
| 61 | 63 |
| 62 if (!layer->visible()) | 64 if (!layer->visible()) |
| 63 *out << " !visible"; | 65 *out << " !visible"; |
| 64 | 66 |
| 65 std::string property_indent_str(indent+3, ' '); | 67 std::string property_indent_str(indent+3, ' '); |
| 66 *out << '\n' << property_indent_str; | 68 *out << '\n' << property_indent_str; |
| 67 *out << "bounds: " << layer->bounds().x() << ',' << layer->bounds().y(); | 69 *out << "bounds: " << layer->bounds().x() << ',' << layer->bounds().y(); |
| 68 *out << ' ' << layer->bounds().width() << 'x' << layer->bounds().height(); | 70 *out << ' ' << layer->bounds().width() << 'x' << layer->bounds().height(); |
| 69 if (!layer->subpixel_position_offset().IsZero()) | 71 if (!layer->subpixel_position_offset().IsZero()) |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 | 113 |
| 112 void PrintLayerHierarchy(const Layer* layer, const gfx::Point& mouse_location) { | 114 void PrintLayerHierarchy(const Layer* layer, const gfx::Point& mouse_location) { |
| 113 std::ostringstream out; | 115 std::ostringstream out; |
| 114 out << "Layer hierarchy:\n"; | 116 out << "Layer hierarchy:\n"; |
| 115 PrintLayerHierarchyImp(layer, 0, mouse_location, &out); | 117 PrintLayerHierarchyImp(layer, 0, mouse_location, &out); |
| 116 // Error so logs can be collected from end-users. | 118 // Error so logs can be collected from end-users. |
| 117 LOG(ERROR) << out.str(); | 119 LOG(ERROR) << out.str(); |
| 118 } | 120 } |
| 119 | 121 |
| 120 } // namespace ui | 122 } // namespace ui |
| OLD | NEW |