Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(168)

Side by Side Diff: ui/compositor/debug_utils.cc

Issue 385123005: Change ui::wm::Shadow to use cc::NinePatchLayer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Separate update functions for Bitmap/Border. The border needs to be clamped to stay within layer bo… Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | ui/compositor/layer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <cmath> 9 #include <cmath>
10 #include <iomanip> 10 #include <iomanip>
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 *out << L" not_drawn"; 48 *out << L" not_drawn";
49 break; 49 break;
50 case ui::LAYER_TEXTURED: 50 case ui::LAYER_TEXTURED:
51 *out << L" textured"; 51 *out << L" textured";
52 if (layer->fills_bounds_opaquely()) 52 if (layer->fills_bounds_opaquely())
53 *out << L" opaque"; 53 *out << L" opaque";
54 break; 54 break;
55 case ui::LAYER_SOLID_COLOR: 55 case ui::LAYER_SOLID_COLOR:
56 *out << L" solid"; 56 *out << L" solid";
57 break; 57 break;
58 case ui::LAYER_NINE_PATCH:
59 *out << L" nine_patch";
60 break;
58 } 61 }
59 62
60 if (!layer->visible()) 63 if (!layer->visible())
61 *out << L" !visible"; 64 *out << L" !visible";
62 65
63 std::string property_indent_str(indent+3, ' '); 66 std::string property_indent_str(indent+3, ' ');
64 *out << L'\n' << UTF8ToWide(property_indent_str); 67 *out << L'\n' << UTF8ToWide(property_indent_str);
65 *out << L"bounds: " << layer->bounds().x() << L',' << layer->bounds().y(); 68 *out << L"bounds: " << layer->bounds().x() << L',' << layer->bounds().y();
66 *out << L' ' << layer->bounds().width() << L'x' << layer->bounds().height(); 69 *out << L' ' << layer->bounds().width() << L'x' << layer->bounds().height();
67 70
(...skipping 30 matching lines...) Expand all
98 101
99 void PrintLayerHierarchy(const Layer* layer, gfx::Point mouse_location) { 102 void PrintLayerHierarchy(const Layer* layer, gfx::Point mouse_location) {
100 std::wostringstream out; 103 std::wostringstream out;
101 out << L"Layer hierarchy:\n"; 104 out << L"Layer hierarchy:\n";
102 PrintLayerHierarchyImp(layer, 0, mouse_location, &out); 105 PrintLayerHierarchyImp(layer, 0, mouse_location, &out);
103 // Error so logs can be collected from end-users. 106 // Error so logs can be collected from end-users.
104 LOG(ERROR) << out.str(); 107 LOG(ERROR) << out.str();
105 } 108 }
106 109
107 } // namespace ui 110 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | ui/compositor/layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698