Files
genode/repos/os/include/spec/arm_64/blit/blit.h
Norman Feske 3909f9b6e4 blit: lift 8x8 restriction from back2front
This patch allows for the use of the back2front operation with textures
that are not a multiple of 8x8 pixels, which makes the utility
compatible with screen resolutions like 1366x768. In such cases, the
implementation falls back to the non-SIMD variant.

Issue #5428
Issue #5501
2025-04-10 14:26:47 +02:00

37 lines
933 B
C++

/*
* \brief Blit API
* \author Norman Feske
* \date 2025-01-16
*/
/*
* Copyright (C) 2025 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
#ifndef _INCLUDE__SPEC__ARM_64__BLIT_H_
#define _INCLUDE__SPEC__ARM_64__BLIT_H_
#include <blit/types.h>
#include <blit/internal/neon.h>
#include <blit/internal/slow.h>
namespace Blit {
static inline void back2front(Surface<Pixel_rgb888> &surface,
Texture<Pixel_rgb888> const &texture,
Rect rect, Rotate rotate, Flip flip)
{
if (divisable_by_8x8(texture.size()))
_b2f<Neon>(surface, texture, rect, rotate, flip);
else
_b2f<Slow>(surface, texture, rect, rotate, flip);
}
static inline void blend_xrgb_a(auto &&... args) { Neon::Blend::xrgb_a(args...); }
}
#endif /* _INCLUDE__SPEC__ARM_64__BLIT_H_ */