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

Refactor TextRenderBox #485

Merged
merged 1 commit into from May 27, 2013
Merged

Refactor TextRenderBox #485

merged 1 commit into from May 27, 2013

Conversation

@jjjjw
Copy link
Contributor

jjjjw commented May 26, 2013

This removes the TextBoxData struct and places its properties directly on the TextRenderBox.

It also removes the font_size property from RenderBox's, in the thinking that this should be (and is) managed by stylers.

…ox's style handle font size
@burg

This comment has been minimized.

Copy link

burg commented on 5c8c776 May 27, 2013

LGTM. r+

This comment has been minimized.

Copy link

jdm replied May 27, 2013

r+

@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo commented on 5c8c776 May 27, 2013

saw approval from jdm
at jjjjw@5c8c776

This comment has been minimized.

Copy link
Contributor

bors-servo replied May 27, 2013

merging oncemoreification/servo/refactor_TextRenderBox = 5c8c776 into auto

This comment has been minimized.

Copy link
Contributor

bors-servo replied May 27, 2013

oncemoreification/servo/refactor_TextRenderBox = 5c8c776 merged ok, testing candidate = 8f33dfa

This comment has been minimized.

This comment has been minimized.

Copy link
Contributor

bors-servo replied May 27, 2013

fast-forwarding master to auto = 8f33dfa

bors-servo pushed a commit that referenced this pull request May 27, 2013
…r=jdm

This removes the TextBoxData struct and places its properties directly on the TextRenderBox. 

It also removes the font_size property from RenderBox's, in the thinking that this should be (and is) managed by stylers.
@bors-servo bors-servo merged commit 5c8c776 into servo:master May 27, 2013
1 check passed
1 check passed
default all tests passed
glennw pushed a commit to glennw/servo that referenced this pull request Jan 16, 2017
Add framework for dynamic/cache render tasks, and use for box shadows.

This adds the framework for tiles and primitives to add dependent
render tasks. The proof of concept in this patch uses them to
speed up box shadow rendering, but the dynamic render tasks can
be used for many things in the future. For example, we can use
this system to render rotated clip masks, or cache text runs
to a texture.

The box shadows are rendered by adding a child task that draws the
upper left corner of a box shadow. The primitive shader for box
shadows then applies this rendered patch over the box shadow by
clamping and mirroring the texture coordinates in the fragment
shader.

Dynamic render tasks are added to passes via a cache key that is
defined based on the type of item being cached. This means that
dynamic render tasks are du-duplicated during allocation and
assignment to render passes and targets. This means that if different
tiles require the same cache primitive, it will only get rendered
once. It also means that if two primitive exist that require the
same resource type (e.g. two box shadows with different colors but
same size and blur radius) then the cache item will only be drawn
once to the child render target.

With this change, GPU time on transparent_rects demo drops from
16ms down to 9ms on my test setup.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/485)
<!-- Reviewable:end -->
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

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