zenilib: zenilib/jni/external/sdl/src/video/SDL_stretch.c File Reference

zenilib 0.5.3.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Macros | Functions
SDL_stretch.c File Reference
`#include "SDL_config.h"`
`#include "SDL_video.h"`
`#include "SDL_blit.h"`

Go to the source code of this file.

## Macros

#define | DEFINE_COPY_ROW(name, type)

## Functions

static void | copy_row3 (Uint8 *src, int src_w, Uint8 *dst, int dst_w)
int | SDL_SoftStretch (SDL_Surface *src, const SDL_Rect *srcrect, SDL_Surface *dst, const SDL_Rect *dstrect)
| Perform a fast, low quality, stretch blit between two surfaces of the same pixel format. More...

## Macro Definition Documentation

#define DEFINE_COPY_ROW | ( |  | name,
|  |  | type
| ) |  |

Value:
static void name(type *src, int src_w, type *dst, int dst_w) \
{ \
int i; \
int pos, inc; \
type pixel = 0; \
\
pos = 0x10000; \
inc = (src_w << 16) / dst_w; \
for ( i=dst_w; i>0; --i ) { \
while ( pos >= 0x10000L ) { \
pixel = *src++; \
pos -= 0x10000L; \
} \
*dst++ = pixel; \
pos += inc; \
} \
}
type
GLint GLenum GLsizei GLsizei GLsizei GLint GLenum GLenum type
Definition: gl2ext.h:845
name
EGLImageKHR EGLint * name
Definition: eglext.h:284
dst
GLenum GLenum dst
Definition: glew.h:2396
int
int
Definition: SDL_systhread.c:37
for
for(;;)
Definition: glslang_tab.cpp:4773
src
GLenum src
Definition: glew.h:2396
i
int i
Definition: pngrutil.c:1377
while
while(1)
Definition: glslang_lex.cpp:1063

Definition at line 151 of file SDL_stretch.c.

## Function Documentation

static void copy_row3 | ( | Uint8 * | src,
|  | int | src_w,
|  | Uint8 * | dst,
|  | int | dst_w
| ) |  |

static

Definition at line 177 of file SDL_stretch.c.

References i.

Referenced by SDL_SoftStretch().

int SDL_SoftStretch | ( | SDL_Surface * | src,
|  | const SDL_Rect * | srcrect,
|  | SDL_Surface * | dst,
|  | const SDL_Rect * | dstrect
| ) |  |

Perform a fast, low quality, stretch blit between two surfaces of the same pixel format.

Note
  This function uses a static buffer, and is not thread-safe.

Definition at line 203 of file SDL_stretch.c.

References SDL_PixelFormat::BytesPerPixel, copy_row3(), SDL_Surface::format, SDL_PixelFormat::format, SDL_Rect::h, SDL_Surface::h, if(), NULL, SDL_Surface::pitch, SDL_Surface::pixels, pop, SDL_FALSE, SDL_LockSurface(), SDL_MUSTLOCK, SDL_SetError(), SDL_TRUE, SDL_UnlockSurface(), SDL_Rect::w, SDL_Surface::w, SDL_Rect::x, and SDL_Rect::y.

Referenced by SDL_LowerBlitScaled(), and SDL_SW_CopyYUVToRGB().