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 1176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1187 lock_updates_count_ = 0; | 1187 lock_updates_count_ = 0; |
1188 } | 1188 } |
1189 } | 1189 } |
1190 | 1190 |
1191 void HWNDMessageHandler::RedrawLayeredWindowContents() { | 1191 void HWNDMessageHandler::RedrawLayeredWindowContents() { |
1192 waiting_for_redraw_layered_window_contents_ = false; | 1192 waiting_for_redraw_layered_window_contents_ = false; |
1193 if (invalid_rect_.IsEmpty()) | 1193 if (invalid_rect_.IsEmpty()) |
1194 return; | 1194 return; |
1195 | 1195 |
1196 // We need to clip to the dirty rect ourselves. | 1196 // We need to clip to the dirty rect ourselves. |
1197 layered_window_contents_->sk_canvas()->save(SkCanvas::kClip_SaveFlag); | 1197 layered_window_contents_->sk_canvas()->save(); |
1198 double scale = gfx::win::GetDeviceScaleFactor(); | 1198 double scale = gfx::win::GetDeviceScaleFactor(); |
1199 layered_window_contents_->sk_canvas()->scale( | 1199 layered_window_contents_->sk_canvas()->scale( |
1200 SkScalar(scale),SkScalar(scale)); | 1200 SkScalar(scale),SkScalar(scale)); |
1201 layered_window_contents_->ClipRect(invalid_rect_); | 1201 layered_window_contents_->ClipRect(invalid_rect_); |
1202 delegate_->PaintLayeredWindow(layered_window_contents_.get()); | 1202 delegate_->PaintLayeredWindow(layered_window_contents_.get()); |
1203 layered_window_contents_->sk_canvas()->scale( | 1203 layered_window_contents_->sk_canvas()->scale( |
1204 SkScalar(1.0/scale),SkScalar(1.0/scale)); | 1204 SkScalar(1.0/scale),SkScalar(1.0/scale)); |
1205 layered_window_contents_->sk_canvas()->restore(); | 1205 layered_window_contents_->sk_canvas()->restore(); |
1206 | 1206 |
1207 RECT wr; | 1207 RECT wr; |
(...skipping 1165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2373 DefWindowProcWithRedrawLock(message, w_param, l_param); | 2373 DefWindowProcWithRedrawLock(message, w_param, l_param); |
2374 handled = true; | 2374 handled = true; |
2375 } | 2375 } |
2376 | 2376 |
2377 if (ref.get()) | 2377 if (ref.get()) |
2378 SetMsgHandled(handled); | 2378 SetMsgHandled(handled); |
2379 return 0; | 2379 return 0; |
2380 } | 2380 } |
2381 | 2381 |
2382 } // namespace views | 2382 } // namespace views |
OLD | NEW |