summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-08 21:05:29 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-08 21:05:29 +0000
commit7a4de4ebe6279d54ef6f9c32600b4baf14c29f79 (patch)
treed3d9233552ad3a8e4a9f3435d842c6d7f5eef604
parent08f3ac481ed50bf2975f2dfbd20aefd712450680 (diff)
downloadchromium_src-7a4de4ebe6279d54ef6f9c32600b4baf14c29f79.zip
chromium_src-7a4de4ebe6279d54ef6f9c32600b4baf14c29f79.tar.gz
chromium_src-7a4de4ebe6279d54ef6f9c32600b4baf14c29f79.tar.bz2
Windows: fix some graphical glitches with render view deemphasis.
This doesn't fix bullet points 3 or 4 from the bug report, which are cross-platform. This only fixes the windows-specific painting issues. BUG=37563 TEST=manual Review URL: http://codereview.chromium.org/669228 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40933 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view_win.cc6
1 files changed, 5 insertions, 1 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 ce0c1d7..780b555 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_win.cc
+++ b/chrome/browser/renderer_host/render_widget_host_view_win.cc
@@ -232,7 +232,7 @@ BOOL CALLBACK DetachPluginWindowsCallback(HWND window, LPARAM param) {
void DrawDeemphasized(const gfx::Rect& paint_rect,
HDC backing_store_dc,
HDC paint_dc) {
- gfx::Canvas canvas(paint_rect.width(), paint_rect.height(), false);
+ gfx::Canvas canvas(paint_rect.width(), paint_rect.height(), true);
HDC dc = canvas.beginPlatformPaint();
BitBlt(dc,
0,
@@ -781,7 +781,11 @@ bool RenderWidgetHostViewWin::ContainsNativeView(
}
void RenderWidgetHostViewWin::SetVisuallyDeemphasized(bool deemphasized) {
+ if (visually_deemphasized_ == deemphasized)
+ return;
+
visually_deemphasized_ = deemphasized;
+ InvalidateRect(NULL, FALSE);
}
///////////////////////////////////////////////////////////////////////////////