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

Unified Diff: ui/views/view.h

Issue 375693006: Snap layers in views to physical pixel (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
Index: ui/views/view.h
diff --git a/ui/views/view.h b/ui/views/view.h
index b0340ea14fbe07ba0c59ffdc57de8f6ea4b0bbec..202b0b67e99af146442427bbf0cee10c8b9e05ed 100644
--- a/ui/views/view.h
+++ b/ui/views/view.h
@@ -393,6 +393,10 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
LayoutManager* GetLayoutManager() const;
void SetLayoutManager(LayoutManager* layout);
+ // Adjust the layer's offset so that it snaps to the physical pixel boundary.
+ // This has no effect if the view does not have an associated layer.
+ void SnapLayerToPixelBoundary();
+
// Attributes ----------------------------------------------------------------
// The view class name.
@@ -1553,6 +1557,9 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
// Views. The default is absolute positioning according to bounds_.
scoped_ptr<LayoutManager> layout_manager_;
+ // Whether this View's layer should be snapped to the pixel boundary.
+ bool snap_layer_to_pixel_boundary_;
+
// Painting ------------------------------------------------------------------
// Background

Powered by Google App Engine
This is Rietveld 408576698