Skip to content

Commit

Permalink
Version 2.5.6
Browse files Browse the repository at this point in the history
  • Loading branch information
vfr committed Apr 17, 2012
1 parent 01645e9 commit ba7286a
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 8 deletions.
12 changes: 11 additions & 1 deletion README
Expand Up @@ -51,7 +51,7 @@ NOTES

Version 2.x of the PDF reader/viewer code was originally developed
and tested under Xcode 3.2.6, LLVM 1.7, iOS 4.3.5, iOS 4.2.1 with
current development and testing under Xcode 4.3, Clang 3.1, iOS 5.
current development and testing under Xcode 4.3.2, LLVM 3.1, iOS 5.
The code uses manual memory management and will continue to do so.

The overall PDF reader/viewer functionality is encapsulated in the
Expand Down Expand Up @@ -145,6 +145,11 @@ READER_STANDALONE - If FALSE, a "Done" button is added to the toolbar
and the -dismissReaderViewController: delegate method is messaged when
it is tapped.

READER_DISABLE_RETINA - If TRUE, sets the CATiledLayer contentScale
to 1.0f. This effectively disables retina support and results in
non-retina device rendering speeds on retina display devices at
the loss of retina display quality.

ReaderDocument Archiving
------------------------

Expand Down Expand Up @@ -224,6 +229,11 @@ HISTORY
- Bug fix to PDF link handling with cropboxed PDF files.
- Some performance improvements on iPad 3rd generation.

2012-04-16: Version 2.5.6

- Now loads and decodes thumbnail PNGs on a background thread.
- Added READER_DISABLE_RETINA #define performance option.

CONTACT INFO
============

Expand Down
4 changes: 2 additions & 2 deletions Reader-Info.plist
Expand Up @@ -26,9 +26,9 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>2.5.5</string>
<string>2.5.6</string>
<key>CFBundleShortVersionString</key>
<string>2.5.5</string>
<string>2.5.6</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIPrerenderedIcon</key>
Expand Down
Binary file modified Resources/Reader.pdf
Binary file not shown.
3 changes: 2 additions & 1 deletion Sources/ReaderConstants.h
@@ -1,6 +1,6 @@
//
// ReaderConstants.h
// Reader v2.5.4
// Reader v2.5.6
//
// Created by Julius Oklamcak on 2011-07-01.
// Copyright © 2011-2012 Julius Oklamcak. All rights reserved.
Expand Down Expand Up @@ -29,6 +29,7 @@
#define READER_ENABLE_MAIL TRUE
#define READER_ENABLE_PRINT TRUE
#define READER_ENABLE_THUMBS TRUE
#define READER_DISABLE_RETINA FALSE
#define READER_DISABLE_IDLE FALSE
#define READER_SHOW_SHADOWS TRUE
#define READER_STANDALONE FALSE
Expand Down
16 changes: 15 additions & 1 deletion Sources/ReaderContentPage.m
@@ -1,6 +1,6 @@
//
// ReaderContentPage.m
// Reader v2.5.5
// Reader v2.5.6
//
// Created by Julius Oklamcak on 2011-07-01.
// Copyright © 2011-2012 Julius Oklamcak. All rights reserved.
Expand All @@ -23,6 +23,7 @@
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//

#import "ReaderConstants.h"
#import "ReaderContentPage.h"
#import "ReaderContentTile.h"
#import "CGPDFDocument.h"
Expand Down Expand Up @@ -552,6 +553,19 @@ - (void)dealloc
[super dealloc];
}

#if (READER_DISABLE_RETINA == TRUE) // Option

- (void)didMoveToWindow
{
#ifdef DEBUGX
NSLog(@"%s", __FUNCTION__);
#endif

self.contentScaleFactor = 1.0f; // Override scale factor
}

#endif // end of READER_DISABLE_RETINA Option

/*
- (void)layoutSubviews
{
Expand Down
14 changes: 11 additions & 3 deletions Sources/ReaderThumbFetch.m
@@ -1,6 +1,6 @@
//
// ReaderThumbFetch.m
// Reader v2.5.4
// Reader v2.5.6
//
// Created by Julius Oklamcak on 2011-09-01.
// Copyright © 2011-2012 Julius Oklamcak. All rights reserved.
Expand Down Expand Up @@ -134,7 +134,15 @@ - (void)main

CGImageRelease(imageRef); // Release the CGImage reference from the above thumb load code

[[ReaderThumbCache sharedInstance] setObject:image forKey:request.cacheKey]; // Update cache
UIGraphicsBeginImageContextWithOptions(image.size, YES, request.scale); // Graphics context

[image drawAtPoint:CGPointZero]; // Decode and draw the image on this background thread

UIImage *decoded = UIGraphicsGetImageFromCurrentImageContext(); // Newly decoded image

UIGraphicsEndImageContext(); // Cleanup after the bitmap-based graphics drawing context

[[ReaderThumbCache sharedInstance] setObject:decoded forKey:request.cacheKey]; // Update cache

if (self.isCancelled == NO) // Show the image in the target thumb view on the main thread
{
Expand All @@ -144,7 +152,7 @@ - (void)main

dispatch_async(dispatch_get_main_queue(), // Queue image show on main thread
^{
if (thumbView.targetTag == targetTag) [thumbView showImage:image];
if (thumbView.targetTag == targetTag) [thumbView showImage:decoded];
});
}
}
Expand Down

0 comments on commit ba7286a

Please sign in to comment.