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

Side by Side Diff: third_party/WebKit/WebCore/platform/graphics/chromium/FontChromiumWin.cpp

Issue 46097: WebKit merge 41660:41709 (WebKit side).... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007 Apple Computer, Inc. 2 * Copyright (C) 2006, 2007 Apple Computer, Inc.
3 * Copyright (c) 2006, 2007, 2008, 2009, Google Inc. All rights reserved. 3 * Copyright (c) 2006, 2007, 2008, 2009, Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 m_hdc = m_transparency.platformContext()->canvas()->beginPlatformPaint(); 179 m_hdc = m_transparency.platformContext()->canvas()->beginPlatformPaint();
180 m_oldFont = ::SelectObject(m_hdc, m_font->platformData().hfont()); 180 m_oldFont = ::SelectObject(m_hdc, m_font->platformData().hfont());
181 SetTextColor(m_hdc, skia::SkColorToCOLORREF(color)); 181 SetTextColor(m_hdc, skia::SkColorToCOLORREF(color));
182 SetBkMode(m_hdc, TRANSPARENT); 182 SetBkMode(m_hdc, TRANSPARENT);
183 } 183 }
184 184
185 TransparencyAwareFontPainter::~TransparencyAwareFontPainter() 185 TransparencyAwareFontPainter::~TransparencyAwareFontPainter()
186 { 186 {
187 if (!m_useGDI) 187 if (!m_useGDI)
188 return; // Nothing to do. 188 return; // Nothing to do.
189 m_transparency.composite();
189 if (m_createdTransparencyLayer) 190 if (m_createdTransparencyLayer)
190 m_graphicsContext->endTransparencyLayer(); 191 m_graphicsContext->endTransparencyLayer();
191 192
192 ::SelectObject(m_hdc, m_oldFont); 193 ::SelectObject(m_hdc, m_oldFont);
193 m_platformContext->canvas()->endPlatformPaint(); 194 m_platformContext->canvas()->endPlatformPaint();
194 } 195 }
195 196
196 bool TransparencyAwareFontPainter::drawGlyphs(int numGlyphs, 197 bool TransparencyAwareFontPainter::drawGlyphs(int numGlyphs,
197 const WORD* glyphs, 198 const WORD* glyphs,
198 const int* advances, 199 const int* advances,
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 int charIndex = state.xToCharacter(x); 335 int charIndex = state.xToCharacter(x);
335 336
336 // XToCharacter will return -1 if the position is before the first 337 // XToCharacter will return -1 if the position is before the first
337 // character (we get called like this sometimes). 338 // character (we get called like this sometimes).
338 if (charIndex < 0) 339 if (charIndex < 0)
339 charIndex = 0; 340 charIndex = 0;
340 return charIndex; 341 return charIndex;
341 } 342 }
342 343
343 } // namespace WebCore 344 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698