Skip to content

Conversation

@changm
Copy link
Contributor

@changm changm commented Jan 27, 2017

Depends on #795 (comment)

The only real changes here are in webrender/src/platform/windows/font.rs


This change is Reviewable

@changm changm requested review from kvark and vvuk January 27, 2017 22:15
@vvuk
Copy link
Contributor

vvuk commented Jan 28, 2017

Why is the subpixel offset not part of GlyphOptions? That's already part of the hash key, no?

@changm
Copy link
Contributor Author

changm commented Jan 28, 2017

It's part of the GlyphKey but not the GlyphOptions. GlyphOptions are force gdi rendering and embedded bitmaps.

@vvuk
Copy link
Contributor

vvuk commented Jan 28, 2017 via email

@changm
Copy link
Contributor Author

changm commented Jan 28, 2017

Err sorry. It's constant per glyph run. When it's looked up in the RenderedGlyphKey, it's being cached with the glyph options. But the GlyphKey, also has the subpixel offsets, so the cache won't hit if it's not being quantized to the same subpixel offset.

@bors-servo
Copy link
Contributor

☔ The latest upstream changes (presumably #790) made this pull request unmergeable. Please resolve the merge conflicts.

@glennw
Copy link
Member

glennw commented Jan 30, 2017

Needs rebasing.

@changm
Copy link
Contributor Author

changm commented Jan 30, 2017

Rebased.

@changm
Copy link
Contributor Author

changm commented Jan 30, 2017

@bors-servo retry

I think this is actually passing. I see this same travis-ci error in a couple of PRs and this PR didn't touch wrench at all. It doesn't even seem to run on windows?

@glennw
Copy link
Member

glennw commented Jan 30, 2017

Yup, that CI failure is an intermittent which should be fixed by #807

@glennw
Copy link
Member

glennw commented Jan 31, 2017

@vvuk Could you take a look over this?

Copy link
Member

@glennw glennw left a comment

Choose a reason for hiding this comment

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

Let's get this merged, since it's blocking other PRs.

// XX use the xform to handle subpixel positioning (what skia does), I believe that keeps
//let xform = dwrote::DWRITE_MATRIX { m11: 1.0, m12: 0.0, m21: 0.0, m22: 1.0, dx: 0.0, dy: 0.0 };
dwrote::GlyphRunAnalysis::create(&glyph_run, 1.0, None,
let x_offset: f32 = Into::<f64>::into(x_suboffset) as f32;
Copy link
Member

Choose a reason for hiding this comment

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

This seems a bit over complicated - perhaps convert it to a local f64 and then cast to f32 when creating the matrix or something like that. Can be done as a follow up anyway, it's not major.

@glennw
Copy link
Member

glennw commented Jan 31, 2017

@bors-servo r+

@bors-servo
Copy link
Contributor

📌 Commit 349da8c has been approved by glennw

@bors-servo
Copy link
Contributor

⌛ Testing commit 349da8c with merge 32abc15...

bors-servo pushed a commit that referenced this pull request Feb 1, 2017
Enable subpixel text for dwrite fonts

Depends on #795 (comment)

The only real changes here are in webrender/src/platform/windows/font.rs

<!-- 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/798)
<!-- Reviewable:end -->
@glennw
Copy link
Member

glennw commented Feb 1, 2017

@bors-servo r-

  • travis issues

@glennw
Copy link
Member

glennw commented Feb 1, 2017

@bors-servo r+ force clean

@glennw glennw closed this Feb 1, 2017
@glennw glennw reopened this Feb 1, 2017
@glennw
Copy link
Member

glennw commented Feb 1, 2017

@bors-servo r+

@bors-servo
Copy link
Contributor

📌 Commit 349da8c has been approved by glennw

@bors-servo
Copy link
Contributor

⌛ Testing commit 349da8c with merge 310cd35...

bors-servo pushed a commit that referenced this pull request Feb 1, 2017
Enable subpixel text for dwrite fonts

Depends on #795 (comment)

The only real changes here are in webrender/src/platform/windows/font.rs

<!-- 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/798)
<!-- Reviewable:end -->
@glennw
Copy link
Member

glennw commented Feb 1, 2017

@bors-servo ping

@glennw glennw closed this Feb 2, 2017
@glennw glennw reopened this Feb 2, 2017
@bors-servo
Copy link
Contributor

😪 I'm awake I'm awake

@glennw
Copy link
Member

glennw commented Feb 2, 2017

@bors-servo r+

@bors-servo
Copy link
Contributor

💡 This pull request was already approved, no need to approve it again.

@bors-servo
Copy link
Contributor

📌 Commit 349da8c has been approved by glennw

@bors-servo
Copy link
Contributor

😪 I'm awake I'm awake

@bors-servo
Copy link
Contributor

⌛ Testing commit 349da8c with merge ee3dc78...

bors-servo pushed a commit that referenced this pull request Feb 2, 2017
Enable subpixel text for dwrite fonts

Depends on #795 (comment)

The only real changes here are in webrender/src/platform/windows/font.rs

<!-- 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/798)
<!-- Reviewable:end -->
@glennw glennw closed this Feb 2, 2017
@glennw glennw reopened this Feb 2, 2017
@bors-servo
Copy link
Contributor

😪 I'm awake I'm awake

@glennw
Copy link
Member

glennw commented Feb 2, 2017

I have no idea what's going on with bors / travis etc, but maybe this PR is what's messing it up. I finally convinced travis to try and build this PR, but it fails saying that the git SHA is not a valid reference. Want to close this, and re-open as a new PR and I'll merge it manually first thing in the morning?

@glennw
Copy link
Member

glennw commented Feb 2, 2017

Merging manually due to bors problems, travis passed.

@glennw glennw merged commit 164821f into servo:master Feb 2, 2017
@changm changm deleted the subpixel-dwrite branch February 3, 2017 21:51
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.

5 participants