Skip to content
  • zimmermann's avatar
    Reviewed by Sam. Previous attempts reviewed by Oliver & Eric. · f10700ae
    zimmermann authored
    Fixes: http://bugs.webkit.org/show_bug.cgi?id=11867
    
    Bring back masking, by adding off-screen rendering functionality in GraphicsContext.
    Add new "static GraphicsContext* createImageContext(const IntSize& size, bool grayScale)"
    function, and implement it with CGBitmapContext in the GraphicsContextCG (stubs for Qt.)
    
    Mask image sizes are dynamically calculated using the passed bounding box in applyMask,
    as it was orignally planned. Gradient stroke mask image sizes aren't hardcoded to 2048x2048
    anymore, but are as well dynamically calculated using getAbsoluteRepaintRect().
    
    Add new ImageBuffer class encapsulating the size of the image, a platform-specific
    handle (ie. CGImageRef for CG platform) plus the GraphicsContext pointer, obtained
    via GraphicsContext::createImageBuffer. Offer a generic logic for rendering subtrees
    of the rendering tree into a ImageBuffer (see renderSubtreeToImage function)
    ImageBufferCG is completly implemented, ImageBufferQt is stubbed.
    
    Also add correct default values for x/y/width/height of <mask>.
    Fixes masking related LayoutTests, and speeds up gradient-on-stroke a lot.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@18315 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    f10700ae