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

Partially fix blur filters. #119

Merged
merged 1 commit into from Dec 23, 2015
Merged

Partially fix blur filters. #119

merged 1 commit into from Dec 23, 2015

Conversation

@pcwalton
Copy link
Collaborator

pcwalton commented Dec 23, 2015

  • The temporary framebuffer texture is now unused, since we use separate
    render targets instead of readback. This patch removes it.
  • We now write the texture sizes into the mask UV coordinates properly.
  • We allow composite filters to inflate the dimensions of their render
    targets. This means that blurs can draw outside their rects.

Remaining issues:

  • Blur filters need to not read outside of the render target in the
    atlas.
  • The vertical blur needs to blur the render target that the horizontal
    blur wrote to rather than the original render target.
@pcwalton pcwalton force-pushed the pcwalton:partial-blur-fix branch from 0772ba5 to c4658da Dec 23, 2015
@pcwalton
Copy link
Collaborator Author

pcwalton commented Dec 23, 2015

I'd be interested to know what you think the best solution for the second problem here is. A blur essentially needs to result in the creation of two nested render targets. At first I just tried to special case this in the composite batching code (creating a second render target for a blur) but that seemed inelegant, especially since we'll probably want to be able to batch them (i.e. blur many elements horizontally, then blur many elements vertically). So I figured it'd be better to hook this into the layers/render target infrastructure somehow—essentially to create two nested render targets for each blur. Thoughts on that?

* Blur filters do not need a temporary framebuffer. (Nor do any other
  filters.)

* We now write the texture sizes into the mask UV coordinates properly.

* We allow composite filters to inflate the dimensions of their render
  targets. This means that blurs can draw outside their rects.

Remaining issues:

* Blur filters need to not read outside of the render target in the
  atlas.

* The vertical blur needs to blur the render target that the horizontal
  blur wrote to rather than the original render target.
@pcwalton pcwalton force-pushed the pcwalton:partial-blur-fix branch from c4658da to 54d86b4 Dec 23, 2015
@pcwalton
Copy link
Collaborator Author

pcwalton commented Dec 23, 2015

@glennw Fixed mix-blend-mode.

glennw added a commit that referenced this pull request Dec 23, 2015
@glennw glennw merged commit 825c6de into servo:master Dec 23, 2015
@glennw
Copy link
Member

glennw commented Dec 23, 2015

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.