Android - Signal 11, RS CPP error: Blur radius out of 0-25 pixel bound

后端 未结 3 1924
花落未央
花落未央 2020-12-10 11:24

When upgrading my application to run on 4.4.2 devices I received the error

RS CPP error: Blur radius out of 0-25 pixel bound

accompanied by

3条回答
  •  再見小時候
    2020-12-10 12:16

    If you need to go higher than a 25 pixel blur radius, then you can turn off hardware rendering.

    android:layerType="software"
    

    or

    myView.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
    

    See the Hardware acceleration documentation.

    In my experience, turning off the "acceleration" didn't seem to negatively affect the performance for my particular app. However, there was a slightly noticeable difference in the quality of the blur.

    With hardware rendering:

    With software rendering:

    (The two images above were taken from a Xiaomi 2 phone running Android 5. Newer hardware and software might give different results.)

    This quality hit is undesirable but I found it to be acceptable for most cases. And there really wasn't another option since in addition to the above crash I was getting a lot of other very strange bugs when using hardware acceleration.

提交回复
热议问题