Add support for new blur method dual_kawase [WIP]
**Work-in-Progress** Add `dual_kawase` to configuration and argument parsing. Allow `kawase` for backward compatibility. Add `--blur-strength` parameter for blur-method `dual_kawase`. Update documentation to reflect the new blur-method and parameters.
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "compiler.h"
|
||||
#include "config.h"
|
||||
#include "driver.h"
|
||||
#include "kernel.h"
|
||||
#include "region.h"
|
||||
@@ -65,6 +65,11 @@ struct kernel_blur_args {
|
||||
int kernel_count;
|
||||
};
|
||||
|
||||
struct dual_kawase_blur_args {
|
||||
int size;
|
||||
int strength;
|
||||
};
|
||||
|
||||
struct backend_operations {
|
||||
// =========== Initialization ===========
|
||||
|
||||
|
||||
@@ -977,6 +977,12 @@ void *gl_create_blur_context(backend_t *base, enum blur_method method, void *arg
|
||||
return ctx;
|
||||
}
|
||||
|
||||
if (method == BLUR_METHOD_DUAL_KAWASE) {
|
||||
log_warn("Blur method 'dual_kawase' is not yet implemented.");
|
||||
ctx->method = BLUR_METHOD_NONE;
|
||||
return ctx;
|
||||
}
|
||||
|
||||
int nkernels;
|
||||
ctx->method = BLUR_METHOD_KERNEL;
|
||||
if (method == BLUR_METHOD_KERNEL) {
|
||||
|
||||
@@ -507,6 +507,12 @@ void *create_blur_context(backend_t *base attr_unused, enum blur_method method,
|
||||
ret->method = BLUR_METHOD_NONE;
|
||||
return ret;
|
||||
}
|
||||
if (method == BLUR_METHOD_DUAL_KAWASE) {
|
||||
log_warn("Blur method 'dual_kawase' is not compatible with the 'xrender' "
|
||||
"backend.");
|
||||
ret->method = BLUR_METHOD_NONE;
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret->method = BLUR_METHOD_KERNEL;
|
||||
struct conv **kernels;
|
||||
|
||||
Reference in New Issue
Block a user