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

Unified Diff: ui/compositor/debug_utils.cc

Issue 375693006: Snap layers in views to physical pixel (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use cc::MathUtil::Round instead 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/compositor/dip_util.h » ('j') | ui/compositor/dip_util.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/debug_utils.cc
diff --git a/ui/compositor/debug_utils.cc b/ui/compositor/debug_utils.cc
index 37b9af42f306b44bed4613c09be20c20f0fac1f0..462cfc965f3a0f972f93d4de927f32c3dc43799c 100644
--- a/ui/compositor/debug_utils.cc
+++ b/ui/compositor/debug_utils.cc
@@ -64,6 +64,17 @@ void PrintLayerHierarchyImp(const Layer* layer,
*out << L'\n' << UTF8ToWide(property_indent_str);
*out << L"bounds: " << layer->bounds().x() << L',' << layer->bounds().y();
*out << L' ' << layer->bounds().width() << L'x' << layer->bounds().height();
+ if (!layer->subpixel_position_offset().IsZero())
+ *out << " " << UTF8ToWide(layer->subpixel_position_offset().ToString());
+
+ const ui::Layer* mask = const_cast<ui::Layer*>(layer)->layer_mask_layer();
+
+ if (mask) {
+ *out << L'\n' << UTF8ToWide(property_indent_str);
+ *out << L"mask layer: " << std::setprecision(2)
+ << UTF8ToWide(mask->bounds().ToString())
+ << UTF8ToWide(mask->subpixel_position_offset().ToString());
+ }
if (layer->opacity() != 1.0f) {
*out << L'\n' << UTF8ToWide(property_indent_str);
« no previous file with comments | « no previous file | ui/compositor/dip_util.h » ('j') | ui/compositor/dip_util.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698