cache optimized rectangle drawing and made sure the methods could be inlined

This commit is contained in:
2026-07-08 13:33:43 -07:00
parent 85cfdaab49
commit 04afd9eee0
9 changed files with 143 additions and 36 deletions
+4 -4
View File
@@ -5,10 +5,10 @@
#include "datatypes.cpp"
#include "helpers.cpp"
#include "shaders/shader.cpp"
#include "shaders/colorshader.cpp"
// #include "shaders/colorshader.cpp"
// #include "shaders/gradientshader.cpp"
#include "shaders/hgradientshader.cpp"
#include "shaders/vgradientshader.cpp"
// #include "shaders/hgradientshader.cpp"
// #include "shaders/vgradientshader.cpp"
namespace UwU {
// Buffer object - can be a wayland surface or a virtual buffer
@@ -34,7 +34,7 @@ namespace UwU {
uint16_t stride;
void drawPixel(Coord2 coord, Color color) {
if (color.a == 0) {return;}
// if (color.a == 0) {return;}
size_t i = (size_t)coord.y * stride + (size_t)coord.x * 4;
// uint8_t b0 = pixels[i + 0];
// uint8_t g0 = pixels[i + 1];