| Index: content/browser/compositor/software_output_device_win.cc
|
| diff --git a/content/browser/compositor/software_output_device_win.cc b/content/browser/compositor/software_output_device_win.cc
|
| index 0a1bc209898e00193dd8bb52d6f9fdf6fa3510b6..4cb2d876d847a429a32d02b71699b06780237303 100644
|
| --- a/content/browser/compositor/software_output_device_win.cc
|
| +++ b/content/browser/compositor/software_output_device_win.cc
|
| @@ -9,6 +9,7 @@
|
| #include "cc/resources/shared_bitmap.h"
|
| #include "content/public/browser/browser_thread.h"
|
| #include "skia/ext/platform_canvas.h"
|
| +#include "skia/ext/skia_utils_win.h"
|
| #include "ui/compositor/compositor.h"
|
| #include "ui/gfx/gdi_util.h"
|
| #include "ui/gfx/skia_util.h"
|
| @@ -165,6 +166,8 @@ void SoftwareOutputDeviceWin::EndPaint() {
|
| if (rect.IsEmpty())
|
| return;
|
|
|
| + HDC dib_dc = skia::GetNativeDrawingContext(contents_.get());
|
| +
|
| if (is_hwnd_composited_) {
|
| RECT wr;
|
| GetWindowRect(hwnd_, &wr);
|
| @@ -178,14 +181,19 @@ void SoftwareOutputDeviceWin::EndPaint() {
|
| style |= WS_EX_LAYERED;
|
| SetWindowLong(hwnd_, GWL_EXSTYLE, style);
|
|
|
| - HDC dib_dc = skia::GetNativeDrawingContext(contents_.get());
|
| ::UpdateLayeredWindow(hwnd_, NULL, &position, &size, dib_dc, &zero,
|
| RGB(0xFF, 0xFF, 0xFF), &blend, ULW_ALPHA);
|
| } else {
|
| HDC hdc = ::GetDC(hwnd_);
|
| RECT src_rect = rect.ToRECT();
|
| - skia::DrawToNativeContext(contents_.get(), hdc, rect.x(), rect.y(),
|
| - &src_rect);
|
| + skia::CopyHDC(dib_dc,
|
| + hdc,
|
| + rect.x(),
|
| + rect.y(),
|
| + contents_.get()->imageInfo().isOpaque(),
|
| + src_rect,
|
| + contents_.get()->getTotalMatrix());
|
| +
|
| ::ReleaseDC(hwnd_, hdc);
|
| }
|
| }
|
|
|