diff options
Diffstat (limited to 'src/com/android/gallery3d/ui/BitmapTileProvider.java')
-rw-r--r-- | src/com/android/gallery3d/ui/BitmapTileProvider.java | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/com/android/gallery3d/ui/BitmapTileProvider.java b/src/com/android/gallery3d/ui/BitmapTileProvider.java index d4c9b1d30..c3466e7fe 100644 --- a/src/com/android/gallery3d/ui/BitmapTileProvider.java +++ b/src/com/android/gallery3d/ui/BitmapTileProvider.java @@ -25,7 +25,7 @@ import com.android.gallery3d.data.BitmapPool; import java.util.ArrayList; -public class BitmapTileProvider implements TileImageView.Model { +public class BitmapTileProvider implements TileImageView.TileSource { private final ScreenNail mScreenNail; private final Bitmap[] mMipmaps; private final Config mConfig; @@ -72,22 +72,21 @@ public class BitmapTileProvider implements TileImageView.Model { @Override public Bitmap getTile(int level, int x, int y, int tileSize, - int borderSize, BitmapPool pool) { + BitmapPool pool) { x >>= level; y >>= level; - int size = tileSize + 2 * borderSize; Bitmap result = pool == null ? null : pool.getBitmap(); if (result == null) { - result = Bitmap.createBitmap(size, size, mConfig); + result = Bitmap.createBitmap(tileSize, tileSize, mConfig); } else { result.eraseColor(0); } Bitmap mipmap = mMipmaps[level]; Canvas canvas = new Canvas(result); - int offsetX = -x + borderSize; - int offsetY = -y + borderSize; + int offsetX = -x; + int offsetY = -y; canvas.drawBitmap(mipmap, offsetX, offsetY, null); return result; } |