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

Side by Side Diff: ui/views/widget/native_widget_win.cc

Issue 9323011: Cache a screen compatible DC to avoid re-creating it excessively. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: . Created 8 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« ui/gfx/screen.h ('K') | « ui/gfx/screen_win.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/widget/native_widget_win.h" 5 #include "ui/views/widget/native_widget_win.h"
6 6
7 #include <dwmapi.h> 7 #include <dwmapi.h>
8 #include <shellapi.h> 8 #include <shellapi.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1295 matching lines...) Expand 10 before | Expand all | Expand 10 after
1306 1306
1307 void NativeWidgetWin::OnDestroy() { 1307 void NativeWidgetWin::OnDestroy() {
1308 delegate_->OnNativeWidgetDestroying(); 1308 delegate_->OnNativeWidgetDestroying();
1309 if (drop_target_.get()) { 1309 if (drop_target_.get()) {
1310 RevokeDragDrop(hwnd()); 1310 RevokeDragDrop(hwnd());
1311 drop_target_ = NULL; 1311 drop_target_ = NULL;
1312 } 1312 }
1313 } 1313 }
1314 1314
1315 void NativeWidgetWin::OnDisplayChange(UINT bits_per_pixel, CSize screen_size) { 1315 void NativeWidgetWin::OnDisplayChange(UINT bits_per_pixel, CSize screen_size) {
1316 gfx::Screen::ReleaseCompatibleDC();
sky 2012/02/03 18:34:06 This isn't the right place for a release, and it d
1316 GetWidget()->widget_delegate()->OnDisplayChanged(); 1317 GetWidget()->widget_delegate()->OnDisplayChanged();
1317 } 1318 }
1318 1319
1319 LRESULT NativeWidgetWin::OnDwmCompositionChanged(UINT msg, 1320 LRESULT NativeWidgetWin::OnDwmCompositionChanged(UINT msg,
1320 WPARAM w_param, 1321 WPARAM w_param,
1321 LPARAM l_param) { 1322 LPARAM l_param) {
1322 if (!GetWidget()->non_client_view()) { 1323 if (!GetWidget()->non_client_view()) {
1323 SetMsgHandled(FALSE); 1324 SetMsgHandled(FALSE);
1324 return 0; 1325 return 0;
1325 } 1326 }
(...skipping 1282 matching lines...) Expand 10 before | Expand all | Expand 10 after
2608 return (GetKeyState(VK_LBUTTON) & 0x80) || 2609 return (GetKeyState(VK_LBUTTON) & 0x80) ||
2609 (GetKeyState(VK_RBUTTON) & 0x80) || 2610 (GetKeyState(VK_RBUTTON) & 0x80) ||
2610 (GetKeyState(VK_MBUTTON) & 0x80) || 2611 (GetKeyState(VK_MBUTTON) & 0x80) ||
2611 (GetKeyState(VK_XBUTTON1) & 0x80) || 2612 (GetKeyState(VK_XBUTTON1) & 0x80) ||
2612 (GetKeyState(VK_XBUTTON2) & 0x80); 2613 (GetKeyState(VK_XBUTTON2) & 0x80);
2613 } 2614 }
2614 2615
2615 } // namespace internal 2616 } // namespace internal
2616 2617
2617 } // namespace views 2618 } // namespace views
OLDNEW
« ui/gfx/screen.h ('K') | « ui/gfx/screen_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698