hrev50028 adds 1 changeset to branch 'master'
old head: cf78be3fd1510b675be82e4f19e1930d865ffc29
new head: 0ccd1db15c42a5d38d1609be2668f87fc6f5f2c6
overview:
http://cgit.haiku-os.org/haiku/log/?qt=range&q=0ccd1db15c42+%5Ecf78be3fd151
----------------------------------------------------------------------------
0ccd1db15c42: app_server: fix lines which are pixel dots, in layers
* Painter::StrokeLine() has an optimization for lines which are
single pixel dots, i.e. identical start and end point and pen
size 1: it sets the pixel directly in the buffer, completely
bypassing the AGG base renderer.
This is a problem when inside a layer since this also bypasses
the low-level offset in the base renderer (which moves drawing
coordinates into the layer bitmap), causing an out-of-bounds
access.
* Fixes #12587
[ Julian Harnath <julian.harnath@xxxxxxxxxxxxxx> ]
----------------------------------------------------------------------------
Revision: hrev50028
Commit: 0ccd1db15c42a5d38d1609be2668f87fc6f5f2c6
URL: http://cgit.haiku-os.org/haiku/commit/?id=0ccd1db15c42
Author: Julian Harnath <julian.harnath@xxxxxxxxxxxxxx>
Date: Wed Jan 13 22:50:31 2016 UTC
Ticket: https://dev.haiku-os.org/ticket/12587
----------------------------------------------------------------------------
1 file changed, 4 insertions(+), 1 deletion(-)
src/servers/app/drawing/Painter/Painter.cpp | 5 ++++-
----------------------------------------------------------------------------
diff --git a/src/servers/app/drawing/Painter/Painter.cpp
b/src/servers/app/drawing/Painter/Painter.cpp
index e382b8d..845e7e3 100644
--- a/src/servers/app/drawing/Painter/Painter.cpp
+++ b/src/servers/app/drawing/Painter/Painter.cpp
@@ -510,7 +510,10 @@ Painter::StrokeLine(BPoint a, BPoint b)
// special case dots
if (fPenSize == 1.0 && !fSubpixelPrecise && fIdentityTransform)
{
if (fClippingRegion->Contains(a)) {
- fPixelFormat.blend_pixel((int)a.x, (int)a.y,
fRenderer.color(),
+ int dotX = (int)a.x;
+ int dotY = (int)a.y;
+ fBaseRenderer.translate_to_base_ren(dotX, dotY);
+ fPixelFormat.blend_pixel(dotX, dotY,
fRenderer.color(),
255);
}
} else {