Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch box-shadows to use brush masks (and add basic brush prim). #1841

Merged
merged 1 commit into from Oct 17, 2017

Commits on Oct 17, 2017

  1. Switch box-shadows to use brush masks (and add basic brush prim).

    This introduces a new brush primitive type. Right now, this is
    extremely basic and doesn't provide much new functionality. As
    more items are ported to use it, the functionality of the brush
    shader type will expand (mostly the VS parts).
    
    The major change in this patch is to remove the old box-shadow
    shader and switch box shadows to be drawn via a brush mask +
    gaussian blur approach.
    
    This *is* a performance regression for small / simple box shadows
    compared to previously, but this is only temporary. The goal of
    this (large) patch is to switch over to a different box-shadow
    technique and address correctness issues first, and then we can
    apply a number of optimizations on top of that. It *is* a performance
    win on very large box shadows, which was the performance worst
    case for the previous box shadow shader.
    
    The changes included:
     * Extend blur shader to support both A8 and RGBA8 blurs.
     * Basic brush shader and primitive code.
     * Brush mask shader.
     * Remove old box shadow shader.
     * Move some common clip functions to ellipse.glsl.
     * Extend cache image shader to support both A8 and RGBA8 sources.
     * Support clip masks in cache image shader.
     * Remove box shadow primitive type.
     * Add reftests for spread, offset, blur, border radius box-shadow variations.
     * Support adjusting the border radii of box shadows as defined by spec.
    
    Next steps:
     * Extend the mask shader to support arbitrary border radii per corner.
     * Apply various optimizations to the brush and blur code.
    gw3583 committed Oct 17, 2017
You can’t perform that action at this time.