#include <stdint.h>
#include <ipxe/refcnt.h>
#include <ipxe/image.h>
#include <ipxe/test.h>
Go to the source code of this file.
◆ PIX
| #define PIX |
( |
|
_name, |
|
|
|
_type, |
|
|
|
_file, |
|
|
|
_width, |
|
|
|
_height, |
|
|
|
_data |
|
) |
| |
Value:static const char _name ## __file[] = _file; \
static
const uint32_t _name ## __data[] = _data; \
static
struct image _name ## __image = { \
.name = #_name, \
.
data = _name ## __file, \
.
len =
sizeof ( _name ## __file ), \
}; \
.image = & _name ## __image, \
.
data = _name ## __data, \
.
len =
sizeof ( _name ## __data ), \
};
const void * data
Read-only data.
#define IMAGE_STATIC
Image is statically allocated.
struct image_type * type
Image type.
size_t len
Length of pixel data.
unsigned int height
Height.
#define IMAGE_STATIC_NAME
Image name is statically allocated.
uint8_t data[48]
Additional event data.
#define REF_INIT(free_fn)
Initialise a static reference counter.
void ref_no_free(struct refcnt *refcnt __unused)
Do not free reference-counted object.
struct refcnt refcnt
Reference count.
Define a pixel buffer test.
- Parameters
-
| _name | Test name |
| _type | Test image file type |
| _file | Test image file data |
| _width | Expected pixel buffer width |
| _height | Expected pixel buffer height |
| _data | Expected pixel buffer data |
- Return values
-
Definition at line 38 of file pixbuf_test.h.
◆ pixbuf_ok
Report pixel buffer test result.
- Parameters
-
Definition at line 65 of file pixbuf_test.h.
◆ FILE_LICENCE()
| FILE_LICENCE |
( |
GPL2_OR_LATER_OR_UBDL |
| ) |
|
◆ pixbuf_okx()
| void pixbuf_okx |
( |
struct pixel_buffer_test * |
test, |
|
|
const char * |
file, |
|
|
unsigned int |
line |
|
) |
| |
Report pixel buffer test result.
- Parameters
-
| test | Pixel buffer test |
| file | Test code file |
| line | Test code line |
Definition at line 49 of file pixbuf_test.c.
60 okx (
test->image->type ==
test->type, file, line );
75 pixbuf_put ( pixbuf );
int image_pixbuf(struct image *image, struct pixel_buffer **pixbuf)
Create pixel buffer from image.
struct arbelprm_rc_send_wqe rc
unsigned int height
Height.
#define okx(success, file, line)
Report test result.
assert((readw(&hdr->flags) &(GTF_reading|GTF_writing))==0)
uint32_t * data
32-bit (8:8:8:8) xRGB pixel data, in host-endian order
int register_image(struct image *image)
Register executable image.
void unregister_image(struct image *image)
Unregister executable image.
int memcmp(const void *first, const void *second, size_t len)
Compare memory regions.
References assert(), pixel_buffer::data, pixel_buffer::height, image_pixbuf(), pixel_buffer::len, memcmp(), okx, rc, register_image(), test, unregister_image(), and pixel_buffer::width.