Skip to content
  • commit-queue@webkit.org's avatar
    [Mac] Use pageScaleFactor * deviceScaleFactor in requiresTiledLayer() and... · e3b14e5e
    commit-queue@webkit.org authored
    [Mac] Use pageScaleFactor * deviceScaleFactor in requiresTiledLayer() and computePixelAlignment() of GraphicsLayerCA.
    https://bugs.webkit.org/show_bug.cgi?id=107359
    
    Patch by Huang Dongsung <luxtella@company100.net> on 2013-05-13
    Reviewed by Darin Adler.
    
    Currently GraphicsLayerCA uses pageScaleFactor in requiresTiledLayer() and
    computePixelAlignment(), but we must use pageScaleFactor * deviceScaleFactor in
    them.
    It is because:
    1. requiresTiledLayer() uses the scale to compute an actual layer size in the device
    pixel unit.
    2. computePixelAlignment() uses the scale to compute an aligned layer position
    in the device pixel unit.
    
    No new tests. We can not test about requiresTiledLayer() because it depends on
    gpu. computePixelAlignment() is correct now because fortunately Mac uses
    only 2 (for retina display) as a deviceScaleFactor.
    
    * platform/graphics/ca/GraphicsLayerCA.cpp:
    (WebCore::GraphicsLayerCA::requiresTiledLayer):
    (WebCore::GraphicsLayerCA::computePixelAlignment):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150047 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    e3b14e5e