summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-27 22:15:19 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-27 22:15:19 +0000
commit54910b7969906431a43c7a17bd1ee580f8eeb9fa (patch)
treefd12d10eb9b2a8d48311e82e585d113d56a730b1 /chrome
parentd5fbc00d5d55132f03f229f3dba001fc62ee6795 (diff)
downloadchromium_src-54910b7969906431a43c7a17bd1ee580f8eeb9fa.zip
chromium_src-54910b7969906431a43c7a17bd1ee580f8eeb9fa.tar.gz
chromium_src-54910b7969906431a43c7a17bd1ee580f8eeb9fa.tar.bz2
Pull WebKit deps to get transparency fixes, and rebaseline affected layout tests.
Add a helper class to manage Windows' transparency issues. It will create layers and manage transforms in such a way that most effects can be achieved with fonts and form controls on Windows while looking nice. This removes the magic transparency color and associated infrastructure since it is no longer needed. This fixes semitransparent ClearType antialiasing and pngs with alpha channels with opacity applied. BUG=559,2791,3229,6372 Review URL: http://codereview.chromium.org/21201 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10637 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-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,