diff options
author | Yoann Lopes <yoann.lopes@nokia.com> | 2010-09-23 10:36:42 (GMT) |
---|---|---|
committer | Yoann Lopes <yoann.lopes@nokia.com> | 2010-09-23 10:55:21 (GMT) |
commit | 992809f9ba91c50bc759508127b493172236c149 (patch) | |
tree | 348f84f3e73c65f95592a0d267a0a97943567f1d /src/gui/painting | |
parent | d1817df87461fc071527eb77d3c1259e713b94a4 (diff) | |
download | Qt-992809f9ba91c50bc759508127b493172236c149.zip Qt-992809f9ba91c50bc759508127b493172236c149.tar.gz Qt-992809f9ba91c50bc759508127b493172236c149.tar.bz2 |
Fixes gray_raster incorrectly reporting out of memory error.
The bug caused a useless realloction everytime a path was rasterized
with gray_raster.
Task-number: QTBUG-13871
Reviewed-by: Samuel
Diffstat (limited to 'src/gui/painting')
-rw-r--r-- | src/gui/painting/qgrayraster.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/painting/qgrayraster.c b/src/gui/painting/qgrayraster.c index 94039fb..19cef49 100644 --- a/src/gui/painting/qgrayraster.c +++ b/src/gui/painting/qgrayraster.c @@ -324,6 +324,7 @@ { void* buffer; long buffer_size; + long buffer_allocated_size; int band_size; void* memory; PWorker worker; @@ -1767,7 +1768,7 @@ // If raster object and raster buffer are allocated, but // raster size isn't of the minimum size, indicate out of // memory. - if (raster && raster->buffer && raster->buffer_size < MINIMUM_POOL_SIZE ) + if (raster->buffer_allocated_size < MINIMUM_POOL_SIZE ) return ErrRaster_OutOfMemory; /* return immediately if the outline is empty */ @@ -1906,6 +1907,7 @@ rast->buffer_size = 0; rast->worker = NULL; } + rast->buffer_allocated_size = pool_size; } } |