mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-02 22:30:13 +02:00
[N-Gage] Correct SDL_FLIP_HORIZONTAL for sprite sheet textures - ApplyFlip: swap toward midpoint when dest == source to avoid overwriting pixels before they are read - CopyEx: restore original bitmap pixels after BitBlt so the texture is not permanently mutated across frames - CopyEx: extract srcrect sub-region before transforming so flip/ rotate/scale operate on the correct pixels, not the full texture [N-Gage] Use scratch bitmap in CopyEx to avoid mutating source texture. Replace the write-then-restore pattern on the source texture with a persistent iScratchBitmap. The transform pipeline operates entirely within iPixelBufferA/B; the final result is copied into iScratchBitmap and BitBlt reads from there. The source texture is never written to. [N-Gage] Fix Copy() for render-target textures by using direct BitBlt Bypass pixel readback for SDL_TEXTUREACCESS_TARGET textures in CRenderer::Copy(). Reading raw pixels via DataAddress() on a server-side bitmap is unreliable; use BitBlt directly instead. [N-Gage] Implement color-key masking using Symbian's BitBltMasked. This implementation works fine, but relies on a platform specific property. This isn't ideal. Todo: Add SDL_PIXELFORMAT_ARGB4444 to the N-Gage's rendering back-end. [N-Gage] Avoid using BitBltMasked to improve performance. Much better! Write only non-color-key source pixels directly into the destination bitmap preserving existing destination pixels wherever the color key matches. This replaces BitBltMasked and avoids the cost of building an EGray2 mask. [N-Gage] Remove redundant function call since we're not using BitBltMasked() anymore. [N-Gage] Remove SDL_PROP_TEXTURE_NGAGE_COLOR_KEY_NUMBER - Promote SDL_PIXELFORMAT_XRGB4444 to SDL_PIXELFORMAT_ARGB4444 instead. - Remove now unused functions.