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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
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 #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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698