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

Change drop-shadows to be drawn via a single primitive. #2656

Merged
merged 1 commit into from Apr 13, 2018

Commits on Apr 13, 2018

  1. Change drop-shadows to be drawn via a single primitive.

    Previously, drop-shadows were a Picture, with two brush image
    primitives, each referencing the picture (one for the content,
    one for the shadow with an offset).
    
    Although conceptually reasonable, this exposes some problems
    with the way the current prim_store visibility pass works.
    Specifically, we can end up processing the picture more than
    once. In general this is an inefficiency but doesn't affect
    correctness, but it breaks some assumptions once the content
    of the drop-shadow element is an item in the render task cache.
    
    In the future, this problem should disappear as we refactor
    how the visibility pass operates, but for now the simplest solution
    is to draw the drop-shadow with a single primitive. To make this
    work, there are a couple of hacks in this patch, which
    push an extra brush image primitive into the GPU cache data.
    
    The drop shadows still have an issue with the shadow disappearing
    if the content of the drop shadow is off-screen, however this is
    no worse than the existing code. Doing it this way actually makes
    it easier to fix this is the future too.
    gw3583 committed Apr 13, 2018
You can’t perform that action at this time.