Safari's older Gamepad API exposes `vibrationActuator` with `playEffect`
and `reset` but no `effects` enumeration array. The probe added in
651136ac7 dereferences `vibrationActuator['effects']['includes']`
unconditionally, throwing `TypeError: undefined is not an object` on
every Safari client that opens a connected gamepad. Add the missing
`['effects']` null check so the probe returns false on Safari instead
of aborting.
(cherry picked from commit db7ac820f9)
start/end should be FriBidiStrIndex here -- using FriBidiLevel makes
them `signed char` and the loop here will become infinite if `end` is
> 127.
(cherry picked from commit 0ffb0bdd87)
This fixes a UBSAN warning later in this function where it calculates
(1 << SDL_BITSPERPIXEL(surface->format)). The bpp might be >= 32 and
out of range for a bit shift.
(cherry picked from commit d5af35e3fb)
Because the blend mode is explicitly set to SDL_BLENDMODE_NONE, it doesn't matter if there's a transparency channel in the texture format or not for opaque windows. This ensures that a 32-bit format is used with Metal instead of SDL_PIXELFORMAT_RGB565.
(cherry picked from commit b1f390255a)
This fixes faults when loading from read-only memory and avoids
cache line bouncing across cores which reduces performance.
(cherry picked from commit 7439a94ed2)
Now this keeps one FBO for each SDL_TEXTUREACCESS_TARGET texture, and doesn't
reuse it. We check if the FBO is "complete" once, at creation time, and
setting a render target merely has to bind the right FBO and never look back.
This simplifies the code and removes a guaranteed pipeline stall when setting
a new render target.
Fixes#15524.
(cherry picked from commit 56e0d052f1)
Some compositors may dispatch this too early, during the initial empty commit, when subsurfaces are attached to a toplevel window, but a buffer has yet to be committed to the parent surface. Don't set the frame callback until the initial empty commit is done, so it will be called when the actual parent surface frame is committed.
(cherry picked from commit e3393e6304)
Some compositors send the frame callback as part of the initial configuration sequence, so the window may already be past the "waiting for frame" state. Ensure that the exposure event is always sent.
(cherry picked from commit 1ac0ae9224)
Under the right conditions, this extension can result is smoother resizing when rendering with OpenGL, however, it is known to cause problems in certain cases, such as when handling presentation externally.
Gate it behind a hint, and disable it by default. Developers can selectively enable it when they verify that they meet the criteria for using it, and that it behaves correctly in their apps/games.
(cherry picked from commit b8545fce54)
If the cursor was created with a temporary surface that was pointing at external memory, then when the cursor is used it might be referencing memory that had already been freed.
(cherry picked from commit f6f4664ed1)