xwords/xwords4/android/XWords4
Eric House de00a6c87a fix Nougat-only draw bug
Starting with the release of Nougat there have been cases where the
board would not correctly redraw. It's been most evident when using the
hit feature many times in a row, with something going wrong every fifth
time or so (but not that consistently.) It's as if modifications of the
bitmap backing BoardCanvas were being done asynchronously and not
necessarily all completed when I blit the canvas to the screen via
canvas.drawBitmap(). (As evidence of this I confirmed that a tap on a
tile in the tray after a bad draw would cause the screen to correct
itself even though the only additional rendering was to the tray. So by
the time that second drawBitmap() call happened the bitmap data was
correct: all draws that hadn't completed earlier had done so by now.)

The fix is to call Bitmap.createBitmap(bitmap) and to use the copy as
the source of the canvas.drawBitmap() blit operation. I suspect that
createBitmap() waits for any pending draws into its source to complete
before making the copy. Regardless, if this hasn't fixed the problem
it's made it so rare that I'm not seeing it, and since I'm only doing
the copy on Nougat there's little risk in the change. And I can't detect
any problems coming from the considerable additional memory being used
and immediately marked available for gc.
2016-11-13 13:20:00 -08:00
..
app fix gradle build: remove thumbnail stuff 2016-07-30 17:48:47 -07:00
archive generated files: should have gone with prev commit 2016-09-04 09:42:00 -07:00
assets up release strings 2016-10-25 20:06:10 -07:00
gradle/wrapper AS-generated changes adapting to the 2.0 release 2016-04-07 12:34:58 -07:00
img_src add missing image 2015-08-24 07:42:36 -07:00
jni fix jni crash on Nexus 9: give boolean default value 2016-10-25 08:35:11 -07:00
libs Cleanup: get rid of ListActivity. Eventually all Activities need to 2015-11-24 08:01:16 -08:00
res up release strings 2016-10-25 20:06:10 -07:00
res_src generated files: should have gone with prev commit 2016-09-04 09:42:00 -07:00
src fix Nougat-only draw bug 2016-11-13 13:20:00 -08:00
.gitignore Merge branch 'android_branch' into android_dualpane2 2016-03-13 17:27:02 -07:00
AndroidManifest.xml up release strings 2016-10-25 20:06:10 -07:00
build.gradle update to new gradle plugin as recommended/generated by AS 2016-06-30 07:15:21 -07:00
build.xml generate project.properties file 2016-07-18 13:25:55 -07:00
build_unchecked.xml version of build.xml modified to pass -xline to javac. For future use... 2010-11-05 05:06:04 -07:00
gradle.properties add exactly as came from modified sample app 2015-11-11 18:55:24 -08:00
gradlew add exactly as came from modified sample app 2015-11-11 18:55:24 -08:00
gradlew.bat add exactly as came from modified sample app 2015-11-11 18:55:24 -08:00
proguard-project.txt adding file required for proguard 2014-07-14 21:46:09 -07:00
project.properties move to sdk-22 breaks jni on x86, so revert to -19 for now. 2016-03-06 09:59:22 -08:00
settings.gradle add exactly as came from modified sample app 2015-11-11 18:55:24 -08:00