diff --git a/src/render/software/CanvasPreview.cpp b/src/render/software/CanvasPreview.cpp index 61b63ef..e37b41d 100644 --- a/src/render/software/CanvasPreview.cpp +++ b/src/render/software/CanvasPreview.cpp @@ -3,6 +3,7 @@ #include "Color.h" #include "CanvasLiveClient.h" #include "Mutex.h" +#include "ColorProfile.h" #include @@ -18,12 +19,14 @@ CanvasPreview::CanvasPreview() dirty_up = -1; lock = new Mutex(); + profile = new ColorProfile(); } CanvasPreview::~CanvasPreview() { delete [] pixels; delete lock; + delete profile; } void CanvasPreview::setSize(int real_width, int real_height, int preview_width, int preview_height) @@ -77,7 +80,7 @@ void CanvasPreview::updateLive(CanvasLiveClient *client) { for (x = dirty_left; x <= dirty_right; x++) { - client->canvasPainted(x, y, pixels[y * width + x]); + client->canvasPainted(x, y, profile->apply(pixels[y * width + x])); } } diff --git a/src/render/software/CanvasPreview.h b/src/render/software/CanvasPreview.h index e6607d3..35ef00a 100644 --- a/src/render/software/CanvasPreview.h +++ b/src/render/software/CanvasPreview.h @@ -36,6 +36,8 @@ private: int width; int height; + ColorProfile *profile; + int dirty_left; int dirty_right; int dirty_down; diff --git a/src/render/software/Rasterizer.cpp b/src/render/software/Rasterizer.cpp index 43e4b57..009d984 100644 --- a/src/render/software/Rasterizer.cpp +++ b/src/render/software/Rasterizer.cpp @@ -339,7 +339,7 @@ void Rasterizer::renderScanLines(CanvasPortion *canvas, RenderScanlines* scanlin Color frag_color = *color; if (cury == starty || cury == endy) { - frag_color.mask(Color(0.0, 0.0, 0.0, 0.1)); + frag_color.mask(Color(0.0, 0.0, 0.0, 0.3)); } fragment.setColor(frag_color);