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

Unnecessary usage of thread-local storage on Windows #94

Closed
Osspial opened this issue Nov 26, 2016 · 2 comments
Closed

Unnecessary usage of thread-local storage on Windows #94

Osspial opened this issue Nov 26, 2016 · 2 comments
Labels
C - waiting on author Waiting for a response or another PR D - hard Likely harder than most tasks here DS - windows P - normal Great to have S - enhancement Wouldn't this be the coolest?
Milestone

Comments

@Osspial
Copy link
Contributor

Osspial commented Nov 26, 2016

Currently, the win32 window callback relies on thread-local storage to stash data for the callback function. This isn't necessary - by using the win32 subclassing API, it is possible to pass a user-defined pointer into the window function with the dwRefData parameter in a subclass. By boxing up the callback data and freeing it when the window is destroyed, the use of the thread_local macro can be avoided.

@tomaka tomaka added DS - windows S - enhancement Wouldn't this be the coolest? labels Nov 26, 2016
jrmuizel pushed a commit to jrmuizel/winit that referenced this issue Mar 29, 2017
…ius-servo, r=metajack

cocoa: Add a new platform-specific API that allows library consumers to specify that only the corners of a window can be transparent.

By doing this, we significantly improve performance by allowing the
window server to perform occlusion culling under most of the window.

This patch relies on the private `CGSRegion` and the private
`-[NSCGSWindow setOpaqueRegion:]` APIs.

Requires servo/core-graphics-rs#50 and servo/cocoa-rs#129.

r? @metajack

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/glutin/94)
<!-- Reviewable:end -->
@francesca64 francesca64 added C - waiting on author Waiting for a response or another PR D - hard Likely harder than most tasks here P - normal Great to have labels May 6, 2018
@francesca64 francesca64 added this to the EventsLoop 2.0 milestone May 6, 2018
@Osspial Osspial closed this as completed Apr 24, 2019
@goddessfreya
Copy link
Contributor

Did this get solved or was it decided against? The commit that references this issue doesn't appear at a glance to solve it.

@Osspial
Copy link
Contributor Author

Osspial commented Apr 25, 2019

This was fixed by the EventLoop 2.0 rework.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C - waiting on author Waiting for a response or another PR D - hard Likely harder than most tasks here DS - windows P - normal Great to have S - enhancement Wouldn't this be the coolest?
Development

No branches or pull requests

4 participants