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

Tidy up picture/brush code in preparation for box shadow optimizations. #1947

Merged
merged 1 commit into from Oct 27, 2017

Commits on Oct 26, 2017

  1. Tidy up picture/brush code in preparation for box shadow optimizations.

    There was some confusing code in the existing text shadow implementation
    that was making it difficult to optimize the box shadows to use sub-parts
    of a picture image. Specifically, in the cs_text_run and ps_line shader,
    we were fetching the owning Picture primitive. Instead, now the following
    conventions are observed:
    
    * When drawing *on* a picture, fetch the picture render task and the
      specific primitive only. This should have all information to draw
      on to a picture task.
    * When *compositing* a picture into the scene, fetch the picture
      render task for sampling information (e.g. UV rect, color mask),
      and the picture primitive for geometry information.
    
    In the second case, we don't currently need to fetch the picture
    primitive, since it's always just the entire primitive local rect.
    However, with the upcoming box shadow optimizations, this will
    typically be sub-parts or a 9-patch of the picture image.
    
    Importantly, this also decouples the geometry of the picture to be drawn
    from the geometry of the picture render task. This will allow box
    shadow optimizations such as rendering just a corner of the box
    shadow when uniform radii are present, and mirroring the blur task
    using brush segments.
    gw3583 committed Oct 26, 2017
You can’t perform that action at this time.