• senorblanco@chromium.org's avatar
    Implement SkXfermode image filter. This required changing the signature of... · 86fc266e
    senorblanco@chromium.org authored
    Implement SkXfermode image filter. This required changing the signature of SkXfermode::asNewEffectOrCoeffs(), to add an optional background texture.
    
    For the raster path, we do a straightforward 2-pass method: draw background, then composite the foreground over it.
    
    For the GPU path, if the xfermode can be expressed as an effect, we build an effect with the background texture incorporated, then do a single-pass draw fetching both foreground and background textures, and compositing to the result. If the xfermode is expressed as src/dst coefficients, we do a 2-pass draw as in the raster path and use fixed-function blending.
    
    R=bsalomon@google.com, reed@google.com
    
    Review URL: https://codereview.chromium.org/16125008
    
    git-svn-id: http://skia.googlecode.com/svn/trunk@9373 2bbb7eff-a529-9590-31e7-b0007b416f81
    86fc266e
effects.gypi 5.89 KB