summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-09 23:15:13 +0000
committeraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-09 23:15:13 +0000
commite322627c51db7ad243c49d096af20590828a00f9 (patch)
tree84203e048edcdfebf292bd6b8cd1beaad3a8d656
parent2609f86aa38f7d60f99a2c7b16681ff11c7098cb (diff)
downloadchromium_src-e322627c51db7ad243c49d096af20590828a00f9.zip
chromium_src-e322627c51db7ad243c49d096af20590828a00f9.tar.gz
chromium_src-e322627c51db7ad243c49d096af20590828a00f9.tar.bz2
Fix white flash when resizing window larger.
BUG=11544 TEST=Load a webpage, resize window larger. Window should not flash white while resizing. Review URL: http://codereview.chromium.org/113185 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15729 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view_win.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/chrome/browser/renderer_host/render_widget_host_view_win.cc b/chrome/browser/renderer_host/render_widget_host_view_win.cc
index c0c8c8d..3312ade 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_win.cc
+++ b/chrome/browser/renderer_host/render_widget_host_view_win.cc
@@ -748,13 +748,13 @@ void RenderWidgetHostViewWin::OnPaint(HDC dc) {
void RenderWidgetHostViewWin::DrawBackground(const RECT& dirty_rect,
CPaintDC* dc) {
- const RECT& dc_rect = dc->m_ps.rcPaint;
if (!background_.empty()) {
ChromeCanvas canvas(dirty_rect.right - dirty_rect.left,
dirty_rect.bottom - dirty_rect.top,
true); // opaque
-
canvas.TranslateInt(-dirty_rect.left, -dirty_rect.top);
+
+ const RECT& dc_rect = dc->m_ps.rcPaint;
canvas.TileImageInt(background_, 0, 0,
dc_rect.right - dc_rect.left,
dc_rect.bottom - dc_rect.top);
@@ -763,7 +763,7 @@ void RenderWidgetHostViewWin::DrawBackground(const RECT& dirty_rect,
dirty_rect.top, NULL);
} else {
HBRUSH white_brush = reinterpret_cast<HBRUSH>(GetStockObject(WHITE_BRUSH));
- dc->FillRect(&dc_rect, white_brush);
+ dc->FillRect(&dirty_rect, white_brush);
}
}