summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/common')
-rw-r--r--chrome/common/gfx/chrome_canvas_win.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/chrome/common/gfx/chrome_canvas_win.cc b/chrome/common/gfx/chrome_canvas_win.cc
index 770effb..5e40ceb 100644
--- a/chrome/common/gfx/chrome_canvas_win.cc
+++ b/chrome/common/gfx/chrome_canvas_win.cc
@@ -158,7 +158,6 @@ void ChromeCanvas::DrawStringInt(const std::wstring& text, HFONT font,
if (!IntersectsClipRectInt(x, y, w, h))
return;
- getTopPlatformDevice().prepareForGDI(x, y, w, h);
RECT text_bounds = { x, y, x + w, y + h };
HDC dc = beginPlatformPaint();
SetBkMode(dc, TRANSPARENT);
@@ -174,7 +173,11 @@ void ChromeCanvas::DrawStringInt(const std::wstring& text, HFONT font,
// Restore the old font. This way we don't have to worry if the caller
// deletes the font and the DC lives longer.
SelectObject(dc, old_font);
- getTopPlatformDevice().postProcessGDI(x, y, w, h);
+
+ // Windows will have cleared the alpha channel of the text we drew. Assume
+ // we're drawing to an opaque surface, or at least the text rect area is
+ // opaque.
+ getTopPlatformDevice().makeOpaque(x, y, w, h);
}
void ChromeCanvas::DrawStringInt(const std::wstring& text,