diff options
author | Stephen Hines <srhines@google.com> | 2012-12-19 19:33:13 -0800 |
---|---|---|
committer | Stephen Hines <srhines@google.com> | 2012-12-19 19:34:17 -0800 |
commit | d34dc85f8f6d095f4c65a6f75477230ec2f19578 (patch) | |
tree | cc4fd382b5145394d154f911292d1966242cd9c9 /graphics/java/android/renderscript/Allocation.java | |
parent | a2303750fb03839e9c7584a5f573f166465be214 (diff) |
We can only optimize bitmaps that have USAGE_SHARED.
Change-Id: I1149a9e25738da5ee348e3c18e7fdd7c1948e89e
Diffstat (limited to 'graphics/java/android/renderscript/Allocation.java')
-rw-r--r-- | graphics/java/android/renderscript/Allocation.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/graphics/java/android/renderscript/Allocation.java b/graphics/java/android/renderscript/Allocation.java index 577bccabf42f..5e9872fa7249 100644 --- a/graphics/java/android/renderscript/Allocation.java +++ b/graphics/java/android/renderscript/Allocation.java @@ -1172,7 +1172,7 @@ public class Allocation extends BaseObj { // enable optimized bitmap path only with no mipmap and script-only usage if (mips == MipmapControl.MIPMAP_NONE && t.getElement().isCompatible(Element.RGBA_8888(rs)) && - usage == USAGE_SCRIPT) { + usage == (USAGE_SHARED | USAGE_SCRIPT)) { int id = rs.nAllocationCreateBitmapBackedAllocation(t.getID(rs), mips.mID, b, usage); if (id == 0) { throw new RSRuntimeException("Load failed."); |