Move rendering related functions out of compton.c
Moved: * Blur kernel related functions to kernel.c * Vsync related functions to vsync.c * paint related functions to render.c This will make the `split-backend` branch easier to rebase. Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
19
src/kernel.h
Normal file
19
src/kernel.h
Normal file
@ -0,0 +1,19 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
// Copyright (c) Yuxuan Shui <yshuiv7@gmail.com>
|
||||
|
||||
#pragma once
|
||||
|
||||
/// Code for generating convolution kernels
|
||||
|
||||
typedef struct conv {
|
||||
int size;
|
||||
double data[];
|
||||
} conv;
|
||||
|
||||
/// Calculate the sum of a rectangle part of the convolution kernel
|
||||
/// the rectangle is defined by top left (x, y), and a size (width x height)
|
||||
double
|
||||
sum_kernel(conv *map, int x, int y, int width, int height);
|
||||
|
||||
/// Create a kernel with gaussian distribution of radius r
|
||||
conv *gaussian_kernel(double r);
|
Reference in New Issue
Block a user