Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(137)

Unified Diff: content/browser/renderer_host/software_output_device_win.cc

Issue 13261005: Fixed a rendering glitch with window borders for Aura on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/renderer_host/software_output_device_win.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « content/browser/renderer_host/software_output_device_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698