| Index: content/browser/renderer_host/software_output_device_win.cc
|
| diff --git a/content/browser/renderer_host/software_output_device_win.cc b/content/browser/renderer_host/software_output_device_win.cc
|
| index 90bc03297cfebe616bafac31da6039f57b4e7eb1..29c4542bbc6feabc9a86bc4274c8f8463e1f1f17 100644
|
| --- a/content/browser/renderer_host/software_output_device_win.cc
|
| +++ b/content/browser/renderer_host/software_output_device_win.cc
|
| @@ -17,13 +17,11 @@ SoftwareOutputDeviceWin::SoftwareOutputDeviceWin(ui::Compositor* compositor)
|
| // TODO(skaslev) Remove this when crbug.com/180702 is fixed.
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
|
|
| - hdc_ = ::GetWindowDC(compositor->widget());
|
| + hwnd_ = compositor->widget();
|
| }
|
|
|
| SoftwareOutputDeviceWin::~SoftwareOutputDeviceWin() {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| -
|
| - ::ReleaseDC(compositor_->widget(), hdc_);
|
| }
|
|
|
| void SoftwareOutputDeviceWin::Resize(gfx::Size viewport_size) {
|
| @@ -49,13 +47,15 @@ void SoftwareOutputDeviceWin::EndPaint(cc::SoftwareFrameData* frame_data) {
|
| return;
|
|
|
| const SkBitmap& bitmap = device_->accessBitmap(false);
|
| - gfx::StretchDIBits(hdc_,
|
| + HDC hdc = ::GetDC(hwnd_);
|
| + gfx::StretchDIBits(hdc,
|
| rect.x(), rect.y(),
|
| rect.width(), rect.height(),
|
| rect.x(), rect.y(),
|
| rect.width(), rect.height(),
|
| bitmap.getPixels(),
|
| &bitmap_info_);
|
| + ::ReleaseDC(hwnd_, hdc);
|
| }
|
|
|
| } // namespace content
|
|
|