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
/
Copy pathperformance-1.8.0.1.patch
100 lines (94 loc) · 3.52 KB
/
performance-1.8.0.1.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
diff -Nur -x defines.h -x ApplicationRouting.h -x ApplicationRouting.m build.orig/iphone/Classes/TiUILabel.m build/iphone/Classes/TiUILabel.m
--- build.orig/iphone/Classes/TiUILabel.m 2011-12-24 15:18:19.000000000 +0900
+++ build/iphone/Classes/TiUILabel.m 2011-12-24 15:45:13.000000000 +0900
@@ -263,6 +263,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.h -x ApplicationRouting.m build.orig/iphone/Classes/TiUIWebView.m build/iphone/Classes/TiUIWebView.m
--- build.orig/iphone/Classes/TiUIWebView.m 2011-12-24 15:18:19.000000000 +0900
+++ build/iphone/Classes/TiUIWebView.m 2011-12-24 15:45:35.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];
@@ -752,4 +752,4 @@
@end
-#endif
\ No newline at end of file
+#endif
diff -Nur -x defines.h -x ApplicationRouting.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-12-24 15:18:19.000000000 +0900
+++ build/iphone/Classes/UIImage+Resize.m 2011-12-24 15:47:02.000000000 +0900
@@ -21,49 +21,8 @@
image:(UIImage*)image
hires:(BOOL)hires
{
- CGImageRef imageRef = image.CGImage;
- CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
-
- CGFloat scale = 1.0;
-
- scale = [image scale];
- // Force scaling to 2.0
- if ([TiUtils isRetinaDisplay] && hires) {
- scale = 2.0;
- }
-
-
- 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 = [UIImage imageWithCGImage:newImageRef scale:scale orientation:UIImageOrientationUp];
-
- // 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