Changeset 138987 in webkit
- Timestamp:
- Jan 7, 2013 2:05:33 PM (11 years ago)
- Location:
- trunk/Source
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r138986 r138987 1 2013-01-07 Alok Priyadarshi <alokp@chromium.org> 2 3 [chromium] Fix PlatformContextSkia::setDrawingToImageBuffer abuse 4 https://bugs.webkit.org/show_bug.cgi?id=104956 5 6 Reviewed by James Robinson. 7 8 Replaced PlatformContextSkia::SetDrawingToImageBuffer with GraphicsContext::setShouldSmoothFonts. 9 10 No new tests needed. No change in functionality. 11 12 * platform/graphics/chromium/CompositorHUDFontAtlas.cpp: 13 (WebCore::CompositorHUDFontAtlas::generateFontAtlas): 14 * platform/graphics/chromium/OpaqueRectTrackingContentLayerDelegate.cpp: 15 (WebCore::OpaqueRectTrackingContentLayerDelegate::paintContents): 16 * platform/graphics/skia/ImageBufferSkia.cpp: 17 (WebCore::ImageBuffer::ImageBuffer): 18 * platform/graphics/skia/PlatformContextSkia.cpp: 19 (WebCore::PlatformContextSkia::couldUseLCDRenderedText): 20 (WebCore): 21 1 22 2013-01-07 Enrica Casucci <enrica@apple.com> 2 23 -
trunk/Source/WebCore/platform/graphics/chromium/CompositorHUDFontAtlas.cpp
r125961 r138987 61 61 62 62 PlatformContextSkia platformContext(canvas.get()); 63 platformContext.setDrawingToImageBuffer(true);64 63 GraphicsContext atlasContext(&platformContext); 64 atlasContext.setShouldSmoothFonts(false); 65 65 66 66 // Clear the entire texture atlas to transparent before drawing fonts. -
trunk/Source/WebCore/platform/graphics/chromium/OpaqueRectTrackingContentLayerDelegate.cpp
r133499 r138987 58 58 #endif 59 59 platformContext.setTrackOpaqueRegion(!m_opaque); 60 // FIXME: Rename PlatformContextSkia::setDrawingToImageBuffer to setCanPaintLCDText.61 // I also suspect that a function on PlatformContextSkia is not really needed.62 // GraphicsContext::setAllowsFontSmoothing can be used for this purpose.63 platformContext.setDrawingToImageBuffer(!(canPaintLCDText && m_opaque));64 60 GraphicsContext context(&platformContext); 61 context.setShouldSmoothFonts(canPaintLCDText && m_opaque); 65 62 66 63 // Record transform prior to painting, as all opaque tracking will be -
trunk/Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp
r137397 r138987 139 139 m_data.m_platformContext.setCanvas(m_data.m_canvas.get()); 140 140 m_context = adoptPtr(new GraphicsContext(&m_data.m_platformContext)); 141 m_context-> platformContext()->setDrawingToImageBuffer(true);141 m_context->setShouldSmoothFonts(false); 142 142 m_context->scale(FloatSize(m_resolutionScale, m_resolutionScale)); 143 143 … … 169 169 m_data.m_platformContext.setCanvas(m_data.m_canvas.get()); 170 170 m_context = adoptPtr(new GraphicsContext(&m_data.m_platformContext)); 171 m_context-> platformContext()->setDrawingToImageBuffer(true);171 m_context->setShouldSmoothFonts(false); 172 172 m_context->scale(FloatSize(m_resolutionScale, m_resolutionScale)); 173 173 -
trunk/Source/WebCore/platform/graphics/skia/PlatformContextSkia.cpp
r136755 r138987 630 630 return false; 631 631 632 // If this text is not in an image buffer and so won't be externally 633 // composited, then subpixel antialiasing is fine. 634 return !isDrawingToImageBuffer(); 632 return m_gc->shouldSmoothFonts(); 635 633 } 636 634 -
trunk/Source/WebKit/chromium/ChangeLog
r138983 r138987 1 2013-01-07 Alok Priyadarshi <alokp@chromium.org> 2 3 [chromium] Fix PlatformContextSkia::setDrawingToImageBuffer abuse 4 https://bugs.webkit.org/show_bug.cgi?id=104956 5 6 Reviewed by James Robinson. 7 8 Replaced PlatformContextSkia::SetDrawingToImageBuffer with GraphicsContext::setShouldSmoothFonts. 9 10 * src/NonCompositedContentHost.cpp: 11 (WebKit::NonCompositedContentHost::paintContents): 12 (WebKit): 13 (WebKit::NonCompositedContentHost::setShowDebugBorders): 14 * src/PageWidgetDelegate.cpp: 15 (WebKit::PageWidgetDelegate::paint): 16 * src/WebFontImpl.cpp: 17 (WebKit::WebFontImpl::drawText): 18 1 19 2013-01-07 Mike West <mkwst@chromium.org> 2 20 -
trunk/Source/WebKit/chromium/src/NonCompositedContentHost.cpp
r133517 r138987 173 173 void NonCompositedContentHost::paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext& context, WebCore::GraphicsLayerPaintingPhase, const WebCore::IntRect& clipRect) 174 174 { 175 // FIXME: Remove LCD text setting after it is implemented in chromium.176 // On non-android platforms, we want to render text with subpixel antialiasing on the root layer177 // so long as the root is opaque. On android all text is grayscale.178 #if !OS(ANDROID)179 if (m_graphicsLayer->contentsOpaque())180 context.platformContext()->setDrawingToImageBuffer(false);181 #endif182 175 context.translate(-m_layerAdjust); 183 176 WebCore::IntRect adjustedClipRect = clipRect; -
trunk/Source/WebKit/chromium/src/PageWidgetDelegate.cpp
r135459 r138987 88 88 GraphicsContextBuilder builder(canvas); 89 89 GraphicsContext& gc = builder.context(); 90 gc. platformContext()->setDrawingToImageBuffer(background == Opaque ? false : true);90 gc.setShouldSmoothFonts(background == Opaque); 91 91 if (applyDeviceScale) { 92 92 gc.applyDeviceScaleFactor(page->deviceScaleFactor()); -
trunk/Source/WebKit/chromium/src/WebFontImpl.cpp
r130448 r138987 99 99 GraphicsContext& gc = builder.context(); 100 100 101 gc.platformContext()->setDrawingToImageBuffer(!canvasIsOpaque);102 103 101 gc.save(); 102 gc.setShouldSmoothFonts(canvasIsOpaque); 104 103 gc.setFillColor(color, ColorSpaceDeviceRGB); 105 104 gc.clip(WebCore::FloatRect(clip));
Note: See TracChangeset
for help on using the changeset viewer.