Fixed <rdar://problem/3968753> REGRESSION: Poor performance with differing multiple...
authorrjw <rjw@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 5 Mar 2005 01:33:58 +0000 (01:33 +0000)
committerrjw <rjw@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 5 Mar 2005 01:33:58 +0000 (01:33 +0000)
Disable coalesced updates (in CG).  This restores the
panther behavior.

        Reviewed by David Harrison.

        * WebView.subproj/WebView.m:
        (-[WebView _commonInitializationWithFrameName:groupName:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8789 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKit/ChangeLog
WebKit/WebView.subproj/WebView.m

index dbef0a51dcdb5bd857c58b4ce777b7fea9c17140..7ddbb5aca393f6a2a8c835d3d1f11f1e2af50774 100644 (file)
@@ -1,3 +1,15 @@
+2005-03-04  Richard Williamson   <rjw@apple.com>
+
+       Fixed <rdar://problem/3968753> REGRESSION: Poor performance with differing multiple animated GIFs (was fast in Panther)
+
+       Disable coalesced updates (in CG).  This restores the
+       panther behavior.
+
+        Reviewed by David Harrison.
+
+        * WebView.subproj/WebView.m:
+        (-[WebView _commonInitializationWithFrameName:groupName:]):
+
 2005-03-04  Adele Amchan  <adele@apple.com>
 
         Reviewed by Darin.
index 74f348f4cdc524c29387ef77de3eb9e8a7909463..0569853ea823ad1ed47bd50c676e80a4e5c40a9f 100644 (file)
@@ -66,6 +66,8 @@
 #import <Foundation/NSURLRequestPrivate.h>
 #import <Foundation/NSUserDefaults_NSURLExtras.h>
 
+#include <CoreGraphics/CGSConnection.h>
+
 #define FOR_EACH_RESPONDER_SELECTOR(macro) \
 macro(alignCenter) \
 macro(alignJustified) \
@@ -169,6 +171,10 @@ macro(yankAndSelect) \
 - (BOOL)_shouldAutoscrollForDraggingInfo:(id)dragInfo;
 @end
 
+@interface NSApplication (AppKitSecrectsIKnow)
+- (CGSConnectionID)contextID;
+@end
+
 @interface WebView (WebFileInternal)
 - (void)_preflightSpellChecker;
 - (BOOL)_continuousCheckingAllowed;
@@ -1473,8 +1479,16 @@ NSMutableDictionary *countInvocations;
     [types release];
 }
 
+static bool CGContextInitialized = false;
+
 - (void)_commonInitializationWithFrameName:(NSString *)frameName groupName:(NSString *)groupName
 {
+    if (!CGContextInitialized) {
+       CFStringRef key = CFSTR(kCGSDisableDeferredUpdates);
+       CGSSetConnectionProperty([NSApp contextID], [NSApp contextID], (CGSValueObj)key, (CGSValueObj)kCFBooleanTrue);
+       CGContextInitialized = true;
+    }
+
     _private->drawsBackground = YES;
     _private->smartInsertDeleteEnabled = YES;