'\" t .\" Title: SDL_GetRowStretchCode .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: 0.3.1 .\" Manual: Manual Pages .\" Source: SDL_stretch .\" Language: English .\" .TH "SDL_GETROWSTRETCHCOD" "3" "0\&.3\&.1" "SDL_stretch" "Manual Pages" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" SDL_GetRowStretchCode, SDL_NewRowStretchCode \- (src/SDL_stretchcode\&.h) .SH "SYNOPSIS" .sp .ft B .nf #include .fi .ft .HP \w'extern\ unsigned\ char*\ SDL_GetRowStretchCode('u .BI "extern unsigned char* SDL_GetRowStretchCode(void);" .HP \w'extern\ unsigned\ char*\ SDL_NewRowStretchCode('u .BI "extern unsigned char* SDL_NewRowStretchCode(unsigned\ size);" .SH "DESCRIPTION" .PP TheRowStretchCode is a shared buffer between Stretch\-routines that use no extra buffer\-argument\&. You should call SDL_SetRowStretchCode to fill this internal buffer and set a "call"\-operation for your target cpu to execute this static buffer\&. That is done for effiency as the RowStretch is often called in a tight loop for each Row in a rectengular stretch and it is best to not use a variable argument with an indirect call or a function call that would build up a callframe and release that callframe later\&. .PP If you do not need that effiency, use PutRowStretchCode and RunRowStretchCode which are also good in a multithreading environment\&. To allocate a new buffer for usage with Put/Run you can use the NewRowStretchCode routine which is also used on NX machines (e\&.g\&. AMD64) where the data segment is set to be not\-executable (in that case it will allocate from heap and use mprotect)\&. if the argument is 0 then a buffer of the default size is allocated\&. If the buffer allocation (or mprotect) fails it will return NULL and SDL_SetError\&. .PP