diff options
author | Stephen Hines <srhines@google.com> | 2013-01-16 17:54:08 -0800 |
---|---|---|
committer | Stephen Hines <srhines@google.com> | 2013-01-22 18:06:10 -0800 |
commit | 0746ce0977cde616d25ce35fee0d8d554235a21c (patch) | |
tree | 5b4a867d3b96bd250510f03292d964e97e8a1d73 /src/com/android/gallery3d | |
parent | b49e480479c71ed1906ee00423e8c44c7224da91 (diff) | |
download | android_packages_apps_Gallery2-0746ce0977cde616d25ce35fee0d8d554235a21c.tar.gz android_packages_apps_Gallery2-0746ce0977cde616d25ce35fee0d8d554235a21c.tar.bz2 android_packages_apps_Gallery2-0746ce0977cde616d25ce35fee0d8d554235a21c.zip |
Switch Gallery over to RS compatibility library.
Change-Id: If6eaea15a12a1448b402fb00dfd770b3749471ad
Diffstat (limited to 'src/com/android/gallery3d')
-rw-r--r-- | src/com/android/gallery3d/filtershow/cache/FilteringPipeline.java | 8 | ||||
-rw-r--r-- | src/com/android/gallery3d/filtershow/filters/ImageFilterRS.java | 6 |
2 files changed, 5 insertions, 9 deletions
diff --git a/src/com/android/gallery3d/filtershow/cache/FilteringPipeline.java b/src/com/android/gallery3d/filtershow/cache/FilteringPipeline.java index a1dbe8e52..802b556f9 100644 --- a/src/com/android/gallery3d/filtershow/cache/FilteringPipeline.java +++ b/src/com/android/gallery3d/filtershow/cache/FilteringPipeline.java @@ -19,9 +19,7 @@ package com.android.gallery3d.filtershow.cache; import android.graphics.Bitmap; import android.os.*; import android.os.Process; -import android.renderscript.Allocation; -import android.renderscript.Allocation.MipmapControl; -import android.renderscript.RenderScript; +import android.support.v8.renderscript.*; import android.util.Log; import com.android.gallery3d.filtershow.filters.ImageFilterRS; @@ -144,13 +142,13 @@ public class FilteringPipeline implements Handler.Callback { mFiltersOnlyOriginalAllocation.destroy(); } mFiltersOnlyOriginalAllocation = Allocation.createFromBitmap(RS, mOriginalBitmap, - MipmapControl.MIPMAP_NONE, Allocation.USAGE_SCRIPT); + Allocation.MipmapControl.MIPMAP_NONE, Allocation.USAGE_SCRIPT); if (mOriginalAllocation != null) { mOriginalAllocation.destroy(); } mResizedOriginalBitmap = preset.applyGeometry(mOriginalBitmap); mOriginalAllocation = Allocation.createFromBitmap(RS, mResizedOriginalBitmap, - MipmapControl.MIPMAP_NONE, Allocation.USAGE_SCRIPT); + Allocation.MipmapControl.MIPMAP_NONE, Allocation.USAGE_SCRIPT); mPreviousGeometry = new GeometryMetadata(geometry); return true; } diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterRS.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterRS.java index 63dc82c34..368e29a78 100644 --- a/src/com/android/gallery3d/filtershow/filters/ImageFilterRS.java +++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterRS.java @@ -18,9 +18,7 @@ package com.android.gallery3d.filtershow.filters; import android.app.Activity; import android.graphics.Bitmap; -import android.renderscript.Allocation; -import android.renderscript.Allocation.MipmapControl; -import android.renderscript.RenderScript; +import android.support.v8.renderscript.*; import android.util.Log; public class ImageFilterRS extends ImageFilter { @@ -48,7 +46,7 @@ public class ImageFilterRS extends ImageFilter { } Bitmap bitmapBuffer = bitmap.copy(mBitmapConfig, true); mOutPixelsAllocation = Allocation.createFromBitmap(mRS, bitmapBuffer, - MipmapControl.MIPMAP_NONE, Allocation.USAGE_SCRIPT); + Allocation.MipmapControl.MIPMAP_NONE, Allocation.USAGE_SCRIPT); mInPixelsAllocation = Allocation.createTyped(mRS, mOutPixelsAllocation.getType()); sOldBitmap = bitmap; |