Use dynamic memory allocation instead of stack allocation to avoid PPC compiler error.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10109 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -70,7 +70,7 @@ void HalftonePreviewView::preview(float gamma, float min, Halftone::DitherType d
|
|||||||
halftone.setBlackValue(Halftone::kLowValueMeansBlack);
|
halftone.setBlackValue(Halftone::kLowValueMeansBlack);
|
||||||
|
|
||||||
const int widthBytes = (width + 7) / 8; // byte boundary
|
const int widthBytes = (width + 7) / 8; // byte boundary
|
||||||
uchar buffer[widthBytes];
|
uchar* buffer = new uchar[widthBytes];
|
||||||
|
|
||||||
const uchar* src = (uchar*)testImage.Bits();
|
const uchar* src = (uchar*)testImage.Bits();
|
||||||
uchar* dstRow = (uchar*)preview.Bits();
|
uchar* dstRow = (uchar*)preview.Bits();
|
||||||
@@ -116,6 +116,8 @@ void HalftonePreviewView::preview(float gamma, float min, Halftone::DitherType d
|
|||||||
src += testImage.BytesPerRow();
|
src += testImage.BytesPerRow();
|
||||||
dstRow += preview.BytesPerRow();
|
dstRow += preview.BytesPerRow();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
delete buffer;
|
||||||
|
|
||||||
SetViewBitmap(&preview);
|
SetViewBitmap(&preview);
|
||||||
Invalidate();
|
Invalidate();
|
||||||
|
|||||||
Reference in New Issue
Block a user