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 UI_COMPOSITOR_DIP_UTIL_H_ | 5 #ifndef UI_COMPOSITOR_DIP_UTIL_H_ |
6 #define UI_COMPOSITOR_DIP_UTIL_H_ | 6 #define UI_COMPOSITOR_DIP_UTIL_H_ |
7 | 7 |
8 #include "ui/compositor/compositor_export.h" | 8 #include "ui/compositor/compositor_export.h" |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "ui/gfx/point_f.h" | 10 #include "ui/gfx/point_f.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 COMPOSITOR_EXPORT gfx::Point ConvertPointToPixel( | 37 COMPOSITOR_EXPORT gfx::Point ConvertPointToPixel( |
38 const Layer* layer, | 38 const Layer* layer, |
39 const gfx::Point& point_in_dip); | 39 const gfx::Point& point_in_dip); |
40 COMPOSITOR_EXPORT gfx::Size ConvertSizeToPixel( | 40 COMPOSITOR_EXPORT gfx::Size ConvertSizeToPixel( |
41 const Layer* layer, | 41 const Layer* layer, |
42 const gfx::Size& size_in_dip); | 42 const gfx::Size& size_in_dip); |
43 COMPOSITOR_EXPORT gfx::Rect ConvertRectToPixel( | 43 COMPOSITOR_EXPORT gfx::Rect ConvertRectToPixel( |
44 const Layer* layer, | 44 const Layer* layer, |
45 const gfx::Rect& rect_in_dip); | 45 const gfx::Rect& rect_in_dip); |
46 | 46 |
| 47 // Snaps the |layer_to_snap| to the physical pixel boundary. |
| 48 // |snapped_layer| is a reference layer that should also be |
| 49 // snapped at the pysical pixel boundary. |
| 50 COMPOSITOR_EXPORT void SnapLayerToPhysicalPixelBoundary( |
| 51 ui::Layer* snapped_layer, |
| 52 ui::Layer* layer_to_snap); |
| 53 |
47 } // namespace ui | 54 } // namespace ui |
48 | 55 |
49 #endif // UI_COMPOSITOR_DIP_UTIL_H_ | 56 #endif // UI_COMPOSITOR_DIP_UTIL_H_ |
OLD | NEW |