Home
last modified time | relevance | path

Searched refs:surface (Results 1 – 25 of 132) sorted by relevance

123456

/AliOS-Things-master/components/SDL2/src/video/
A DSDL_surface.c76 surface = (SDL_Surface *) SDL_calloc(1, sizeof(*surface)); in SDL_CreateRGBSurfaceWithFormat()
113 if (surface->w && surface->h) { in SDL_CreateRGBSurfaceWithFormat()
115 Sint64 size = ((Sint64)surface->h * surface->pitch); in SDL_CreateRGBSurfaceWithFormat()
131 SDL_memset(surface->pixels, 0, surface->h * surface->pitch); in SDL_CreateRGBSurfaceWithFormat()
148 return surface; in SDL_CreateRGBSurfaceWithFormat()
191 return surface; in SDL_CreateRGBSurfaceFrom()
214 return surface; in SDL_CreateRGBSurfaceWithFormatFrom()
220 if (!surface) { in SDL_SetSurfacePalette()
236 if (!surface) { in SDL_SetSurfaceRLE()
939 if (!surface->locked || (--surface->locked > 0)) { in SDL_UnlockSurface()
[all …]
A DSDL_bmp.c153 Uint8 *end = alpha + surface->h * surface->pitch; in CorrectAlphaChannel()
214 surface = NULL; in SDL_LoadBMP_RW()
394 surface = in SDL_LoadBMP_RW()
454 end = (Uint8 *)surface->pixels+(surface->h*surface->pitch); in SDL_LoadBMP_RW()
465 pad = ((surface->pitch % 4) ? (4 - (surface->pitch % 4)) : 0); in SDL_LoadBMP_RW()
564 return (surface); in SDL_LoadBMP_RW()
609 surface = NULL; in SDL_SaveBMP_RW()
664 if (surface && (SDL_LockSurface(surface) == 0)) { in SDL_SaveBMP_RW()
665 const int bw = surface->w * surface->format->BytesPerPixel; in SDL_SaveBMP_RW()
689 biSizeImage = surface->h * surface->pitch; in SDL_SaveBMP_RW()
[all …]
A DSDL_RLEaccel.c1079 maxsize = surface->h * (2 + (4 + 2) * (surface->w + 1)) + 2; in RLEAlphaSurface()
1089 maxsize = surface->h * 2 * 4 * (surface->w + 1) + 4; in RLEAlphaSurface()
1122 int h = surface->h, w = surface->w; in RLEAlphaSurface()
1293 maxsize = surface->h * 3 * (surface->w / 2 + 1) + 2; in RLEColorkeySurface()
1298 maxsize = surface->h * (2 * (surface->w / 255 + 1) in RLEColorkeySurface()
1303 maxsize = surface->h * (4 * (surface->w / 65535 + 1) in RLEColorkeySurface()
1324 w = surface->w; in RLEColorkeySurface()
1491 surface->pixels = SDL_SIMDAlloc(surface->h * surface->pitch); in UnRLEAlpha()
1497 SDL_memset(surface->pixels, 0, surface->h * surface->pitch); in UnRLEAlpha()
1557 surface->pixels = SDL_SIMDAlloc(surface->h * surface->pitch); in SDL_UnRLESurface()
[all …]
A DSDL_blit.c196 SDL_CalculateBlit(SDL_Surface * surface) in SDL_CalculateBlit() argument
199 SDL_BlitMap *map = surface->map; in SDL_CalculateBlit()
211 SDL_UnRLESurface(surface, 1); in SDL_CalculateBlit()
216 map->info.src_fmt = surface->format; in SDL_CalculateBlit()
217 map->info.src_pitch = surface->pitch; in SDL_CalculateBlit()
224 if (SDL_RLESurface(surface) == 0) { in SDL_CalculateBlit()
239 else if (surface->format->BitsPerPixel < 8 && in SDL_CalculateBlit()
241 blit = SDL_CalculateBlit0(surface); in SDL_CalculateBlit()
247 blit = SDL_CalculateBlit1(surface); in SDL_CalculateBlit()
252 blit = SDL_CalculateBlitA(surface); in SDL_CalculateBlit()
[all …]
/AliOS-Things-master/components/SDL2/src/video/alios/
A DSDL_AliOS_framebuffer.c37 SDL_Surface *surface; in SDL_AliOS_CreateWindowFramebuffer() local
45 SDL_FreeSurface(surface); in SDL_AliOS_CreateWindowFramebuffer()
51 if (!surface) { in SDL_AliOS_CreateWindowFramebuffer()
58 *pixels = surface->pixels; in SDL_AliOS_CreateWindowFramebuffer()
59 *pitch = surface->pitch; in SDL_AliOS_CreateWindowFramebuffer()
66 SDL_Surface *surface; in SDL_AliOS_UpdateWindowFramebuffer() local
69 if (!surface) { in SDL_AliOS_UpdateWindowFramebuffer()
74 hal_lcd->lcd_frame_draw(surface->pixels); in SDL_AliOS_UpdateWindowFramebuffer()
77 udisplay_show_rect(surface->pixels, 0, 0, surface->w, surface->h, false); in SDL_AliOS_UpdateWindowFramebuffer()
84 SDL_Surface *surface; in SDL_AliOS_DestroyWindowFramebuffer() local
[all …]
A DSDL_AliOS_mouse.c36 static SDL_Cursor *AliOS_CreateCursor(SDL_Surface * surface,
50 AliOS_CreateCursor(SDL_Surface * surface, int hot_x, int hot_y) in AliOS_CreateCursor() argument
61 curdata->surface = surface; in AliOS_CreateCursor()
69 AliOS_CreateSystemCursor(SDL_Surface * surface, int hot_x, int hot_y) in AliOS_CreateSystemCursor() argument
81 SDL_Surface *surface; in AliOS_ShowCursor() local
84 surface = ((AliOS_CursorData *)cursor->driverdata)->surface; in AliOS_ShowCursor()
92 SDL_BlitSurface(surface, NULL, w_surface, NULL); in AliOS_ShowCursor()
/AliOS-Things-master/components/SDL2/src/video/dummy/
A DSDL_nullframebuffer.c33 SDL_Surface *surface; in SDL_DUMMY_CreateWindowFramebuffer() local
41 SDL_FreeSurface(surface); in SDL_DUMMY_CreateWindowFramebuffer()
47 if (!surface) { in SDL_DUMMY_CreateWindowFramebuffer()
52 SDL_SetWindowData(window, DUMMY_SURFACE, surface); in SDL_DUMMY_CreateWindowFramebuffer()
54 *pixels = surface->pixels; in SDL_DUMMY_CreateWindowFramebuffer()
55 *pitch = surface->pitch; in SDL_DUMMY_CreateWindowFramebuffer()
62 SDL_Surface *surface; in SDL_DUMMY_UpdateWindowFramebuffer() local
65 if (!surface) { in SDL_DUMMY_UpdateWindowFramebuffer()
74 SDL_SaveBMP(surface, file); in SDL_DUMMY_UpdateWindowFramebuffer()
81 SDL_Surface *surface; in SDL_DUMMY_DestroyWindowFramebuffer() local
[all …]
/AliOS-Things-master/components/SDL2/src/video/offscreen/
A DSDL_offscreenframebuffer.c34 SDL_Surface *surface; in SDL_OFFSCREEN_CreateWindowFramebuffer() local
42 SDL_FreeSurface(surface); in SDL_OFFSCREEN_CreateWindowFramebuffer()
48 if (!surface) { in SDL_OFFSCREEN_CreateWindowFramebuffer()
53 SDL_SetWindowData(window, OFFSCREEN_SURFACE, surface); in SDL_OFFSCREEN_CreateWindowFramebuffer()
55 *pixels = surface->pixels; in SDL_OFFSCREEN_CreateWindowFramebuffer()
56 *pitch = surface->pitch; in SDL_OFFSCREEN_CreateWindowFramebuffer()
63 SDL_Surface *surface; in SDL_OFFSCREEN_UpdateWindowFramebuffer() local
66 if (!surface) { in SDL_OFFSCREEN_UpdateWindowFramebuffer()
75 SDL_SaveBMP(surface, file); in SDL_OFFSCREEN_UpdateWindowFramebuffer()
82 SDL_Surface *surface; in SDL_OFFSCREEN_DestroyWindowFramebuffer() local
[all …]
/AliOS-Things-master/components/SDL2/src/image/external/libwebp-1.0.2/extras/
A Dwebp_to_sdl.c39 SDL_Surface* surface = NULL; in WebpToSDL() local
61 surface = SDL_CreateRGBSurface(SDL_SWSURFACE, in WebpToSDL()
68 if (surface == NULL) { in WebpToSDL()
73 if (SDL_MUSTLOCK(surface)) SDL_LockSurface(surface); in WebpToSDL()
80 output->width = surface->w; in WebpToSDL()
81 output->height = surface->h; in WebpToSDL()
82 output->u.RGBA.rgba = surface->pixels; in WebpToSDL()
83 output->u.RGBA.stride = surface->pitch; in WebpToSDL()
84 output->u.RGBA.size = surface->pitch * surface->h; in WebpToSDL()
93 if (SDL_MUSTLOCK(surface)) SDL_UnlockSurface(surface); in WebpToSDL()
[all …]
/AliOS-Things-master/components/SDL2/src/render/software/
A DSDL_render_sw.c49 SDL_Surface *surface; member
64 if (surface) { in SW_ActivateRenderer()
65 data->surface = data->window = surface; in SW_ActivateRenderer()
87 if (data->surface) { in SW_GetOutputSize()
171 (void *) ((Uint8 *) surface->pixels + rect->y * surface->pitch + in SW_LockTexture()
354 if (!surface) { in SW_RenderCopyEx()
617 if (!surface) { in SW_RunCommandQueue()
756 if (!surface) { in SW_RenderReadPixels()
812 if (!surface) { in SW_CreateRendererForSurface()
829 data->surface = surface; in SW_CreateRendererForSurface()
[all …]
/AliOS-Things-master/components/SDL2/src/image/
A DIMG_bmp.c199 Uint8 *end = alpha + surface->h * surface->pitch; in CorrectAlphaChannel()
259 surface = NULL; in LoadBMP_RW()
492 end = (Uint8 *)surface->pixels+(surface->h*surface->pitch); in LoadBMP_RW()
598 surface = NULL; in LoadBMP_RW()
603 return(surface); in LoadBMP_RW()
651 surface = NULL; in LoadICOCUR_RW()
772 surface = in LoadICOCUR_RW()
797 bits = (Uint8 *) surface->pixels + (surface->h * surface->pitch); in LoadICOCUR_RW()
857 bits = (Uint8 *) surface->pixels + (surface->h * surface->pitch); in LoadICOCUR_RW()
890 if (surface) { in LoadICOCUR_RW()
[all …]
A DIMG_pnm.c111 SDL_Surface *surface = NULL; in IMG_LoadPNM_RW() local
166 if ( surface == NULL ) in IMG_LoadPNM_RW()
168 bpl = width * surface->format->BytesPerPixel; in IMG_LoadPNM_RW()
174 surface->format->palette->ncolors = 256; in IMG_LoadPNM_RW()
180 surface->format->palette->ncolors = 2; in IMG_LoadPNM_RW()
188 row = (Uint8 *)surface->pixels; in IMG_LoadPNM_RW()
231 row += surface->pitch; in IMG_LoadPNM_RW()
237 if ( surface ) { in IMG_LoadPNM_RW()
238 SDL_FreeSurface(surface); in IMG_LoadPNM_RW()
239 surface = NULL; in IMG_LoadPNM_RW()
[all …]
A DIMG_xv.c104 SDL_Surface *surface = NULL; in IMG_LoadXV_RW() local
121 surface = SDL_CreateRGBSurface(SDL_SWSURFACE, w, h, 8, 0xe0, 0x1c, 0x03, 0); in IMG_LoadXV_RW()
122 if ( surface == NULL ) { in IMG_LoadXV_RW()
128 for ( pixels = (Uint8 *)surface->pixels; h > 0; --h ) { in IMG_LoadXV_RW()
133 pixels += surface->pitch; in IMG_LoadXV_RW()
139 if ( surface ) { in IMG_LoadXV_RW()
140 SDL_FreeSurface(surface); in IMG_LoadXV_RW()
141 surface = NULL; in IMG_LoadXV_RW()
145 return surface; in IMG_LoadXV_RW()
A DIMG_png.c253 SDL_Surface *volatile surface; in IMG_LoadPNG_RW() local
395 if ( surface == NULL ) { in IMG_LoadPNG_RW()
419 (Uint8 *)surface->pixels + row*surface->pitch; in IMG_LoadPNG_RW()
467 if ( surface ) { in IMG_LoadPNG_RW()
468 SDL_FreeSurface(surface); in IMG_LoadPNG_RW()
469 surface = NULL; in IMG_LoadPNG_RW()
473 return(surface); in IMG_LoadPNG_RW()
540 SDL_Surface *source = surface; in IMG_SavePNG_RW_libpng()
595 lib.png_set_IHDR(png_ptr, info_ptr, surface->w, surface->h, in IMG_SavePNG_RW_libpng()
617 if (source != surface) { in IMG_SavePNG_RW_libpng()
[all …]
A DIMG_webp.c152 SDL_Surface *volatile surface = NULL; in IMG_LoadWEBP_RW() local
222 surface = SDL_CreateRGBSurface(SDL_SWSURFACE, in IMG_LoadWEBP_RW()
226 if ( surface == NULL ) { in IMG_LoadWEBP_RW()
232 …odeRGBAInto( raw_data, raw_data_size, (uint8_t *)surface->pixels, surface->pitch * surface->h, su… in IMG_LoadWEBP_RW()
234 …codeRGBInto( raw_data, raw_data_size, (uint8_t *)surface->pixels, surface->pitch * surface->h, su… in IMG_LoadWEBP_RW()
246 return surface; in IMG_LoadWEBP_RW()
255 if ( surface ) { in IMG_LoadWEBP_RW()
256 SDL_FreeSurface( surface ); in IMG_LoadWEBP_RW()
/AliOS-Things-master/components/SDL2/src/video/emscripten/
A DSDL_emscriptenframebuffer.c32 SDL_Surface *surface; in Emscripten_CreateWindowFramebuffer() local
40 surface = data->surface; in Emscripten_CreateWindowFramebuffer()
41 SDL_FreeSurface(surface); in Emscripten_CreateWindowFramebuffer()
48 if (!surface) { in Emscripten_CreateWindowFramebuffer()
53 data->surface = surface; in Emscripten_CreateWindowFramebuffer()
56 *pitch = surface->pitch; in Emscripten_CreateWindowFramebuffer()
62 SDL_Surface *surface; in Emscripten_UpdateWindowFramebuffer() local
65 surface = data->surface; in Emscripten_UpdateWindowFramebuffer()
66 if (!surface) { in Emscripten_UpdateWindowFramebuffer()
157 }, surface->w, surface->h, surface->pixels); in Emscripten_UpdateWindowFramebuffer()
[all …]
/AliOS-Things-master/components/SDL2/src/test/
A DSDL_test_compare.c39 int SDLTest_CompareSurfaces(SDL_Surface *surface, SDL_Surface *referenceSurface, int allowable_erro… in SDLTest_CompareSurfaces() argument
53 if (surface == NULL || referenceSurface == NULL) { in SDLTest_CompareSurfaces()
58 if ((surface->w != referenceSurface->w) || (surface->h != referenceSurface->h)) { in SDLTest_CompareSurfaces()
67 SDL_LockSurface( surface ); in SDLTest_CompareSurfaces()
71 bpp = surface->format->BytesPerPixel; in SDLTest_CompareSurfaces()
74 for (j=0; j<surface->h; j++) { in SDLTest_CompareSurfaces()
75 for (i=0; i<surface->w; i++) { in SDLTest_CompareSurfaces()
76 p = (Uint8 *)surface->pixels + j * surface->pitch + i * bpp; in SDLTest_CompareSurfaces()
79 SDL_GetRGBA(*(Uint32*)p, surface->format, &R, &G, &B, &A); in SDLTest_CompareSurfaces()
99 SDL_UnlockSurface( surface ); in SDLTest_CompareSurfaces()
[all …]
A DSDL_test_imageBlitBlend.c583 SDL_Surface *surface = SDL_CreateRGBSurfaceFrom( in SDLTest_ImageBlitBlendAdd() local
601 return surface; in SDLTest_ImageBlitBlendAdd()
1113 SDL_Surface *surface = SDL_CreateRGBSurfaceFrom( in SDLTest_ImageBlitBlend() local
1131 return surface; in SDLTest_ImageBlitBlend()
1543 SDL_Surface *surface = SDL_CreateRGBSurfaceFrom( in SDLTest_ImageBlitBlendMod() local
1561 return surface; in SDLTest_ImageBlitBlendMod()
2356 SDL_Surface *surface = SDL_CreateRGBSurfaceFrom( in SDLTest_ImageBlitBlendNone() local
2374 return surface; in SDLTest_ImageBlitBlendNone()
2824 SDL_Surface *surface = SDL_CreateRGBSurfaceFrom( in SDLTest_ImageBlitBlendAll() local
2842 return surface; in SDLTest_ImageBlitBlendAll()
A DSDL_test_imageBlit.c543 SDL_Surface *surface = SDL_CreateRGBSurfaceFrom( in SDLTest_ImageBlit() local
561 return surface; in SDLTest_ImageBlit()
1026 SDL_Surface *surface = SDL_CreateRGBSurfaceFrom( in SDLTest_ImageBlitColor() local
1044 return surface; in SDLTest_ImageBlitColor()
1538 SDL_Surface *surface = SDL_CreateRGBSurfaceFrom( in SDLTest_ImageBlitAlpha() local
1556 return surface; in SDLTest_ImageBlitAlpha()
/AliOS-Things-master/components/SDL2/test/
A Dtestcustomcursor.c74 SDL_Surface *surface = SDL_LoadBMP(file); in init_color_cursor() local
75 if (surface) { in init_color_cursor()
76 if (surface->format->palette) { in init_color_cursor()
77 SDL_SetColorKey(surface, 1, *(Uint8 *) surface->pixels); in init_color_cursor()
79 switch (surface->format->BitsPerPixel) { in init_color_cursor()
81 SDL_SetColorKey(surface, 1, (*(Uint16 *)surface->pixels) & 0x00007FFF); in init_color_cursor()
84 SDL_SetColorKey(surface, 1, *(Uint16 *)surface->pixels); in init_color_cursor()
87 SDL_SetColorKey(surface, 1, (*(Uint32 *)surface->pixels) & 0x00FFFFFF); in init_color_cursor()
90 SDL_SetColorKey(surface, 1, *(Uint32 *)surface->pixels); in init_color_cursor()
94 cursor = SDL_CreateColorCursor(surface, 0, 0); in init_color_cursor()
[all …]
/AliOS-Things-master/components/SDL2/include/
A DSDL_surface.h149 extern DECLSPEC void SDLCALL SDL_FreeSurface(SDL_Surface * surface);
158 extern DECLSPEC int SDLCALL SDL_SetSurfacePalette(SDL_Surface * surface,
180 extern DECLSPEC int SDLCALL SDL_LockSurface(SDL_Surface * surface);
182 extern DECLSPEC void SDLCALL SDL_UnlockSurface(SDL_Surface * surface);
217 (SDL_Surface * surface, SDL_RWops * dst, int freedst);
224 #define SDL_SaveBMP(surface, file) \ argument
225 SDL_SaveBMP_RW(surface, SDL_RWFromFile(file, "wb"), 1)
235 extern DECLSPEC int SDLCALL SDL_SetSurfaceRLE(SDL_Surface * surface,
249 extern DECLSPEC int SDLCALL SDL_SetColorKey(SDL_Surface * surface,
269 extern DECLSPEC int SDLCALL SDL_GetColorKey(SDL_Surface * surface,
[all …]
/AliOS-Things-master/components/SDL2/src/video/wayland/
A DSDL_waylandmouse.c48 struct wl_surface *surface; member
166 SDL_assert(surface->pitch == surface->w * 4); in Wayland_CreateCursor()
170 surface->w, in Wayland_CreateCursor()
180 surface->pixels, in Wayland_CreateCursor()
181 surface->h * surface->pitch); in Wayland_CreateCursor()
188 data->w = surface->w; in Wayland_CreateCursor()
189 data->h = surface->h; in Wayland_CreateCursor()
309 if (d->surface) in Wayland_FreeCursor()
310 wl_surface_destroy(d->surface); in Wayland_FreeCursor()
333 data->surface, in Wayland_ShowCursor()
[all …]
/AliOS-Things-master/components/SDL2/src/video/qnx/
A Dgl.c175 EGLSurface surface; in glCreateContext() local
199 surface = eglCreateWindowSurface(egl_disp, impl->conf, impl->window, in glCreateContext()
201 if (surface == EGL_NO_SURFACE) { in glCreateContext()
205 eglMakeCurrent(egl_disp, surface, surface, context); in glCreateContext()
207 impl->surface = surface; in glCreateContext()
238 return eglSwapBuffers(egl_disp, impl->surface) == EGL_TRUE ? 0 : -1; in glSwapWindow()
252 EGLSurface surface = NULL; in glMakeCurrent() local
256 surface = impl->surface; in glMakeCurrent()
259 if (eglMakeCurrent(egl_disp, surface, surface, context) != EGL_TRUE) { in glMakeCurrent()
/AliOS-Things-master/components/SDL2/src/video/x11/
A DSDL_x11mouse.c97 image = X11_XcursorImageCreate(surface->w, surface->h); in X11_CreateXCursorCursor()
107 SDL_assert(surface->pitch == surface->w * 4); in X11_CreateXCursorCursor()
108 SDL_memcpy(image->pixels, surface->pixels, surface->h * surface->pitch); in X11_CreateXCursorCursor()
129 unsigned int width_bytes = ((surface->w + 7) & ~7) / 8; in X11_CreatePixmapCursor()
131 data_bits = SDL_calloc(1, surface->h * width_bytes); in X11_CreatePixmapCursor()
137 mask_bits = SDL_calloc(1, surface->h * width_bytes); in X11_CreatePixmapCursor()
148 for (y = 0; y < surface->h; ++y) { in X11_CreatePixmapCursor()
149 ptr = (Uint32 *)((Uint8 *)surface->pixels + y * surface->pitch); in X11_CreatePixmapCursor()
150 for (x = 0; x < surface->w; ++x) { in X11_CreatePixmapCursor()
191 surface->w, surface->h); in X11_CreatePixmapCursor()
[all …]
/AliOS-Things-master/components/SDL2/src/video/kmsdrm/
A DSDL_kmsdrmmouse.c188 usable_cursor_w = surface->w; in KMSDRM_CreateCursor()
189 usable_cursor_h = surface->h; in KMSDRM_CreateCursor()
221 if (surface->pitch != bo_stride) { in KMSDRM_CreateCursor()
229 if (SDL_MUSTLOCK(surface)) { in KMSDRM_CreateCursor()
240 for (i = 0; i < surface->h; i++) { in KMSDRM_CreateCursor()
242 ((char *)surface->pixels) + (i * surface->pitch), in KMSDRM_CreateCursor()
246 if (SDL_MUSTLOCK(surface)) { in KMSDRM_CreateCursor()
247 SDL_UnlockSurface(surface); in KMSDRM_CreateCursor()
260 if (SDL_MUSTLOCK(surface)) { in KMSDRM_CreateCursor()
269 if (SDL_MUSTLOCK(surface)) { in KMSDRM_CreateCursor()
[all …]

Completed in 83 milliseconds

123456