diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2024-12-03 18:58:24 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-03 18:58:24 +0000 |
| commit | 320144ae7288fe23686935ebb235d9fe0c900862 (patch) | |
| tree | 351b04e228926f98c12c340284c25450bb1fed4f /src/protocols/SinglePixel.cpp | |
| parent | 92186898c0ca1b3f72922b72c4af1723f0d9b888 (diff) | |
core: move colorspace handling to oklab (#8635)
* Meson: add hyprgraphics
* Nix: add hyprgraphics
* CI/setup_base: get hyprgraphics-git
---------
Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
Diffstat (limited to 'src/protocols/SinglePixel.cpp')
| -rw-r--r-- | src/protocols/SinglePixel.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/protocols/SinglePixel.cpp b/src/protocols/SinglePixel.cpp index d800539d..41771ce2 100644 --- a/src/protocols/SinglePixel.cpp +++ b/src/protocols/SinglePixel.cpp @@ -2,7 +2,7 @@ #include <limits> #include "render/Renderer.hpp" -CSinglePixelBuffer::CSinglePixelBuffer(uint32_t id, wl_client* client, CColor col_) { +CSinglePixelBuffer::CSinglePixelBuffer(uint32_t id, wl_client* client, CHyprColor col_) { LOGM(LOG, "New single-pixel buffer with color 0x{:x}", col_.getAsHex()); color = col_.getAsHex(); @@ -59,7 +59,7 @@ bool CSinglePixelBuffer::good() { return resource->good(); } -CSinglePixelBufferResource::CSinglePixelBufferResource(uint32_t id, wl_client* client, CColor color) { +CSinglePixelBufferResource::CSinglePixelBufferResource(uint32_t id, wl_client* client, CHyprColor color) { buffer = makeShared<CSinglePixelBuffer>(id, client, color); if (!buffer->good()) @@ -89,8 +89,8 @@ CSinglePixelBufferManagerResource::CSinglePixelBufferManagerResource(SP<CWpSingl resource->setOnDestroy([this](CWpSinglePixelBufferManagerV1* r) { PROTO::singlePixel->destroyResource(this); }); resource->setCreateU32RgbaBuffer([this](CWpSinglePixelBufferManagerV1* res, uint32_t id, uint32_t r, uint32_t g, uint32_t b, uint32_t a) { - CColor color{r / (float)std::numeric_limits<uint32_t>::max(), g / (float)std::numeric_limits<uint32_t>::max(), b / (float)std::numeric_limits<uint32_t>::max(), - a / (float)std::numeric_limits<uint32_t>::max()}; + CHyprColor color{r / (float)std::numeric_limits<uint32_t>::max(), g / (float)std::numeric_limits<uint32_t>::max(), b / (float)std::numeric_limits<uint32_t>::max(), + a / (float)std::numeric_limits<uint32_t>::max()}; const auto RESOURCE = PROTO::singlePixel->m_vBuffers.emplace_back(makeShared<CSinglePixelBufferResource>(id, resource->client(), color)); if (!RESOURCE->good()) { |
