Build benchmarks again
parent
d2527e57f0
commit
91bd49848f
|
@ -0,0 +1,20 @@
|
|||
libpng = dependency('libpng', required: false)
|
||||
|
||||
if libpng.found()
|
||||
executable(
|
||||
'zrle-bench',
|
||||
[
|
||||
'zrle-bench.c',
|
||||
'../src/zrle.c',
|
||||
'../src/pngfb.c',
|
||||
'../src/pixels.c',
|
||||
'../src/vec.c',
|
||||
],
|
||||
dependencies: [
|
||||
neatvnc_dep,
|
||||
pixman,
|
||||
aml,
|
||||
libpng,
|
||||
]
|
||||
)
|
||||
endif
|
|
@ -16,35 +16,35 @@
|
|||
|
||||
#include "zrle.h"
|
||||
#include "rfb-proto.h"
|
||||
#include "util.h"
|
||||
#include "vec.h"
|
||||
#include "neatvnc.h"
|
||||
#include "miniz.h"
|
||||
#include "pixels.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <libdrm/drm_fourcc.h>
|
||||
#include <pixman.h>
|
||||
#include <time.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
uint64_t gettime_us(clockid_t clock)
|
||||
static uint64_t gettime_us(clockid_t clock)
|
||||
{
|
||||
struct timespec ts = { 0 };
|
||||
clock_gettime(clock, &ts);
|
||||
return ts.tv_sec * 1000000ULL + ts.tv_nsec / 1000ULL;
|
||||
}
|
||||
|
||||
#pragma push_options
|
||||
#pragma GCC push_options
|
||||
#pragma GCC optimize ("-O0")
|
||||
void memcpy_unoptimized(void* dst, const void* src, size_t len)
|
||||
static void memcpy_unoptimized(void* dst, const void* src, size_t len)
|
||||
{
|
||||
memcpy(dst, src, len);
|
||||
}
|
||||
#pragma pop_options
|
||||
#pragma GCC pop_options
|
||||
|
||||
struct nvnc_fb* read_png_file(const char *filename);
|
||||
|
||||
int run_benchmark(const char *image)
|
||||
static int run_benchmark(const char *image)
|
||||
{
|
||||
int rc = -1;
|
||||
|
||||
|
|
|
@ -109,6 +109,10 @@ if get_option('examples')
|
|||
subdir('examples')
|
||||
endif
|
||||
|
||||
if get_option('benchmarks')
|
||||
subdir('bench')
|
||||
endif
|
||||
|
||||
install_headers('include/neatvnc.h')
|
||||
|
||||
pkgconfig = import('pkgconfig')
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
option('benchmarks', type: 'boolean', value: false, description: 'Build benchmarks')
|
||||
option('examples', type: 'boolean', value: false, description: 'Build examples')
|
||||
option('tight-encoding', type: 'feature', value: 'auto', description: 'Enable Tight encoding')
|
||||
option('tls', type: 'feature', value: 'auto', description: 'Enable encryption & authentication')
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
#include <assert.h>
|
||||
#include <libdrm/drm_fourcc.h>
|
||||
|
||||
struct nvnc_fb* read_png_file(const char* filename);
|
||||
|
||||
struct nvnc_fb* read_png_file(const char* filename)
|
||||
{
|
||||
int width, height;
|
||||
|
|
Loading…
Reference in New Issue