summaryrefslogtreecommitdiff
path: root/src/lib/ector
diff options
context:
space:
mode:
authorHermet Park <hermetpark@gmail.com>2019-09-04 19:56:57 +0900
committerHermet Park <hermetpark@gmail.com>2019-09-04 20:03:05 +0900
commitf90c8b8910bd5c5303db143c9926a208a6bd114b (patch)
treeaeaec50708890f9033b1b990c9f1d58a91e0991e /src/lib/ector
parentd61cf9df73083c01b9565e434b58c8822c404646 (diff)
ector: fix a wrong target buffer size.
the target buffer is allocated by backend engine, The buffer size must be specified with the stride, not the width. It's real dimension can be different with the our request.
Diffstat (limited to 'src/lib/ector')
-rw-r--r--src/lib/ector/software/ector_software_rasterizer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/ector/software/ector_software_rasterizer.c b/src/lib/ector/software/ector_software_rasterizer.c
index 62c3eac..399b449 100644
--- a/src/lib/ector/software/ector_software_rasterizer.c
+++ b/src/lib/ector/software/ector_software_rasterizer.c
@@ -316,7 +316,7 @@ _blend_gradient_alpha(int count, const SW_FT_Span *spans, void *user_data)
316 316
317 while (count--) 317 while (count--)
318 { 318 {
319 uint32_t *target = buffer + ((sd->raster_buffer->generic->w * spans->y) + spans->x); 319 uint32_t *target = buffer + ((pix_stride * spans->y) + spans->x);
320 uint32_t *mtarget = mbuffer + ((mask->generic->w * spans->y) + spans->x); 320 uint32_t *mtarget = mbuffer + ((mask->generic->w * spans->y) + spans->x);
321 int length = spans->len; 321 int length = spans->len;
322 322
@@ -364,7 +364,7 @@ _blend_gradient_alpha_inv(int count, const SW_FT_Span *spans, void *user_data)
364 364
365 while (count--) 365 while (count--)
366 { 366 {
367 uint32_t *target = buffer + ((sd->raster_buffer->generic->w * spans->y) + spans->x); 367 uint32_t *target = buffer + ((pix_stride * spans->y) + spans->x);
368 uint32_t *mtarget = mbuffer + ((mask->generic->w * spans->y) + spans->x); 368 uint32_t *mtarget = mbuffer + ((mask->generic->w * spans->y) + spans->x);
369 int length = spans->len; 369 int length = spans->len;
370 370