Index: ui/gfx/screen_win.cc |
=================================================================== |
--- ui/gfx/screen_win.cc (revision 120215) |
+++ ui/gfx/screen_win.cc (working copy) |
@@ -20,6 +20,9 @@ |
namespace gfx { |
// static |
+HDC Screen::compatible_dc_ = NULL; |
+ |
+// static |
gfx::Point Screen::GetCursorScreenPoint() { |
POINT pt; |
GetCursorPos(&pt); |
@@ -102,4 +105,19 @@ |
return GetSystemMetrics(SM_CMONITORS); |
} |
+// static |
+HDC Screen::GetCompatibleDC() { |
+ if (!compatible_dc_) |
+ compatible_dc_ = CreateCompatibleDC(NULL); |
+ return compatible_dc_; |
+} |
+ |
+// static |
+void Screen::ReleaseCompatibleDC() { |
+ if (compatible_dc_) { |
+ DeleteDC(compatible_dc_); |
+ compatible_dc_ = NULL; |
+ } |
+} |
+ |
} // namespace gfx |