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

Unified Diff: ui/gfx/display.cc

Issue 1061733002: Remove windows/mac/ios specific code from //ui (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: fix default try set Created 5 years, 9 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 | « ui/gfx/codec/DEPS ('k') | ui/gfx/frame_time.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/display.cc
diff --git a/ui/gfx/display.cc b/ui/gfx/display.cc
index 80e3149de7fc767587ab5c9c7aa481f5da43cebe..5d069a5347f09b76cf618761677875e5ed757a7b 100644
--- a/ui/gfx/display.cc
+++ b/ui/gfx/display.cc
@@ -107,14 +107,8 @@ void Display::SetScaleAndBounds(
float device_scale_factor,
const gfx::Rect& bounds_in_pixel) {
Insets insets = bounds_.InsetsFrom(work_area_);
- if (!HasForceDeviceScaleFactor()) {
-#if defined(OS_MACOSX)
- // Unless an explicit scale factor was provided for testing, ensure the
- // scale is integral.
- device_scale_factor = static_cast<int>(device_scale_factor);
-#endif
+ if (!HasForceDeviceScaleFactor())
device_scale_factor_ = device_scale_factor;
- }
device_scale_factor_ = std::max(1.0f, device_scale_factor_);
bounds_ = gfx::Rect(
gfx::ToFlooredPoint(gfx::ScalePoint(bounds_in_pixel.origin(),
« no previous file with comments | « ui/gfx/codec/DEPS ('k') | ui/gfx/frame_time.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698