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

Implement the CSS `filter` property. #25

Merged
merged 1 commit into from Oct 15, 2015
Merged

Implement the CSS `filter` property. #25

merged 1 commit into from Oct 15, 2015

Conversation

@pcwalton
Copy link
Collaborator

pcwalton commented Oct 14, 2015

The mechanism is largely the same as for mix-blend-mode.

Known issues:

  • drop-shadow is unimplemented.
  • blur does not properly blur the edges.

Both issues stem from the fact that we do not yet inflate bounding boxes for
filters and mix-blend-mode.

@@ -328,6 +329,12 @@ impl Scene {
debug_assert!(self.render_target_stack.len() == 0);
self.pipeline_epoch_map.clear();

println!("reset");

This comment has been minimized.

@glennw

glennw Oct 14, 2015

Member

remove

@@ -579,7 +634,7 @@ impl Scene {
// push all visible draw lists into aabb tree
for (draw_list_index, flat_draw_list) in self.flat_draw_lists.iter_mut().enumerate() {
for (item_index, item) in flat_draw_list.draw_list.items.iter_mut().enumerate() {
assert!(item.node_index.is_none());
//assert!(item.node_index.is_none());

This comment has been minimized.

@glennw

glennw Oct 14, 2015

Member

Let's uncomment this - I'll fix it when I see it occur next

CompositionOp::Filter(LowLevelFilterOp::Grayscale(_)) |
CompositionOp::Filter(LowLevelFilterOp::HueRotate(_)) |
CompositionOp::Filter(LowLevelFilterOp::Invert(_)) |
CompositionOp::Filter(LowLevelFilterOp::Opacity(_)) |

This comment has been minimized.

@glennw

glennw Oct 14, 2015

Member

Can't opacity (and perhaps some of the others) be done without grabbing the framebuffer, just as a normal opengl blend op?

(We can still merge it if that's the case - but let's add a TODO noting that there is an optimization available for some of these modes to use the fixed function blend ops).

The mechanism is largely the same as for `mix-blend-mode`.

Known issues:

* `drop-shadow` is unimplemented.

* `blur` does not properly blur the edges.

Both issues stem from the fact that we do not yet inflate bounding boxes for
filters and `mix-blend-mode`.
@pcwalton pcwalton force-pushed the pcwalton:filters branch from adb671c to 34f7c79 Oct 15, 2015
@pcwalton
Copy link
Collaborator Author

pcwalton commented Oct 15, 2015

Updated per comments. r? @glennw

glennw added a commit that referenced this pull request Oct 15, 2015
Implement the CSS `filter` property.
@glennw glennw merged commit 20c5d2a into servo:master Oct 15, 2015
nox pushed a commit to nox/webrender that referenced this pull request Aug 6, 2016
webgl: Derive Debug on most types

This will allow us creating more useful error messages.
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.