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

Unified Diff: ui/compositor/dip_util.h

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
Index: ui/compositor/dip_util.h
diff --git a/ui/compositor/dip_util.h b/ui/compositor/dip_util.h
index e8d0367ee5436ece07183c36be9269d5c02fece5..cac368170b1ebdb0136caa693b79014793860e4e 100644
--- a/ui/compositor/dip_util.h
+++ b/ui/compositor/dip_util.h
@@ -44,6 +44,13 @@ COMPOSITOR_EXPORT gfx::Rect ConvertRectToPixel(
const Layer* layer,
const gfx::Rect& rect_in_dip);
+// Snaps the |layer_to_snap| to the physical pixel boundary.
+// |snapped_layer| is a reference layer that should also be
+// snapped at the pysical pixel boundary.
+COMPOSITOR_EXPORT void SnapLayerToPhysicalPixelBoundary(
+ ui::Layer* snapped_layer,
+ ui::Layer* layer_to_snap);
+
} // namespace ui
#endif // UI_COMPOSITOR_DIP_UTIL_H_

Powered by Google App Engine
This is Rietveld 408576698