Index: ui/gfx/display.cc |
diff --git a/ui/gfx/display.cc b/ui/gfx/display.cc |
index e647f650603ff777e9a2c46931e5e11c7d3c645a..fb9c13c7f6a3d0a20e1548ff88dae09f8527f60b 100644 |
--- a/ui/gfx/display.cc |
+++ b/ui/gfx/display.cc |
@@ -108,6 +108,14 @@ void Display::UpdateWorkAreaFromInsets(const gfx::Insets& insets) { |
work_area_.Inset(insets); |
} |
+void Display::SetOverscanInsets(const gfx::Insets& insets) { |
+ Rect bounds_in_pixel(bounds_in_pixel_); |
+ bounds_in_pixel.Inset(overscan_insets_.Scale(device_scale_factor_).Scale(-1)); |
+ bounds_in_pixel.Inset(insets.Scale(device_scale_factor_)); |
+ SetScaleAndBounds(device_scale_factor_, bounds_in_pixel); |
oshima
2012/10/16 22:46:26
this updates bounds_in_pixel, so it will keep shri
|
+ overscan_insets_ = insets; |
+} |
+ |
gfx::Size Display::GetSizeInPixel() const { |
return gfx::ToFlooredSize(size().Scale(device_scale_factor_)); |
} |