90b30dc00de3e8a2ba3bec2bc7bd10daef042dff |
18-Dec-2012 |
Jesse Hall <jessehall@google.com> |
Fix assumption that pixel alpha is in upper 8 bits QZ_SetPortAlphaOpaque() now retrieves the mask for the alpha channel from the surface pixel format instead of assuming the alpha component is the upper 8 bits of the pixel. NOTE: I doubt this function is even still needed. There's a comment saying that the un-miniaturization animation overrides the window's alpha components, which shouldn't be true on any OpenGL-based window compositor system (i.e. any but the oldest OSX versions). If I make the function a no-op, everything still works fine on my system. But just in case, and since this is in upstream SDL code, I'm leaving it there and fixing it instead of just removing it. Bug: 38913 Change-Id: I15aa1e93c60590ba9f17f7625e55325ec8a36520
uartz/SDL_QuartzWindow.m
|
6f5e132ea50c752390095001aa2d1d9a805fa92d |
15-Dec-2012 |
Jesse Hall <jessehall@google.com> |
Don't show the window until it's configured On OSX, the window was being shown as soon as it was created, before adding views, adjusting its position, etc. Crucially, this is before SDL has set up the internal state it needs to draw to the window. When adjusting the window position, if the new position is not on the default display, the NSWindow will attempt to redraw (since it had to reallocate resources and lost any prior image). SDL crashes when this happens because it still only has partial state. This change defers showing the window until it's configured and all the necessary state has been set up. The calls to show the window at the right time were already there, just redundant. Bug: 40556 Change-Id: I272a12f260bd71d271a03a0f74b698ecc5e498f3
uartz/SDL_QuartzVideo.m
|