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

Fix drop-shadows and remove last use of hardware_composite shader. #2588

Merged
merged 2 commits into from Apr 3, 2018
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Prev

Fix a couple of regressions caused by the previous commit.

1) In picture.rs, the wrong GPU cache handle was being invalidated.
   This was causing visual glitches when scrolling pages with
   drop-shadows present.

2) Fix an edge case that was occurring when the visual content of
   a drop-shadow was scrolled off-screen, but the bounding rect of
   the drop-shadow itself was still partially visible. In this case
   the picture would not get prepare_prim_for_render() called, but
   the drop-shadow brush image would still attempt to draw, which
   would reference an invalid render task in the render task tree.
   Correctly drawing enough of the off-screen visual contents to
   allow correct drawing of the partial shadow will be done as a
   follow up - for now, we will just stop drawing the shadow if
   the main visual contents becomes invisible, which can result
   in a noticeable pop of the shadow in some cases, but is still
   a big improvement on current drop-shadow support. To do this,
   the logic in batch.rs is inverted. Instead of checking for
   an intermediate surface, and then the filter mode, the code
   now checks the filter mode first, followed by the surface. This
   means that in the case above, we can detect that the visual
   contents of the drop shadow were off-screen, and skip trying
   to draw the alpha mask of that as a shadow.
  • Loading branch information
gw3583 committed Apr 3, 2018
commit 6b63b208f5cdc03e0e97e2d38d195ab614029fd3
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.