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 #ifndef NDEBUG | 5 #ifndef NDEBUG |
6 | 6 |
7 #include "ui/gfx/compositor/debug_utils.h" | 7 #include "ui/gfx/compositor/debug_utils.h" |
8 | 8 |
9 #include <iomanip> | 9 #include <iomanip> |
10 #include <iostream> | 10 #include <iostream> |
(...skipping 28 matching lines...) Expand all Loading... |
39 buf << L'*'; | 39 buf << L'*'; |
40 else | 40 else |
41 buf << L'+'; | 41 buf << L'+'; |
42 | 42 |
43 buf << UTF8ToWide(layer->name()) << L' ' << layer; | 43 buf << UTF8ToWide(layer->name()) << L' ' << layer; |
44 | 44 |
45 buf << L'\n' << UTF8ToWide(content_indent_str); | 45 buf << L'\n' << UTF8ToWide(content_indent_str); |
46 buf << L"bounds: " << layer->bounds().x() << L',' << layer->bounds().y(); | 46 buf << L"bounds: " << layer->bounds().x() << L',' << layer->bounds().y(); |
47 buf << L' ' << layer->bounds().width() << L'x' << layer->bounds().height(); | 47 buf << L' ' << layer->bounds().width() << L'x' << layer->bounds().height(); |
48 | 48 |
49 if (!layer->hole_rect().IsEmpty()) { | |
50 buf << L'\n' << UTF8ToWide(content_indent_str); | |
51 gfx::Rect hole_rect = layer->hole_rect(); | |
52 buf << L"hole: " << hole_rect.x() << L',' << hole_rect.y(); | |
53 buf << L' ' << hole_rect.width() << L'x' << hole_rect.height(); | |
54 } | |
55 | |
56 if (layer->opacity() != 1.0f) { | 49 if (layer->opacity() != 1.0f) { |
57 buf << L'\n' << UTF8ToWide(content_indent_str); | 50 buf << L'\n' << UTF8ToWide(content_indent_str); |
58 buf << L"opacity: " << std::setprecision(2) << layer->opacity(); | 51 buf << L"opacity: " << std::setprecision(2) << layer->opacity(); |
59 } | 52 } |
60 | 53 |
61 if (layer->transform().HasChange()) { | 54 if (layer->transform().HasChange()) { |
62 gfx::Point translation; | 55 gfx::Point translation; |
63 float rotation; | 56 float rotation; |
64 gfx::Point3f scale; | 57 gfx::Point3f scale; |
65 if (ui::InterpolatedTransform::FactorTRS(layer->transform(), | 58 if (ui::InterpolatedTransform::FactorTRS(layer->transform(), |
(...skipping 27 matching lines...) Expand all Loading... |
93 | 86 |
94 } // namespace | 87 } // namespace |
95 | 88 |
96 void PrintLayerHierarchy(const Layer* layer, gfx::Point mouse_location) { | 89 void PrintLayerHierarchy(const Layer* layer, gfx::Point mouse_location) { |
97 PrintLayerHierarchyImp(layer, 0, mouse_location); | 90 PrintLayerHierarchyImp(layer, 0, mouse_location); |
98 } | 91 } |
99 | 92 |
100 } // namespace ui | 93 } // namespace ui |
101 | 94 |
102 #endif // NDEBUG | 95 #endif // NDEBUG |
OLD | NEW |