This repository has been archived by the owner on Jan 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
performance-1.7.3.patch
126 lines (119 loc) · 4.39 KB
/
performance-1.7.3.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
diff -Nur -x defines.h -x ApplicationRouting.m build.orig/iphone/Classes/ApplicationRouting.h build/iphone/Classes/ApplicationRouting.h
--- build.orig/iphone/Classes/ApplicationRouting.h 2011-11-02 21:29:34.000000000 +0900
+++ build/iphone/Classes/ApplicationRouting.h 2011-11-02 21:48:58.000000000 +0900
@@ -1,10 +1,13 @@
/**
* Appcelerator Titanium Mobile
- * This is generated code. Do not modify. Your changes will be lost.
+ * This is generated code. Do not modify. Your changes *will* be lost.
+ * Generated code is Copyright (c) 2009-2011 by Appcelerator, Inc.
+ * All Rights Reserved.
*/
#import <Foundation/Foundation.h>
@interface ApplicationRouting : NSObject {
}
+ (NSData*) resolveAppAsset:(NSString*)path;
+
@end
diff -Nur -x defines.h -x ApplicationRouting.m build.orig/iphone/Classes/TiUILabel.m build/iphone/Classes/TiUILabel.m
--- build.orig/iphone/Classes/TiUILabel.m 2011-11-02 21:29:35.000000000 +0900
+++ build/iphone/Classes/TiUILabel.m 2011-11-02 21:42:30.000000000 +0900
@@ -251,6 +251,20 @@
[[self label] setShadowOffset:size];
}
+// override
+-(void)setBackgroundColor_:(id)color
+{
+ if ([color isKindOfClass:[UIColor class]])
+ {
+ label.backgroundColor = color;
+ }
+ else
+ {
+ TiColor *ticolor = [TiUtils colorValue:color];
+ label.backgroundColor = [ticolor _color];
+ }
+}
+
@end
-#endif
\ No newline at end of file
+#endif
diff -Nur -x defines.h -x ApplicationRouting.m build.orig/iphone/Classes/TiUIWebView.m build/iphone/Classes/TiUIWebView.m
--- build.orig/iphone/Classes/TiUIWebView.m 2011-11-02 21:29:35.000000000 +0900
+++ build/iphone/Classes/TiUIWebView.m 2011-11-02 21:42:30.000000000 +0900
@@ -104,7 +104,7 @@
webview = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, 10, 1)];
webview.delegate = self;
- webview.opaque = NO;
+ webview.opaque = YES;
webview.backgroundColor = [UIColor whiteColor];
webview.contentMode = UIViewContentModeRedraw;
[self addSubview:webview];
@@ -747,4 +747,4 @@
@end
-#endif
\ No newline at end of file
+#endif
diff -Nur -x defines.h -x ApplicationRouting.m build.orig/iphone/Classes/UIImage+Resize.m build/iphone/Classes/UIImage+Resize.m
--- build.orig/iphone/Classes/UIImage+Resize.m 2011-11-02 21:29:35.000000000 +0900
+++ build/iphone/Classes/UIImage+Resize.m 2011-11-02 21:48:51.000000000 +0900
@@ -21,57 +21,8 @@
image:(UIImage*)image
hires:(BOOL)hires
{
- CGImageRef imageRef = image.CGImage;
- CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
-
- CGFloat scale = 1.0;
-#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_4_0
- if ([TiUtils isIOS4OrGreater]) {
- scale = [image scale];
- // Force scaling to 2.0
- if ([TiUtils isRetinaDisplay] && hires) {
- scale = 2.0;
- }
- }
-#endif
-
- CGRect newRect = CGRectIntegral(CGRectMake(0, 0, newSize.width*scale, newSize.height*scale));
- CGRect transposedRect = CGRectMake(0, 0, newRect.size.height, newRect.size.width);
-
- // Build a context that's the same dimensions as the new size
- CGContextRef bitmap = CGBitmapContextCreate(NULL,
- newRect.size.width,
- newRect.size.height,
- 8,
- 0,
- colorSpace,
- kCGImageAlphaPremultipliedLast);
-
- // Rotate and/or flip the image if required by its orientation
- CGContextConcatCTM(bitmap, transform);
-
- // Set the quality level to use when rescaling
- CGContextSetInterpolationQuality(bitmap, quality);
-
- // Draw into the context; this scales the image
- CGContextDrawImage(bitmap, transpose ? transposedRect : newRect, imageRef);
-
- // Get the resized image from the context and a UIImage
- CGImageRef newImageRef = CGBitmapContextCreateImage(bitmap);
- UIImage *newImage = nil;
- if ([TiUtils isIOS4OrGreater]) {
- newImage = [UIImage imageWithCGImage:newImageRef scale:scale orientation:UIImageOrientationUp];
- }
- else {
- newImage = [UIImage imageWithCGImage:newImageRef];
- }
-
- // Clean up
- CGContextRelease(bitmap);
- CGImageRelease(newImageRef);
- CGColorSpaceRelease(colorSpace);
-
- return newImage;
+ // patched: Do Nothing
+ return image;
}
// Returns an affine transform that takes into account the image orientation when drawing a scaled image