|
ReactOS 0.4.17-dev-966-gf06eace
|
#include "d3dx9_private.h"#include "initguid.h"#include "ole2.h"#include "wincodec.h"#include "txc_dxtn.h"#include <assert.h>#include "pshpack1.h"#include "poppack.h"
Go to the source code of this file.
Classes | |
| struct | dds_pixel_format |
| struct | dds_header |
| struct | d3dx_file_format_signature |
| struct | d3dx_wic_file_format |
| struct | tga_header |
| struct | argb_conversion_info |
Variables | |
| struct { | |
| const GUID * wic_guid | |
| enum d3dx_pixel_format_id d3dx_pixel_format | |
| } | wic_pixel_formats [] |
| struct { | |
| struct dds_pixel_format dds_pixel_format | |
| enum d3dx_pixel_format_id d3dx_pixel_format | |
| } | dds_pixel_formats [] |
| static const uint8_t | bmp_file_signature [] = { 'B', 'M' } |
| static const uint8_t | jpg_file_signature [] = { 0xff, 0xd8 } |
| static const uint8_t | png_file_signature [] = { 0x89, 'P', 'N', 'G', 0x0d, 0x0a, 0x1a, 0x0a } |
| static const uint8_t | dds_file_signature [] = { 'D', 'D', 'S', ' ' } |
| static const uint8_t | ppm_plain_file_signature [] = { 'P', '3' } |
| static const uint8_t | ppm_raw_file_signature [] = { 'P', '6' } |
| static const uint8_t | hdr_file_signature [] = { '#', '?', 'R', 'A', 'D', 'I', 'A', 'N', 'C', 'E', '\n' } |
| static const uint8_t | pfm_color_file_signature [] = { 'P', 'F' } |
| static const uint8_t | pfm_gray_file_signature [] = { 'P', 'f' } |
| static const struct d3dx_file_format_signature | file_format_signatures [] |
| #define DDS_CAPS2_CUBEMAP_ALL_FACES |
| #define DDS_PALETTE_SIZE (sizeof(PALETTEENTRY) * 256) |
| #define DDS_PIXELFORMAT 0x1000 |
| void convert_argb_pixels | ( | const BYTE * | src, |
| UINT | src_row_pitch, | ||
| UINT | src_slice_pitch, | ||
| const struct volume * | src_size, | ||
| const struct pixel_format_desc * | src_format, | ||
| BYTE * | dst, | ||
| UINT | dst_row_pitch, | ||
| UINT | dst_slice_pitch, | ||
| const struct volume * | dst_size, | ||
| const struct pixel_format_desc * | dst_format, | ||
| D3DCOLOR | color_key, | ||
| const PALETTEENTRY * | palette | ||
| ) |
Definition at line 2180 of file surface.c.
Referenced by d3dx_image_tga_decode(), d3dx_load_pixels_from_pixels(), and D3DXSaveSurfaceToFileInMemory().
Definition at line 768 of file surface.c.
Referenced by d3dx_image_init().
| void copy_pixels | ( | const BYTE * | src, |
| UINT | src_row_pitch, | ||
| UINT | src_slice_pitch, | ||
| BYTE * | dst, | ||
| UINT | dst_row_pitch, | ||
| UINT | dst_slice_pitch, | ||
| const struct volume * | size, | ||
| const struct pixel_format_desc * | format | ||
| ) |
Definition at line 2149 of file surface.c.
Referenced by BitmapImpl_CopyPixels(), BmpFrameDecode_CopyPixels(), d3dx_load_pixels_from_pixels(), DdsFrameDecode_CopyPixels(), DdsFrameDecode_Dds_CopyBlocks(), GifFrameDecode_CopyPixels(), IcoFrameDecode_CopyPixels(), jpeg_decoder_copy_pixels(), png_decoder_copy_pixels(), test_dds_decoder_frame_data(), TgaDecoder_Frame_CopyPixels(), and tiff_decoder_copy_pixels().
|
static |
Definition at line 450 of file surface.c.
Referenced by d3dx_initialize_image_from_dds().
|
static |
Definition at line 426 of file surface.c.
Referenced by d3dx_calculate_layer_pixels_size(), d3dx_image_get_pixels(), d3dx_image_tga_decode(), d3dx_image_wic_frame_decode(), d3dx_initialize_image_from_dds(), and d3dx_save_pixels_to_memory().
Definition at line 1925 of file surface.c.
Referenced by format_from_d3dx_color().
|
static |
Definition at line 874 of file surface.c.
Referenced by d3dx_initialize_image_from_wic().
|
static |
Definition at line 665 of file surface.c.
Referenced by d3dx_image_init().
Definition at line 412 of file surface.c.
Referenced by d3dx_calculate_layer_pixels_size(), d3dx_image_get_pixels(), and d3dx_initialize_image_from_dds().
|
static |
Definition at line 1074 of file surface.c.
Referenced by d3dx_image_tga_decode(), and d3dx_initialize_image_from_tga().
| void d3dx_image_cleanup | ( | struct d3dx_image * | image | ) |
Definition at line 1392 of file surface.c.
Referenced by D3DXCreateCubeTextureFromFileInMemoryEx(), D3DXCreateTextureFromFileInMemoryEx(), D3DXCreateVolumeTextureFromFileInMemoryEx(), D3DXLoadSurfaceFromFileInMemory(), and D3DXLoadVolumeFromFileInMemory().
| HRESULT d3dx_image_get_pixels | ( | struct d3dx_image * | image, |
| uint32_t | layer, | ||
| uint32_t | mip_level, | ||
| struct d3dx_pixels * | pixels | ||
| ) |
Definition at line 1398 of file surface.c.
Referenced by D3DXCreateCubeTextureFromFileInMemoryEx(), D3DXCreateTextureFromFileInMemoryEx(), D3DXCreateVolumeTextureFromFileInMemoryEx(), D3DXLoadSurfaceFromFileInMemory(), and D3DXLoadVolumeFromFileInMemory().
| HRESULT d3dx_image_init | ( | const void * | src_data, |
| uint32_t | src_data_size, | ||
| struct d3dx_image * | image, | ||
| uint32_t | starting_mip_level, | ||
| uint32_t | flags | ||
| ) |
Definition at line 1332 of file surface.c.
Referenced by d3dx_image_init(), D3DXCreateCubeTextureFromFileInMemoryEx(), D3DXCreateTextureFromFileInMemoryEx(), D3DXCreateVolumeTextureFromFileInMemoryEx(), D3DXGetImageInfoFromFileInMemory(), D3DXLoadSurfaceFromFileInMemory(), and D3DXLoadVolumeFromFileInMemory().
|
static |
Definition at line 1153 of file surface.c.
Referenced by d3dx_initialize_image_from_tga().
|
static |
Definition at line 1115 of file surface.c.
Referenced by d3dx_image_tga_decode().
|
static |
Definition at line 907 of file surface.c.
Referenced by d3dx_initialize_image_from_wic().
|
static |
Definition at line 468 of file surface.c.
Referenced by d3dx_save_pixels_to_memory().
|
static |
Definition at line 685 of file surface.c.
Referenced by d3dx_image_init().
|
static |
Definition at line 1279 of file surface.c.
Referenced by d3dx_image_init().
|
static |
Definition at line 987 of file surface.c.
Referenced by d3dx_image_init().
| HRESULT d3dx_load_pixels_from_pixels | ( | struct d3dx_pixels * | dst_pixels, |
| const struct pixel_format_desc * | dst_desc, | ||
| struct d3dx_pixels * | src_pixels, | ||
| const struct pixel_format_desc * | src_desc, | ||
| uint32_t | filter_flags, | ||
| uint32_t | color_key | ||
| ) |
Definition at line 2498 of file surface.c.
Referenced by d3dx_load_pixels_from_pixels(), d3dx_load_surface_from_memory(), d3dx_load_volume_from_memory(), d3dx_save_pixels_to_memory(), D3DXCreateCubeTextureFromFileInMemoryEx(), D3DXCreateTextureFromFileInMemoryEx(), and D3DXCreateVolumeTextureFromFileInMemoryEx().
|
static |
Definition at line 1610 of file surface.c.
Referenced by D3DXLoadSurfaceFromFileInMemory(), and D3DXLoadSurfaceFromMemory().
|
static |
Definition at line 320 of file surface.c.
Referenced by d3dx_initialize_image_from_dds().
|
static |
Definition at line 54 of file surface.c.
Referenced by d3dx_initialize_image_from_wic(), and D3DXSaveSurfaceToFileInMemory().
|
static |
Definition at line 2364 of file surface.c.
Referenced by d3dx_load_pixels_from_pixels().
| HRESULT d3dx_pixels_init | ( | const void * | data, |
| uint32_t | row_pitch, | ||
| uint32_t | slice_pitch, | ||
| const PALETTEENTRY * | palette, | ||
| enum d3dx_pixel_format_id | format, | ||
| uint32_t | left, | ||
| uint32_t | top, | ||
| uint32_t | right, | ||
| uint32_t | bottom, | ||
| uint32_t | front, | ||
| uint32_t | back, | ||
| struct d3dx_pixels * | pixels | ||
| ) |
Definition at line 2450 of file surface.c.
Referenced by d3dx_load_pixels_from_pixels(), d3dx_load_surface_from_memory(), d3dx_load_volume_from_memory(), and save_dds_surface_to_memory().
|
static |
Definition at line 493 of file surface.c.
Referenced by save_dds_surface_to_memory().
| HRESULT WINAPI D3DXGetImageInfoFromFileA | ( | const char * | file, |
| D3DXIMAGE_INFO * | info | ||
| ) |
Definition at line 1523 of file surface.c.
Referenced by test_D3DXGetImageInfo().
| HRESULT WINAPI D3DXGetImageInfoFromFileInMemory | ( | const void * | data, |
| UINT | datasize, | ||
| D3DXIMAGE_INFO * | info | ||
| ) |
Definition at line 1489 of file surface.c.
Referenced by check_dds_pixel_format_(), check_tga_image_info_(), D3DXGetImageInfoFromFileW(), D3DXGetImageInfoFromResourceA(), D3DXGetImageInfoFromResourceW(), test_D3DXGetImageInfo(), test_D3DXSaveTextureToFileInMemory(), test_dds_header_handling(), and test_load_surface_from_tga().
| HRESULT WINAPI D3DXGetImageInfoFromFileW | ( | const WCHAR * | file, |
| D3DXIMAGE_INFO * | info | ||
| ) |
Definition at line 1543 of file surface.c.
Referenced by D3DXGetImageInfoFromFileA().
| HRESULT WINAPI D3DXGetImageInfoFromResourceA | ( | HMODULE | module, |
| const char * | resource, | ||
| D3DXIMAGE_INFO * | info | ||
| ) |
Definition at line 1572 of file surface.c.
Referenced by test_D3DXGetImageInfo().
| HRESULT WINAPI D3DXGetImageInfoFromResourceW | ( | HMODULE | module, |
| const WCHAR * | resource, | ||
| D3DXIMAGE_INFO * | info | ||
| ) |
| void d3dximage_info_from_d3dx_image | ( | D3DXIMAGE_INFO * | info, |
| struct d3dx_image * | image | ||
| ) |
Definition at line 1441 of file surface.c.
Referenced by D3DXCreateCubeTextureFromFileInMemoryEx(), D3DXCreateTextureFromFileInMemoryEx(), D3DXCreateVolumeTextureFromFileInMemoryEx(), D3DXGetImageInfoFromFileInMemory(), D3DXLoadSurfaceFromFileInMemory(), and D3DXLoadVolumeFromFileInMemory().
| HRESULT WINAPI D3DXLoadSurfaceFromFileA | ( | IDirect3DSurface9 * | dst_surface, |
| const PALETTEENTRY * | dst_palette, | ||
| const RECT * | dst_rect, | ||
| const char * | src_file, | ||
| const RECT * | src_rect, | ||
| DWORD | filter, | ||
| D3DCOLOR | color_key, | ||
| D3DXIMAGE_INFO * | src_info | ||
| ) |
Definition at line 1745 of file surface.c.
Referenced by test_D3DXLoadSurface(), and test_D3DXSaveSurfaceToFile().
| HRESULT WINAPI D3DXLoadSurfaceFromFileInMemory | ( | IDirect3DSurface9 * | pDestSurface, |
| const PALETTEENTRY * | pDestPalette, | ||
| const RECT * | pDestRect, | ||
| const void * | pSrcData, | ||
| UINT | SrcDataSize, | ||
| const RECT * | pSrcRect, | ||
| DWORD | dwFilter, | ||
| D3DCOLOR | Colorkey, | ||
| D3DXIMAGE_INFO * | pSrcInfo | ||
| ) |
Definition at line 1700 of file surface.c.
Referenced by D3DXLoadSurfaceFromFileW(), D3DXLoadSurfaceFromResourceA(), D3DXLoadSurfaceFromResourceW(), test_D3DXCreateTextureFromFileInMemory(), test_D3DXLoadSurface(), test_D3DXSaveTextureToFileInMemory(), and test_load_surface_from_tga().
| HRESULT WINAPI D3DXLoadSurfaceFromFileW | ( | IDirect3DSurface9 * | dst_surface, |
| const PALETTEENTRY * | dst_palette, | ||
| const RECT * | dst_rect, | ||
| const WCHAR * | src_file, | ||
| const RECT * | src_rect, | ||
| DWORD | filter, | ||
| D3DCOLOR | color_key, | ||
| D3DXIMAGE_INFO * | src_info | ||
| ) |
Definition at line 1772 of file surface.c.
Referenced by D3DXLoadSurfaceFromFileA().
| HRESULT WINAPI D3DXLoadSurfaceFromMemory | ( | IDirect3DSurface9 * | dst_surface, |
| const PALETTEENTRY * | dst_palette, | ||
| const RECT * | dst_rect, | ||
| const void * | src_memory, | ||
| D3DFORMAT | src_format, | ||
| UINT | src_pitch, | ||
| const PALETTEENTRY * | src_palette, | ||
| const RECT * | src_rect, | ||
| DWORD | filter, | ||
| D3DCOLOR | color_key | ||
| ) |
Definition at line 2702 of file surface.c.
Referenced by D3DXLoadSurfaceFromSurface(), test_D3DXCreateTextureFromFileInMemory(), test_D3DXLoadSurface(), test_D3DXSaveSurfaceToFile(), test_D3DXSaveSurfaceToFileInMemory(), test_dxt_premultiplied_alpha(), and test_format_conversion().
| HRESULT WINAPI D3DXLoadSurfaceFromResourceA | ( | IDirect3DSurface9 * | dst_surface, |
| const PALETTEENTRY * | dst_palette, | ||
| const RECT * | dst_rect, | ||
| HMODULE | src_module, | ||
| const char * | resource, | ||
| const RECT * | src_rect, | ||
| DWORD | filter, | ||
| D3DCOLOR | color_key, | ||
| D3DXIMAGE_INFO * | src_info | ||
| ) |
Definition at line 1798 of file surface.c.
Referenced by test_D3DXLoadSurface().
| HRESULT WINAPI D3DXLoadSurfaceFromResourceW | ( | IDirect3DSurface9 * | dst_surface, |
| const PALETTEENTRY * | dst_palette, | ||
| const RECT * | dst_rect, | ||
| HMODULE | src_module, | ||
| const WCHAR * | resource, | ||
| const RECT * | src_rect, | ||
| DWORD | filter, | ||
| D3DCOLOR | color_key, | ||
| D3DXIMAGE_INFO * | src_info | ||
| ) |
Definition at line 1826 of file surface.c.
| HRESULT WINAPI D3DXLoadSurfaceFromSurface | ( | IDirect3DSurface9 * | dst_surface, |
| const PALETTEENTRY * | dst_palette, | ||
| const RECT * | dst_rect, | ||
| IDirect3DSurface9 * | src_surface, | ||
| const PALETTEENTRY * | src_palette, | ||
| const RECT * | src_rect, | ||
| DWORD | filter, | ||
| D3DCOLOR | color_key | ||
| ) |
Definition at line 2765 of file surface.c.
Referenced by copy_render_target_to_cube_texture_face(), D3DXFilterTexture(), D3DXRenderToSurface_EndScene(), get_surface_readback(), test_D3DXCreateTextureFromFileInMemory(), and test_D3DXLoadSurface().
| HRESULT WINAPI D3DXSaveSurfaceToFileA | ( | const char * | dst_filename, |
| D3DXIMAGE_FILEFORMAT | file_format, | ||
| IDirect3DSurface9 * | src_surface, | ||
| const PALETTEENTRY * | src_palette, | ||
| const RECT * | src_rect | ||
| ) |
Definition at line 2899 of file surface.c.
Referenced by test_D3DXSaveSurfaceToFile().
| HRESULT WINAPI D3DXSaveSurfaceToFileInMemory | ( | ID3DXBuffer ** | dst_buffer, |
| D3DXIMAGE_FILEFORMAT | file_format, | ||
| IDirect3DSurface9 * | src_surface, | ||
| const PALETTEENTRY * | src_palette, | ||
| const RECT * | src_rect | ||
| ) |
Definition at line 2949 of file surface.c.
Referenced by D3DXSaveSurfaceToFileA(), D3DXSaveSurfaceToFileW(), D3DXSaveTextureToFileInMemory(), test_D3DXSaveSurfaceToFileInMemory(), and test_save_surface_to_dds().
| HRESULT WINAPI D3DXSaveSurfaceToFileW | ( | const WCHAR * | dst_filename, |
| D3DXIMAGE_FILEFORMAT | file_format, | ||
| IDirect3DSurface9 * | src_surface, | ||
| const PALETTEENTRY * | src_palette, | ||
| const RECT * | src_rect | ||
| ) |
Definition at line 2928 of file surface.c.
|
static |
Definition at line 312 of file surface.c.
Referenced by d3dx_pixel_format_id_from_dds_pixel_format().
|
static |
Definition at line 385 of file surface.c.
Referenced by d3dx_init_dds_header(), and d3dx_save_pixels_to_memory().
|
static |
Definition at line 887 of file surface.c.
Referenced by d3dx_image_init().
|
static |
Definition at line 2489 of file surface.c.
Referenced by d3dx_load_pixels_from_pixels().
| void format_from_d3dx_color | ( | const struct pixel_format_desc * | format, |
| const struct d3dx_color * | src, | ||
| BYTE * | dst | ||
| ) |
Definition at line 2051 of file surface.c.
Referenced by convert_argb_pixels(), D3DXFillCubeTexture(), D3DXFillTexture(), D3DXFillVolumeTexture(), and point_filter_argb_pixels().
| void format_to_d3dx_color | ( | const struct pixel_format_desc * | format, |
| const BYTE * | src, | ||
| const PALETTEENTRY * | palette, | ||
| struct d3dx_color * | dst | ||
| ) |
Definition at line 1978 of file surface.c.
Referenced by convert_argb_pixels(), D3DXSHProjectCubeMap(), and point_filter_argb_pixels().
| void get_aligned_rect | ( | uint32_t | left, |
| uint32_t | top, | ||
| uint32_t | right, | ||
| uint32_t | bottom, | ||
| uint32_t | width, | ||
| uint32_t | height, | ||
| const struct pixel_format_desc * | fmt_desc, | ||
| RECT * | aligned_rect | ||
| ) |
Definition at line 2654 of file surface.c.
Referenced by d3dx_load_surface_from_memory(), and d3dx_load_volume_from_memory().
|
static |
Definition at line 1955 of file surface.c.
Referenced by format_to_d3dx_color().
|
static |
Definition at line 1901 of file surface.c.
Referenced by convert_argb_pixels(), and point_filter_argb_pixels().
|
static |
Definition at line 835 of file surface.c.
Referenced by d3dx_initialize_image_from_wic().
|
static |
Definition at line 1868 of file surface.c.
Referenced by convert_argb_pixels(), and point_filter_argb_pixels().
| HRESULT lock_surface | ( | IDirect3DSurface9 * | surface, |
| const RECT * | surface_rect, | ||
| D3DLOCKED_RECT * | lock, | ||
| IDirect3DSurface9 ** | temp_surface, | ||
| BOOL | write | ||
| ) |
Definition at line 156 of file surface.c.
Referenced by d3dx_load_surface_from_memory(), D3DXFillTexture(), D3DXLoadSurfaceFromSurface(), D3DXSaveSurfaceToFileInMemory(), and save_dds_surface_to_memory().
Definition at line 1938 of file surface.c.
Referenced by convert_argb_pixels(), and point_filter_argb_pixels().
| void point_filter_argb_pixels | ( | const BYTE * | src, |
| UINT | src_row_pitch, | ||
| UINT | src_slice_pitch, | ||
| const struct volume * | src_size, | ||
| const struct pixel_format_desc * | src_format, | ||
| BYTE * | dst, | ||
| UINT | dst_row_pitch, | ||
| UINT | dst_slice_pitch, | ||
| const struct volume * | dst_size, | ||
| const struct pixel_format_desc * | dst_format, | ||
| D3DCOLOR | color_key, | ||
| const PALETTEENTRY * | palette | ||
| ) |
Definition at line 2280 of file surface.c.
Referenced by d3dx_load_pixels_from_pixels().
|
static |
Definition at line 562 of file surface.c.
Referenced by D3DXSaveSurfaceToFileInMemory().
| HRESULT unlock_surface | ( | IDirect3DSurface9 * | surface, |
| const RECT * | surface_rect, | ||
| IDirect3DSurface9 * | temp_surface, | ||
| BOOL | update | ||
| ) |
Definition at line 214 of file surface.c.
Referenced by d3dx_load_surface_from_memory(), D3DXFillTexture(), D3DXLoadSurfaceFromSurface(), D3DXSaveSurfaceToFileInMemory(), and save_dds_surface_to_memory().
Definition at line 68 of file surface.c.
Referenced by D3DXSaveSurfaceToFileInMemory().
| HRESULT WINAPI WICCreateImagingFactory_Proxy | ( | UINT | SDKVersion, |
| IWICImagingFactory ** | ppIImagingFactory | ||
| ) |
Definition at line 649 of file proxy.c.
Referenced by d3dx_initialize_image_from_wic(), and D3DXSaveSurfaceToFileInMemory().
| WINE_DEFAULT_DEBUG_CHANNEL | ( | d3dx | ) |
| enum d3dx_pixel_format_id d3dx_pixel_format |
Definition at line 38 of file surface.c.
Referenced by d3dx_pixel_format_id_from_dds_pixel_format(), d3dx_pixel_format_id_from_wic_pixel_format(), dds_pixel_format_from_d3dx_pixel_format_id(), and wic_guid_from_d3dformat().
| const struct { ... } dds_pixel_formats[] |
|
static |
Definition at line 652 of file surface.c.
Referenced by d3dx_get_image_file_format_from_file_signature().
Definition at line 37 of file surface.c.
Referenced by d3dx_pixel_format_id_from_wic_pixel_format().
| const struct { ... } wic_pixel_formats[] |
Referenced by d3dx_pixel_format_id_from_wic_pixel_format(), and wic_guid_from_d3dformat().