mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-29 08:34:37 +01:00
fix prev optimization clearing board on load so it only happens when a
different board is about to be drawn. Fixes flash when btinvite dialog goes away.
This commit is contained in:
parent
0f90538598
commit
afedc8d9f5
1 changed files with 7 additions and 1 deletions
|
@ -45,7 +45,10 @@ public class BoardView extends View implements BoardHandler, SyncedDraw {
|
|||
private static final float MIN_FONT_DIPS = 10.0f;
|
||||
private static final int MULTI_INACTIVE = -1;
|
||||
|
||||
private static boolean s_isFirstDraw;
|
||||
private static int s_curGameID;
|
||||
private static Bitmap s_bitmap; // the board
|
||||
|
||||
private static final int PINCH_THRESHOLD = 40;
|
||||
|
||||
private Context m_context;
|
||||
|
@ -240,7 +243,7 @@ public class BoardView extends View implements BoardHandler, SyncedDraw {
|
|||
if ( null == s_bitmap ) {
|
||||
s_bitmap = Bitmap.createBitmap( bmWidth, bmHeight,
|
||||
Bitmap.Config.ARGB_8888 );
|
||||
} else {
|
||||
} else if ( s_isFirstDraw ) {
|
||||
// clear so prev game doesn't seem to appear briefly. Color
|
||||
// doesn't seem to matter....
|
||||
s_bitmap.eraseColor( 0 );
|
||||
|
@ -275,6 +278,9 @@ public class BoardView extends View implements BoardHandler, SyncedDraw {
|
|||
m_layoutWidth = 0;
|
||||
m_layoutHeight = 0;
|
||||
|
||||
s_isFirstDraw = s_curGameID != gi.gameID;
|
||||
s_curGameID = gi.gameID;
|
||||
|
||||
// Set the jni layout if we already have one
|
||||
if ( null != m_dims ) {
|
||||
m_jniThread.handle( JNIThread.JNICmd.CMD_LAYOUT, m_dims );
|
||||
|
|
Loading…
Add table
Reference in a new issue