Zoomed-in scrolling is very slow when deviceScaleFactor > 1
authorbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Nov 2012 04:26:35 +0000 (04:26 +0000)
committerbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Nov 2012 04:26:35 +0000 (04:26 +0000)
commite16fb42622d07eab3965cf68d663be4349786a43
tree5fc5a81f0123ce009a60f221d24aef82f3ca21d1
parent87204fbd35a34720856ee297d2358304c0d05f0a
Zoomed-in scrolling is very slow when deviceScaleFactor > 1
https://bugs.webkit.org/show_bug.cgi?id=101787

Reviewed by Simon Fraser.

Source/WebCore:

This patch adds a new member to the GraphicsContextState that tracks
whether or not fonts should be subpixel-quantized. We want to default
to sibpixel-quantizing, but we'll turn it off if we're scrolling
content that cannot be scrolled on the scrolling thread.

State has a new bool shouldSubpixelQuantizeFonts. It defaults to true
since normally we do want to quantize.
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::setShouldSubpixelQuantizeFonts):
(WebCore::GraphicsContext::shouldSubpixelQuantizeFonts):
* platform/graphics/GraphicsContext.h:
(WebCore::GraphicsContextState::GraphicsContextState):
(GraphicsContextState):
(GraphicsContext):

wkSetCGFontRenderingMode now takes a BOOL parameter which indicates
whether or not it should try to subpixel-quantize the fonts.
* platform/graphics/mac/FontMac.mm:
(WebCore::Font::drawGlyphs):
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:

Disable subpixel-quantization for overflow areas, subframes, and
content that is scrolling on the main thread.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintLayerContents):

WebKitLibraries:

wkSetCGFontRenderingMode now takes a BOOL parameter.
* WebKitSystemInterface.h:
* libWebKitSystemInterfaceLion.a:
* libWebKitSystemInterfaceMountainLion.a:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@134348 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/GraphicsContext.cpp
Source/WebCore/platform/graphics/GraphicsContext.h
Source/WebCore/platform/graphics/mac/FontMac.mm
Source/WebCore/platform/mac/WebCoreSystemInterface.h
Source/WebCore/platform/mac/WebCoreSystemInterface.mm
Source/WebCore/rendering/RenderLayer.cpp
WebKitLibraries/ChangeLog
WebKitLibraries/WebKitSystemInterface.h