| 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 #include "ui/views/win/hwnd_message_handler.h" | 5 #include "ui/views/win/hwnd_message_handler.h" |
| 6 | 6 |
| 7 #include <dwmapi.h> | 7 #include <dwmapi.h> |
| 8 #include <oleacc.h> | 8 #include <oleacc.h> |
| 9 #include <shellapi.h> | 9 #include <shellapi.h> |
| 10 #include <wtsapi32.h> | 10 #include <wtsapi32.h> |
| (...skipping 1201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1212 } | 1212 } |
| 1213 } | 1213 } |
| 1214 | 1214 |
| 1215 void HWNDMessageHandler::RedrawLayeredWindowContents() { | 1215 void HWNDMessageHandler::RedrawLayeredWindowContents() { |
| 1216 waiting_for_redraw_layered_window_contents_ = false; | 1216 waiting_for_redraw_layered_window_contents_ = false; |
| 1217 if (invalid_rect_.IsEmpty()) | 1217 if (invalid_rect_.IsEmpty()) |
| 1218 return; | 1218 return; |
| 1219 | 1219 |
| 1220 // We need to clip to the dirty rect ourselves. | 1220 // We need to clip to the dirty rect ourselves. |
| 1221 layered_window_contents_->sk_canvas()->save(); | 1221 layered_window_contents_->sk_canvas()->save(); |
| 1222 double scale = gfx::win::GetDeviceScaleFactor(); | 1222 double scale = gfx::GetDPIScale(); |
| 1223 layered_window_contents_->sk_canvas()->scale( | 1223 layered_window_contents_->sk_canvas()->scale( |
| 1224 SkScalar(scale),SkScalar(scale)); | 1224 SkScalar(scale),SkScalar(scale)); |
| 1225 layered_window_contents_->ClipRect(invalid_rect_); | 1225 layered_window_contents_->ClipRect(invalid_rect_); |
| 1226 delegate_->PaintLayeredWindow(layered_window_contents_.get()); | 1226 delegate_->PaintLayeredWindow(layered_window_contents_.get()); |
| 1227 layered_window_contents_->sk_canvas()->scale( | 1227 layered_window_contents_->sk_canvas()->scale( |
| 1228 SkScalar(1.0/scale),SkScalar(1.0/scale)); | 1228 SkScalar(1.0/scale),SkScalar(1.0/scale)); |
| 1229 layered_window_contents_->sk_canvas()->restore(); | 1229 layered_window_contents_->sk_canvas()->restore(); |
| 1230 | 1230 |
| 1231 RECT wr; | 1231 RECT wr; |
| 1232 GetWindowRect(hwnd(), &wr); | 1232 GetWindowRect(hwnd(), &wr); |
| (...skipping 1260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2493 SetWindowPos(hwnd(), NULL, 0, 0, 0, 0, flags | SWP_HIDEWINDOW); | 2493 SetWindowPos(hwnd(), NULL, 0, 0, 0, 0, flags | SWP_HIDEWINDOW); |
| 2494 SetWindowPos(hwnd(), NULL, 0, 0, 0, 0, flags | SWP_SHOWWINDOW); | 2494 SetWindowPos(hwnd(), NULL, 0, 0, 0, 0, flags | SWP_SHOWWINDOW); |
| 2495 } | 2495 } |
| 2496 // WM_DWMCOMPOSITIONCHANGED is only sent to top level windows, however we want | 2496 // WM_DWMCOMPOSITIONCHANGED is only sent to top level windows, however we want |
| 2497 // to notify our children too, since we can have MDI child windows who need to | 2497 // to notify our children too, since we can have MDI child windows who need to |
| 2498 // update their appearance. | 2498 // update their appearance. |
| 2499 EnumChildWindows(hwnd(), &SendDwmCompositionChanged, NULL); | 2499 EnumChildWindows(hwnd(), &SendDwmCompositionChanged, NULL); |
| 2500 } | 2500 } |
| 2501 | 2501 |
| 2502 } // namespace views | 2502 } // namespace views |
| OLD | NEW |