Skip to content

RenderNodeBlurController does not use DEFAULT_BLUR_RADIUS #266

Description

@nikclayton

Please include:

  1. Library version: "com.github.Dimezis:BlurView:version-3.2.0"

In BlurViewFacade.setBlurRadius, the default value is noted:

/**
* @param radius sets the blur radius. The real blur radius is radius * scaleFactor.
* Default value is {@link BlurController#DEFAULT_BLUR_RADIUS}
* @return {@link BlurViewFacade}
*/
BlurViewFacade setBlurRadius(float radius);

and is defined in

However, in RenderNodeBlurController.java it is not used, instead it is set to 1f

So

binding.blurView.setupWith(binding.blurTarget)
    .setBlurRadius(BlurController.DEFAULT_BLUR_RADIUS)

gives a very different result to

binding.blurView.setupWith(binding.blurTarget)

on systems where RenderNodeBlurController is used (i.e., where hardware rendering is available).

Fixing this to use the same default in both should probably be considered a breaking change in the library, warranting a major version bump, as it will cause the externally-visible default behaviour to change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions