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:
Bernd Busse
2019-12-20 20:31:00 +01:00
parent 0000cc1d98
commit 33c5a5a36b
10 changed files with 71 additions and 7 deletions

View File

@@ -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 ===========

View File

@@ -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) {

View File

@@ -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;