Changeset 41692 in webkit
- Timestamp:
- Mar 13, 2009 3:47:20 PM (15 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r41691 r41692 1 2009-03-13 Stephen White <senorblanco@chromium.org> 2 3 Reviewed by Eric Seidel. 4 5 https://bugs.webkit.org/show_bug.cgi?id=24584 6 7 Fix transparent text rendering on Chromium. FontChromiumWin 8 was calling beginTransparencyLayer()/endTransparencyLayer(), with 9 a TransparencyWin inside to do GDI ClearType rendering over an 10 opaque background. TransparencyWin does its special sauce 11 in the destructor, but it was being called too late to be used 12 correctly in the layer. Put the special sauce into a new function, 13 composite(), and call that explicitly instead. 14 15 * platform/graphics/chromium/FontChromiumWin.cpp: 16 (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::~TransparencyAwareFontPainter): 17 * platform/graphics/chromium/TransparencyWin.cpp: 18 (WebCore::TransparencyWin::~TransparencyWin): 19 (WebCore::TransparencyWin::composite): 20 (WebCore::TransparencyWin::init): 21 * platform/graphics/chromium/TransparencyWin.h: 22 * rendering/RenderThemeChromiumWin.cpp: 23 (WebCore::): 24 1 25 2009-03-13 Mike Belshe <mike@belshe.com> 2 26 -
trunk/WebCore/platform/graphics/chromium/FontChromiumWin.cpp
r41287 r41692 187 187 if (!m_useGDI) 188 188 return; // Nothing to do. 189 m_transparency.composite(); 189 190 if (m_createdTransparencyLayer) 190 191 m_graphicsContext->endTransparencyLayer(); -
trunk/WebCore/platform/graphics/chromium/TransparencyWin.cpp
r41386 r41692 158 158 TransparencyWin::~TransparencyWin() 159 159 { 160 // This should be false, since calling composite() is mandatory. 161 ASSERT(!m_savedOnDrawContext); 162 } 163 164 void TransparencyWin::composite() 165 { 160 166 // Matches the save() in initializeNewTextContext (or the constructor for 161 167 // SCALE) to put the context back into the same state we found it. 162 if (m_savedOnDrawContext) 168 if (m_savedOnDrawContext) { 163 169 m_drawContext->restore(); 170 m_savedOnDrawContext = false; 171 } 164 172 165 173 switch (m_layerMode) { … … 179 187 LayerMode layerMode, 180 188 TransformMode transformMode, 181 const IntRect& region) { 189 const IntRect& region) 190 { 182 191 m_destContext = dest; 183 192 m_orgTransform = dest->getCTM(); -
trunk/WebCore/platform/graphics/chromium/TransparencyWin.h
r41287 r41692 135 135 const IntRect& region); 136 136 137 // Combines the source and destination bitmaps using the given mode. 138 void composite(); 139 137 140 // Returns the context for drawing into, which may be the destination 138 141 // context, or a temporary one. -
trunk/WebCore/rendering/RenderThemeChromiumWin.cpp
r41652 r41692 71 71 } 72 72 73 ~ThemePainter() 74 { 75 composite(); 76 } 77 73 78 private: 74 79 static LayerMode getLayerMode(GraphicsContext* context, TransformMode transformMode)
Note: See TracChangeset
for help on using the changeset viewer.