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

Fix the API of glyph_dimensions to make webrender compile on Windows #81

Merged
merged 2 commits into from Apr 27, 2018

Conversation

@fschutt
Copy link
Contributor

fschutt commented Apr 13, 2018

See servo/webrender#2645 - this fixes 2 of the 6 errors I get when compiling webrender on Windows.

I decided to use the same API that is used for Mac & Linux builds, with the extra exact parameter and returning an Error instead of an Option. Maybe it would be a good idea to change it back to Option instead of Err<()>, but then please change it in all 3 APIs.

@fschutt
Copy link
Contributor Author

fschutt commented Apr 13, 2018

The Windows PathfinderFontContext was missing the add_native_font function. I've simply copied + adapted the function from the Mac version + exported the necessary types (so that in webrender we can have a Into<PathfinderComPtr<IDWriteFontFace>> (similar to the current Mac interface).

This fixes another error of servo/webrender#2645.

@fschutt
Copy link
Contributor Author

fschutt commented Apr 15, 2018

@pcwalton I made the API more or less like the Mac version, I hope it's ok to do this.

@pcwalton pcwalton merged commit 2701757 into servo:master Apr 27, 2018
@pcwalton
Copy link
Collaborator

pcwalton commented Apr 27, 2018

Merged, sorry for the delay! Thanks!

bors-servo referenced this pull request in servo/webrender May 1, 2018
Fix From conversion from NativeFontHandleWrapper to PathfinderComPtr

See https://github.com/pcwalton/pathfinder/pull/81 and #2645 - this fixes 1 compile error, where we can't convert from a NativeFontHandleWrapper to a ComPtr. We need this, so that PathfinderFontContext::add_native_font() works correctly.

<!-- 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/2705)
<!-- 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

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