From 24eb63f1092e86cb80ee24f7418c2db915fb14fa Mon Sep 17 00:00:00 2001 From: Eric House Date: Tue, 3 Dec 2013 06:28:56 -0800 Subject: [PATCH] Revert "replace ARGB_8888 with RGB_565 where possible to halve memory" This reverts commit b7e44195c6401e409b865a2f336cdfde8c14c1c2. --- .../XWords4/src/org/eehouse/android/xw4/BoardCanvas.java | 2 +- .../android/XWords4/src/org/eehouse/android/xw4/BoardView.java | 2 +- .../XWords4/src/org/eehouse/android/xw4/ExpiringDelegate.java | 2 +- .../android/XWords4/src/org/eehouse/android/xw4/GameUtils.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardCanvas.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardCanvas.java index 0f7fca16b..958d5b88f 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardCanvas.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardCanvas.java @@ -844,7 +844,7 @@ public class BoardCanvas extends Canvas implements DrawCtx { if ( !useDark ) { Bitmap src = ((BitmapDrawable)arrow).getBitmap(); - Bitmap bitmap = src.copy( Bitmap.Config.RGB_565, true ); + Bitmap bitmap = src.copy( Bitmap.Config.ARGB_8888, true ); for ( int xx = 0; xx < bitmap.getWidth(); ++xx ) { for( int yy = 0; yy < bitmap.getHeight(); ++yy ) { if ( BLACK == bitmap.getPixel( xx, yy ) ) { diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardView.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardView.java index bb49895fe..0d3e126f3 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardView.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardView.java @@ -229,7 +229,7 @@ public class BoardView extends View implements BoardHandler, SyncedDraw { if ( null == s_bitmap ) { s_bitmap = Bitmap.createBitmap( bmWidth, bmHeight, - Bitmap.Config.RGB_565 ); + Bitmap.Config.ARGB_8888 ); } if ( null == m_canvas ) { m_canvas = new BoardCanvas( m_parent, s_bitmap, m_jniThread, diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/ExpiringDelegate.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/ExpiringDelegate.java index d9227ab4c..28b89470f 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/ExpiringDelegate.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/ExpiringDelegate.java @@ -179,7 +179,7 @@ public class ExpiringDelegate { private Drawable mkBackground( int pct ) { Assert.assertTrue( 0 <= pct && pct <= 100 ); - Bitmap bm = Bitmap.createBitmap( 100, 1, Bitmap.Config.RGB_565 ); + Bitmap bm = Bitmap.createBitmap( 100, 1, Bitmap.Config.ARGB_8888 ); Canvas canvas = new Canvas(bm); Paint paint = new Paint(); diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameUtils.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameUtils.java index 646f2ccf6..ac9d08e6c 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameUtils.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameUtils.java @@ -343,7 +343,7 @@ public class GameUtils { int size = dim - (dim % nCols); thumb = Bitmap.createBitmap( size, size, - Bitmap.Config.RGB_565 ); + Bitmap.Config.ARGB_8888 ); XwJNI.board_figureLayout( gamePtr, gi, 0, 0, size, size, 0, 0, 0, 20, 20, false, null );