Index: chrome/renderer/print_web_view_helper_win.cc |
=================================================================== |
--- chrome/renderer/print_web_view_helper_win.cc (revision 120644) |
+++ chrome/renderer/print_web_view_helper_win.cc (working copy) |
@@ -279,23 +279,23 @@ |
// Page used alpha blend, but printer doesn't support it. Rewrite the |
// metafile and flatten out the transparency. |
base::win::ScopedGetDC screen_dc(NULL); |
- base::win::ScopedCreateDC bitmap_dc(CreateCompatibleDC(screen_dc)); |
- if (!bitmap_dc) |
+ base::win::ScopedCreateDC bitmap_dc(CreateCompatibleDC(screen_dc.Get())); |
+ if (!bitmap_dc.Get()) |
NOTREACHED() << "Bitmap DC creation failed"; |
- SetGraphicsMode(bitmap_dc, GM_ADVANCED); |
+ SetGraphicsMode(bitmap_dc.Get(), GM_ADVANCED); |
void* bits = NULL; |
BITMAPINFO hdr; |
gfx::CreateBitmapHeader(page_size.width(), page_size.height(), |
&hdr.bmiHeader); |
base::win::ScopedBitmap hbitmap(CreateDIBSection( |
- bitmap_dc, &hdr, DIB_RGB_COLORS, &bits, NULL, 0)); |
+ bitmap_dc.Get(), &hdr, DIB_RGB_COLORS, &bits, NULL, 0)); |
if (!hbitmap) |
NOTREACHED() << "Raster bitmap creation for printing failed"; |
- base::win::ScopedSelectObject selectBitmap(bitmap_dc, hbitmap); |
+ base::win::ScopedSelectObject selectBitmap(bitmap_dc.Get(), hbitmap); |
RECT rect = { 0, 0, page_size.width(), page_size.height() }; |
HBRUSH whiteBrush = static_cast<HBRUSH>(GetStockObject(WHITE_BRUSH)); |
- FillRect(bitmap_dc, &rect, whiteBrush); |
+ FillRect(bitmap_dc.Get(), &rect, whiteBrush); |
Metafile* metafile2(new printing::NativeMetafile); |
metafile2->Init(); |