Loading jni/filters/tinyplanet.cc +1 −0 Original line number Diff line number Diff line Loading @@ -80,6 +80,7 @@ inline void InterpolatePixel(const ImageRGBA &image, float x, float y, ax * ay * p2[4] + axn * ay * p2[0] + 0.5f); p++; p2++; dest[3] = 0xFF; } // Wrap circular coordinates around the globe Loading src/com/android/gallery3d/filtershow/EditorPlaceHolder.java +9 −1 Original line number Diff line number Diff line package com.android.gallery3d.filtershow; import android.view.View; import android.view.ViewParent; import android.widget.FrameLayout; import com.android.gallery3d.filtershow.cache.ImageLoader; Loading Loading @@ -49,7 +50,14 @@ public class EditorPlaceHolder { editor.setImageLoader(mImageLoader); mContainer.setVisibility(View.VISIBLE); mContainer.removeAllViews(); mContainer.addView(editor.getTopLevelView()); View eview = editor.getTopLevelView(); ViewParent parent = eview.getParent(); if (parent != null && parent instanceof FrameLayout) { ((FrameLayout) parent).removeAllViews(); } mContainer.addView(eview); hideOldViews(); editor.setVisibility(View.VISIBLE); return editor; Loading src/com/android/gallery3d/filtershow/FilterShowActivity.java +2 −1 Original line number Diff line number Diff line Loading @@ -482,7 +482,8 @@ public class FilterShowActivity extends FragmentActivity implements OnItemClickL if (mAction == CROP_ACTION) { mPanelController.showComponent(findViewById(EditorCrop.ID)); } else if (mAction == TINY_PLANET_ACTION) { mPanelController.showComponent(findViewById(EditorTinyPlanet.ID)); FilterIconButton button = (FilterIconButton) findViewById(EditorTinyPlanet.ID); button.onClick(button); } super.onPostExecute(result); } Loading src/com/android/gallery3d/filtershow/cache/CachingPipeline.java +10 −4 Original line number Diff line number Diff line Loading @@ -22,9 +22,9 @@ import android.graphics.Bitmap; import android.support.v8.renderscript.Allocation; import android.support.v8.renderscript.RenderScript; import android.util.Log; import com.android.gallery3d.filtershow.filters.FiltersManager; import com.android.gallery3d.filtershow.filters.ImageFilterGeometry; import com.android.gallery3d.filtershow.filters.ImageFilterRS; import com.android.gallery3d.filtershow.imageshow.GeometryMetadata; import com.android.gallery3d.filtershow.imageshow.MasterImage; import com.android.gallery3d.filtershow.presets.FilterEnvironment; Loading Loading @@ -357,19 +357,25 @@ public class CachingPipeline { Bitmap resizedOriginalBitmap = mResizedOriginalBitmap; if (updateOriginalAllocation(preset)) { resizedOriginalBitmap = mResizedOriginalBitmap; buffer.updateBitmaps(resizedOriginalBitmap); mEnvironment.cache(buffer.getProducer()); buffer.updateProducerBitmap(resizedOriginalBitmap); } Bitmap bitmap = buffer.getProducer(); long time2 = System.currentTimeMillis(); if (bitmap == null || (bitmap.getWidth() != resizedOriginalBitmap.getWidth()) || (bitmap.getHeight() != resizedOriginalBitmap.getHeight())) { buffer.updateBitmaps(resizedOriginalBitmap); mEnvironment.cache(buffer.getProducer()); buffer.updateProducerBitmap(resizedOriginalBitmap); bitmap = buffer.getProducer(); } mOriginalAllocation.copyTo(bitmap); bitmap = preset.apply(bitmap, mEnvironment); Bitmap tmpbitmap = preset.apply(bitmap, mEnvironment); if (tmpbitmap != bitmap) { mEnvironment.cache(buffer.getProducer()); buffer.setProducer(tmpbitmap); } mFiltersManager.freeFilterResources(preset); Loading src/com/android/gallery3d/filtershow/cache/TripleBufferBitmap.java +8 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,14 @@ public class TripleBufferBitmap { mIntermediate = mBitmaps[2]; } public synchronized void updateProducerBitmap(Bitmap bitmap) { mProducer = bitmap.copy(mBitmapConfig, true); } public synchronized void setProducer(Bitmap producer) { mProducer = producer; } public synchronized Bitmap getProducer() { return mProducer; } Loading Loading
jni/filters/tinyplanet.cc +1 −0 Original line number Diff line number Diff line Loading @@ -80,6 +80,7 @@ inline void InterpolatePixel(const ImageRGBA &image, float x, float y, ax * ay * p2[4] + axn * ay * p2[0] + 0.5f); p++; p2++; dest[3] = 0xFF; } // Wrap circular coordinates around the globe Loading
src/com/android/gallery3d/filtershow/EditorPlaceHolder.java +9 −1 Original line number Diff line number Diff line package com.android.gallery3d.filtershow; import android.view.View; import android.view.ViewParent; import android.widget.FrameLayout; import com.android.gallery3d.filtershow.cache.ImageLoader; Loading Loading @@ -49,7 +50,14 @@ public class EditorPlaceHolder { editor.setImageLoader(mImageLoader); mContainer.setVisibility(View.VISIBLE); mContainer.removeAllViews(); mContainer.addView(editor.getTopLevelView()); View eview = editor.getTopLevelView(); ViewParent parent = eview.getParent(); if (parent != null && parent instanceof FrameLayout) { ((FrameLayout) parent).removeAllViews(); } mContainer.addView(eview); hideOldViews(); editor.setVisibility(View.VISIBLE); return editor; Loading
src/com/android/gallery3d/filtershow/FilterShowActivity.java +2 −1 Original line number Diff line number Diff line Loading @@ -482,7 +482,8 @@ public class FilterShowActivity extends FragmentActivity implements OnItemClickL if (mAction == CROP_ACTION) { mPanelController.showComponent(findViewById(EditorCrop.ID)); } else if (mAction == TINY_PLANET_ACTION) { mPanelController.showComponent(findViewById(EditorTinyPlanet.ID)); FilterIconButton button = (FilterIconButton) findViewById(EditorTinyPlanet.ID); button.onClick(button); } super.onPostExecute(result); } Loading
src/com/android/gallery3d/filtershow/cache/CachingPipeline.java +10 −4 Original line number Diff line number Diff line Loading @@ -22,9 +22,9 @@ import android.graphics.Bitmap; import android.support.v8.renderscript.Allocation; import android.support.v8.renderscript.RenderScript; import android.util.Log; import com.android.gallery3d.filtershow.filters.FiltersManager; import com.android.gallery3d.filtershow.filters.ImageFilterGeometry; import com.android.gallery3d.filtershow.filters.ImageFilterRS; import com.android.gallery3d.filtershow.imageshow.GeometryMetadata; import com.android.gallery3d.filtershow.imageshow.MasterImage; import com.android.gallery3d.filtershow.presets.FilterEnvironment; Loading Loading @@ -357,19 +357,25 @@ public class CachingPipeline { Bitmap resizedOriginalBitmap = mResizedOriginalBitmap; if (updateOriginalAllocation(preset)) { resizedOriginalBitmap = mResizedOriginalBitmap; buffer.updateBitmaps(resizedOriginalBitmap); mEnvironment.cache(buffer.getProducer()); buffer.updateProducerBitmap(resizedOriginalBitmap); } Bitmap bitmap = buffer.getProducer(); long time2 = System.currentTimeMillis(); if (bitmap == null || (bitmap.getWidth() != resizedOriginalBitmap.getWidth()) || (bitmap.getHeight() != resizedOriginalBitmap.getHeight())) { buffer.updateBitmaps(resizedOriginalBitmap); mEnvironment.cache(buffer.getProducer()); buffer.updateProducerBitmap(resizedOriginalBitmap); bitmap = buffer.getProducer(); } mOriginalAllocation.copyTo(bitmap); bitmap = preset.apply(bitmap, mEnvironment); Bitmap tmpbitmap = preset.apply(bitmap, mEnvironment); if (tmpbitmap != bitmap) { mEnvironment.cache(buffer.getProducer()); buffer.setProducer(tmpbitmap); } mFiltersManager.freeFilterResources(preset); Loading
src/com/android/gallery3d/filtershow/cache/TripleBufferBitmap.java +8 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,14 @@ public class TripleBufferBitmap { mIntermediate = mBitmaps[2]; } public synchronized void updateProducerBitmap(Bitmap bitmap) { mProducer = bitmap.copy(mBitmapConfig, true); } public synchronized void setProducer(Bitmap producer) { mProducer = producer; } public synchronized Bitmap getProducer() { return mProducer; } Loading