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

Unified Diff: ui/views/win/hwnd_message_handler.cc

Issue 14348033: NOT FOR SUBMIT - Windows Views HiDPI (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Moving windows code into ifdef's Created 7 years, 7 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
« ui/views/win/hwnd_message_handler.h ('K') | « ui/views/win/hwnd_message_handler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/win/hwnd_message_handler.cc
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index 9c01ec17e459644e594287dc8618333d741c3dd9..f826a1b6d14504439367d13b67116df8eccfdafc 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -522,7 +522,7 @@ void HWNDMessageHandler::GetWindowPlacement(
}
}
-void HWNDMessageHandler::SetBounds(const gfx::Rect& bounds) {
+void HWNDMessageHandler::SetBoundsInPixel(const gfx::Rect& bounds) {
LONG style = GetWindowLong(hwnd(), GWL_STYLE);
if (style & WS_MAXIMIZE)
SetWindowLong(hwnd(), GWL_STYLE, style & ~WS_MAXIMIZE);
@@ -1161,8 +1161,13 @@ void HWNDMessageHandler::RedrawLayeredWindowContents() {
// We need to clip to the dirty rect ourselves.
kevers 2013/06/03 17:28:50 Tested on Aura?
layered_window_contents_->sk_canvas()->save(SkCanvas::kClip_SaveFlag);
+ double scale = ui::win::GetDeviceScaleFactor();
+ layered_window_contents_->sk_canvas()->scale(
+ SkScalar(scale),SkScalar(scale));
layered_window_contents_->ClipRect(invalid_rect_);
delegate_->PaintLayeredWindow(layered_window_contents_.get());
+ layered_window_contents_->sk_canvas()->scale(
+ SkScalar(1.0/scale),SkScalar(1.0/scale));
layered_window_contents_->sk_canvas()->restore();
RECT wr;
« ui/views/win/hwnd_message_handler.h ('K') | « ui/views/win/hwnd_message_handler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698