Reviewed by Darin Adler.
authorkdecker <kdecker@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 21 Sep 2007 19:15:42 +0000 (19:15 +0000)
committerkdecker <kdecker@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 21 Sep 2007 19:15:42 +0000 (19:15 +0000)
        <rdar://problem/5493093>

        Reduced launch time by lazily linking both the AGL and OpenGL frameworks until they are really needed.

        * Plugins/WebBaseNetscapePluginView.mm: Soft link all AGL and OpenGL functions used by
        WebBaseNetscapePluginView.

        * WebKit.xcodeproj/project.pbxproj: Removed AGL and OpenGL from the project.

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

WebKit/ChangeLog
WebKit/Plugins/WebBaseNetscapePluginView.mm
WebKit/WebKit.xcodeproj/project.pbxproj

index 89ff371fbde28471df56a092e9c8378e7d2a2c7f..4b9e22e1f7f1a9536cecd157d805427b97b701b1 100644 (file)
@@ -1,3 +1,16 @@
+2007-09-20  Kevin Decker  <kdecker@apple.com>
+
+        Reviewed by Darin Adler.
+
+        <rdar://problem/5493093>
+
+        Reduced launch time by lazily linking both the AGL and OpenGL frameworks until they are really needed.
+
+        * Plugins/WebBaseNetscapePluginView.mm: Soft link all AGL and OpenGL functions used by
+        WebBaseNetscapePluginView.
+
+        * WebKit.xcodeproj/project.pbxproj: Removed AGL and OpenGL from the project.
+
 2007-09-20  John Sullivan  <sullivan@apple.com>
 
         Build fix for stoooopid old PPC gcc compiler
index fbacc62f75a43b4036be32ba419bf84b80b65f5e..fff6e463f033e4d9d01ba6f352d52d1bd9e95760 100644 (file)
@@ -60,6 +60,7 @@
 #import <WebCore/FrameLoader.h> 
 #import <WebCore/FrameTree.h> 
 #import <WebCore/Page.h> 
+#import <WebCore/SoftLinking.h> 
 #import <WebCore/WebCoreObjCExtras.h>
 #import <WebKit/DOMPrivate.h>
 #import <WebKit/WebUIDelegate.h>
@@ -74,6 +75,25 @@ using namespace WebCore;
 #define LoginWindowDidSwitchFromUserNotification    @"WebLoginWindowDidSwitchFromUserNotification"
 #define LoginWindowDidSwitchToUserNotification      @"WebLoginWindowDidSwitchToUserNotification"
 
+SOFT_LINK_FRAMEWORK(OpenGL)
+SOFT_LINK_FRAMEWORK(AGL)
+
+SOFT_LINK(OpenGL, CGLGetOffScreen, CGLError, (CGLContextObj ctx, GLsizei *width, GLsizei *height, GLint *rowbytes, void **baseaddr), (ctx, width, height, rowbytes, baseaddr))
+SOFT_LINK(OpenGL, CGLSetOffScreen, CGLError, (CGLContextObj ctx, GLsizei width, GLsizei height, GLint rowbytes, void *baseaddr), (ctx, width, height, rowbytes, baseaddr))
+SOFT_LINK(OpenGL, glViewport, void, (GLint x, GLint y, GLsizei width, GLsizei height), (x, y, width, height))
+SOFT_LINK(AGL, aglCreateContext, AGLContext, (AGLPixelFormat pix, AGLContext share), (pix, share))
+SOFT_LINK(AGL, aglSetWindowRef, GLboolean, (AGLContext ctx, WindowRef window), (ctx, window))
+SOFT_LINK(AGL, aglSetDrawable, GLboolean, (AGLContext ctx, AGLDrawable draw), (ctx, draw))
+SOFT_LINK(AGL, aglChoosePixelFormat, AGLPixelFormat, (const void *gdevs, GLint ndev, const GLint *attribs), (gdevs, ndev, attribs))
+SOFT_LINK(AGL, aglDestroyPixelFormat, void, (AGLPixelFormat pix), (pix))
+SOFT_LINK(AGL, aglDestroyContext, GLboolean, (AGLContext ctx), (ctx))
+SOFT_LINK(AGL, aglGetCGLContext, GLboolean, (AGLContext ctx, void **cgl_ctx), (ctx, cgl_ctx))
+SOFT_LINK(AGL, aglGetCurrentContext, AGLContext, (void), ())
+SOFT_LINK(AGL, aglSetCurrentContext, GLboolean, (AGLContext ctx), (ctx))
+SOFT_LINK(AGL, aglGetError, GLenum, (void), ())
+SOFT_LINK(AGL, aglUpdateContext, GLboolean, (AGLContext ctx), (ctx))
+SOFT_LINK(AGL, aglErrorString, const GLubyte *, (GLenum code), (code))
+
 @interface WebBaseNetscapePluginView (Internal)
 - (void)_viewHasMoved;
 - (NPError)_createPlugin;
index 50ab15511bbe1a0ca34f66826c6bd9f67c5ff167..0ea7aa8ef79ecc7574b17fa491005a713ab5a1e0 100644 (file)
@@ -32,8 +32,6 @@
                225F881509F97E8A00423A40 /* WebPluginPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 225F881409F97E8A00423A40 /* WebPluginPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
                226E9E6A09D0AA8200F3A2BC /* WebNetscapeDeprecatedFunctions.h in Headers */ = {isa = PBXBuildFile; fileRef = 226E9E6809D0AA8200F3A2BC /* WebNetscapeDeprecatedFunctions.h */; };
                226E9E6B09D0AA8200F3A2BC /* WebNetscapeDeprecatedFunctions.c in Sources */ = {isa = PBXBuildFile; fileRef = 226E9E6909D0AA8200F3A2BC /* WebNetscapeDeprecatedFunctions.c */; settings = {COMPILER_FLAGS = "-Wno-deprecated-declarations"; }; };
-               22E42A4F0A5B9F620003275B /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 22E42A4E0A5B9F620003275B /* OpenGL.framework */; };
-               22E42A9A0A5BA4D00003275B /* AGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 22E42A990A5BA4D00003275B /* AGL.framework */; };
                22F219CC08D236730030E078 /* WebBackForwardListPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 22F219CB08D236730030E078 /* WebBackForwardListPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
                4BF99F900AE050BC00815C2B /* WebEditorClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF99F8E0AE050BC00815C2B /* WebEditorClient.h */; settings = {ATTRIBUTES = (); }; };
                4BF99F910AE050BC00815C2B /* WebEditorClient.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4BF99F8F0AE050BC00815C2B /* WebEditorClient.mm */; };
                225F881409F97E8A00423A40 /* WebPluginPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebPluginPrivate.h; sourceTree = "<group>"; };
                226E9E6809D0AA8200F3A2BC /* WebNetscapeDeprecatedFunctions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebNetscapeDeprecatedFunctions.h; sourceTree = "<group>"; };
                226E9E6909D0AA8200F3A2BC /* WebNetscapeDeprecatedFunctions.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = WebNetscapeDeprecatedFunctions.c; sourceTree = "<group>"; };
-               22E42A4E0A5B9F620003275B /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; };
-               22E42A990A5BA4D00003275B /* AGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AGL.framework; path = /System/Library/Frameworks/AGL.framework; sourceTree = "<absolute>"; };
                22F219CB08D236730030E078 /* WebBackForwardListPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebBackForwardListPrivate.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                2568C72C0174912D0ECA149E /* WebKit.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebKit.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                2D36FD5E03F78F9E00A80166 /* WebFormDelegatePrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebFormDelegatePrivate.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                                9398112E0824BF01008DF038 /* libicucore.dylib in Frameworks */,
                                9398112F0824BF01008DF038 /* Security.framework in Frameworks */,
                                65A0006908527D1A005620FA /* libWebKitSystemInterface.a in Frameworks */,
-                               22E42A4F0A5B9F620003275B /* OpenGL.framework in Frameworks */,
-                               22E42A9A0A5BA4D00003275B /* AGL.framework in Frameworks */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                0867D69AFE84028FC02AAC07 /* Frameworks and Libraries */ = {
                        isa = PBXGroup;
                        children = (
-                               22E42A990A5BA4D00003275B /* AGL.framework */,
                                F5C2869402846DCD018635CA /* Carbon.framework */,
                                F5C2869502846DCD018635CA /* Cocoa.framework */,
-                               22E42A4E0A5B9F620003275B /* OpenGL.framework */,
                                830E81E005853AC000AD0891 /* Security.framework */,
                                93D623DD051E791F002F47DD /* libicucore.dylib */,
                                F738C9E903FAD3DF0321FBE0 /* JavaScriptCore.framework */,