| Index: ui/native_theme/native_theme_win.cc
|
| diff --git a/ui/native_theme/native_theme_win.cc b/ui/native_theme/native_theme_win.cc
|
| index 474bcab22f8bc483dc36f0e40ff9dac763f2ff07..5123ccae179e89b7ecc24c9e426c472966a28685 100644
|
| --- a/ui/native_theme/native_theme_win.cc
|
| +++ b/ui/native_theme/native_theme_win.cc
|
| @@ -874,18 +874,18 @@ HRESULT NativeThemeWin::PaintMenuArrow(
|
| base::win::ScopedCreateDC mem_dc(CreateCompatibleDC(hdc));
|
| base::win::ScopedBitmap mem_bitmap(CreateCompatibleBitmap(hdc, r.width(),
|
| r.height()));
|
| - base::win::ScopedSelectObject select_bitmap(mem_dc, mem_bitmap);
|
| + base::win::ScopedSelectObject select_bitmap(mem_dc.Get(), mem_bitmap);
|
| // Copy and horizontally mirror the background from hdc into mem_dc. Use
|
| // a negative-width source rect, starting at the rightmost pixel.
|
| - StretchBlt(mem_dc, 0, 0, r.width(), r.height(),
|
| - hdc, r.right()-1, r.y(), -r.width(), r.height(), SRCCOPY);
|
| + StretchBlt(mem_dc.Get(), 0, 0, r.width(), r.height(),
|
| + hdc, r.right()-1, r.y(), -r.width(), r.height(), SRCCOPY);
|
| // Draw the arrow.
|
| RECT theme_rect = {0, 0, r.width(), r.height()};
|
| - HRESULT result = draw_theme_(handle, mem_dc, MENU_POPUPSUBMENU,
|
| + HRESULT result = draw_theme_(handle, mem_dc.Get(), MENU_POPUPSUBMENU,
|
| state_id, &theme_rect, NULL);
|
| // Copy and mirror the result back into mem_dc.
|
| StretchBlt(hdc, r.x(), r.y(), r.width(), r.height(),
|
| - mem_dc, r.width()-1, 0, -r.width(), r.height(), SRCCOPY);
|
| + mem_dc.Get(), r.width()-1, 0, -r.width(), r.height(), SRCCOPY);
|
| return result;
|
| }
|
|
|
| @@ -1976,9 +1976,9 @@ HRESULT NativeThemeWin::PaintFrameControl(HDC hdc,
|
| return E_OUTOFMEMORY;
|
|
|
| base::win::ScopedCreateDC bitmap_dc(CreateCompatibleDC(NULL));
|
| - base::win::ScopedSelectObject select_bitmap(bitmap_dc, mask_bitmap);
|
| + base::win::ScopedSelectObject select_bitmap(bitmap_dc.Get(), mask_bitmap);
|
| RECT local_rect = { 0, 0, width, height };
|
| - DrawFrameControl(bitmap_dc, &local_rect, type, state);
|
| + DrawFrameControl(bitmap_dc.Get(), &local_rect, type, state);
|
|
|
| // We're going to use BitBlt with a b&w mask. This results in using the dest
|
| // dc's text color for the black bits in the mask, and the dest dc's
|
| @@ -2004,7 +2004,8 @@ HRESULT NativeThemeWin::PaintFrameControl(HDC hdc,
|
| }
|
| COLORREF old_bg_color = SetBkColor(hdc, GetSysColor(bg_color_key));
|
| COLORREF old_text_color = SetTextColor(hdc, GetSysColor(text_color_key));
|
| - BitBlt(hdc, rect.x(), rect.y(), width, height, bitmap_dc, 0, 0, SRCCOPY);
|
| + BitBlt(hdc, rect.x(), rect.y(), width, height, bitmap_dc.Get(), 0, 0,
|
| + SRCCOPY);
|
| SetBkColor(hdc, old_bg_color);
|
| SetTextColor(hdc, old_text_color);
|
|
|
|
|