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

Rendering improvements #1038

Merged
merged 4 commits into from
Oct 6, 2017
Merged

Rendering improvements #1038

merged 4 commits into from
Oct 6, 2017

Conversation

Tyriar
Copy link
Member

@Tyriar Tyriar commented Oct 6, 2017

Fixes #1032
Fixes #1031
Fixes #1035
Fixes #1036
Fixes #1032
Fixes #1037


See individual commits for what was actually done. It turns out drawing the entire line like this is fairly fast, typically ranging from 0.5ms to 4ms on my macbook. The boost in stability/accuracy that this change brings is a must for now. It would be good to go back to intelligently diffing before drawing eventually (when we're certain the characters aren't overlapping).

@Tyriar Tyriar added this to the 3.0.0 milestone Oct 6, 2017
@Tyriar Tyriar self-assigned this Oct 6, 2017
@Tyriar Tyriar requested a review from mofux October 6, 2017 06:30
@coveralls
Copy link

coveralls commented Oct 6, 2017

Coverage Status

Coverage decreased (-0.2%) to 69.823% when pulling 06b9f1d on Tyriar:rendering_improvements into 22af08d on sourcelair:v3.

Tyriar added a commit to microsoft/vscode that referenced this pull request Oct 6, 2017
@Tyriar Tyriar merged commit 265057a into xtermjs:v3 Oct 6, 2017
@Tyriar Tyriar deleted the rendering_improvements branch October 6, 2017 16:09
@mofux mofux mentioned this pull request Oct 10, 2017
@@ -107,4 +107,17 @@ export class ColorManager implements IColorManager {
this.colors.ansi[14] = theme.brightCyan || DEFAULT_ANSI_COLORS[14];
this.colors.ansi[15] = theme.brightWhite || DEFAULT_ANSI_COLORS[15];
}

private _validateColor(color: string, fallback: string): string {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this mean that theme.background can only be a hex color, not rgb(a) - because otherwise it would just use the fallback color?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does for background, validate could be changed to accommodate rgb/rgba/etc. though.

This was needed to be able to do this:

 +    const r = parseInt(background.substr(1, 2), 16);
 +    const g = parseInt(background.substr(3, 2), 16);
 +    const b = parseInt(background.substr(5, 2), 16);

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

Successfully merging this pull request may close these issues.

None yet

4 participants