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

Unified Diff: chrome/common/gfx/chrome_canvas_win.cc

Issue 21201: Transparency (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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 | « no previous file | skia/ext/bitmap_platform_device_mac.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/gfx/chrome_canvas_win.cc
===================================================================
--- chrome/common/gfx/chrome_canvas_win.cc (revision 10202)
+++ chrome/common/gfx/chrome_canvas_win.cc (working copy)
@@ -158,7 +158,6 @@
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 @@
// 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,
« no previous file with comments | « no previous file | skia/ext/bitmap_platform_device_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698