Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

0.99.6: faster wallpapers drawing; no mirroring

  • Loading branch information...
commit d396405eaabac7cb2e8287cfde190fd61a1008d0 1 parent 1d8db1d
@geometer geometer authored
View
2  AndroidManifest.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.geometerplus.zlibrary.ui.android" android:versionCode="9905" android:versionName="0.99.5" android:installLocation="auto">
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.geometerplus.zlibrary.ui.android" android:versionCode="9906" android:versionName="0.99.6" android:installLocation="auto">
<uses-sdk android:minSdkVersion="4" />
<supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:anyDensity="true" />
<uses-permission android:name="android.permission.INTERNET" />
View
3  ChangeLog
@@ -1,3 +1,6 @@
+===== 0.99.6 (Jan 22, 2011) =====
+* Wallpaper drawing speed-up
+
===== 0.99.5 (Jan 22, 2011) =====
* High-resolution menu icons have been added
* Menu icons style has been changed to be android 2.3-compliant
View
2  VERSION
@@ -1 +1 @@
-0.99.5
+0.99.6
View
2  src/org/geometerplus/fbreader/fbreader/FBView.java
@@ -551,7 +551,7 @@ public void paint(ZLPaintContext context) {
final int infoWidth = context.getStringWidth(infoString);
final ZLFile wallpaper = getWallpaperFile();
if (wallpaper != null) {
- context.clear(wallpaper, wallpaper instanceof ZLResourceFile);
+ context.clear(wallpaper);
} else {
context.clear(getBackgroundColor());
}
View
2  src/org/geometerplus/zlibrary/core/view/DummyPaintContext.java
@@ -29,7 +29,7 @@
DummyPaintContext() {
}
- public void clear(ZLFile wallpaperFile, boolean doMirror) {
+ public void clear(ZLFile wallpaperFile) {
}
public void clear(ZLColor color) {
View
2  src/org/geometerplus/zlibrary/core/view/ZLPaintContext.java
@@ -41,7 +41,7 @@
protected ZLPaintContext() {
}
- abstract public void clear(ZLFile wallpaperFile, boolean doMirror);
+ abstract public void clear(ZLFile wallpaperFile);
abstract public void clear(ZLColor color);
private boolean myResetFont = true;
View
2  src/org/geometerplus/zlibrary/text/view/ZLTextView.java
@@ -257,7 +257,7 @@ public synchronized void paint(ZLPaintContext context, int viewPage) {
myContext = context;
final ZLFile wallpaper = getWallpaperFile();
if (wallpaper != null) {
- context.clear(wallpaper, wallpaper instanceof ZLResourceFile);
+ context.clear(wallpaper);
} else {
context.clear(getBackgroundColor());
}
View
22 src/org/geometerplus/zlibrary/ui/android/view/ZLAndroidPaintContext.java
@@ -67,30 +67,12 @@
private ZLFile myWallpaperFile;
private Bitmap myWallpaper;
@Override
- public void clear(ZLFile wallpaperFile, boolean doMirror) {
+ public void clear(ZLFile wallpaperFile) {
if (!wallpaperFile.equals(myWallpaperFile)) {
myWallpaperFile = wallpaperFile;
myWallpaper = null;
try {
- final Bitmap fileBitmap =
- new BitmapFactory().decodeStream(wallpaperFile.getInputStream());
- if (doMirror) {
- final int w = fileBitmap.getWidth();
- final int h = fileBitmap.getHeight();
- final Bitmap wallpaper = Bitmap.createBitmap(2 * w, 2 * h, fileBitmap.getConfig());
- for (int i = 0; i < w; ++i) {
- for (int j = 0; j < h; ++j) {
- int color = fileBitmap.getPixel(i, j);
- wallpaper.setPixel(i, j, color);
- wallpaper.setPixel(i, 2 * h - j - 1, color);
- wallpaper.setPixel(2 * w - i - 1, j, color);
- wallpaper.setPixel(2 * w - i - 1, 2 * h - j - 1, color);
- }
- }
- myWallpaper = wallpaper;
- } else {
- myWallpaper = fileBitmap;
- }
+ myWallpaper = new BitmapFactory().decodeStream(wallpaperFile.getInputStream());
} catch (Throwable t) {
t.printStackTrace();
}
Please sign in to comment.
Something went wrong with that request. Please try again.