summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/ProgramFragmentFixedFunction.java
diff options
context:
space:
mode:
authorRaph Levien <raph@google.com>2012-09-20 22:51:47 -0700
committerRaph Levien <raph@google.com>2012-09-20 22:51:47 -0700
commit005bfc694d167b7da4b565a1c4de03592fdbe86e (patch)
tree8bd5c77721b56646fa8bf3742b4d74d8178a0984 /rs/java/android/renderscript/ProgramFragmentFixedFunction.java
parent314488b791d36756504ee593f818f04b4cd24893 (diff)
Fix for native crash on image decode OOM
When decoding an image with scaling, if the allocation of the bitmap data for the scaled bitmap failed, we were just ignoring it and going on. This was yielding strange native crashes (bug 7196860 and bug 7175536). This patch checks whether the allocation succeeds, and returns a null bitmap if not. Of course, if the app really is OOM because it's allocated too many bitmaps, it'll still get the OOME, but that's a lot nicer than a native crash or memory corruption. Change-Id: I8384059ab11c2ab9e93e283b9438d79e6709b7b1
Diffstat (limited to 'rs/java/android/renderscript/ProgramFragmentFixedFunction.java')
0 files changed, 0 insertions, 0 deletions