[webkit-changes] [37131] trunk/WebKit/mac
Timothy Hatcher
timothy at apple.com
Tue Sep 30 18:10:09 PDT 2008
This need API review first, I think. Plus I think it should be
deprecated and not removed. Has the CA drawing mode landed? Did it go
through API review? This will trigger an API change email when we
submit next. So we might need to roll this out.
- Timothy Hatcher
Sent from my iPhone
On Sep 30, 2008, at 6:05 PM, kdecker at apple.com wrote:
> Revision
> 37131
> Author
> kdecker at apple.com
> Date
> 2008-09-30 18:05:38 -0700 (Tue, 30 Sep 2008)
> Log Message
>
> Reviewed by Anders Carlsson.
>
> Remove the NPDrawingModelOpenGL entirely. To my knowledge no
> shipping plug-in ever used it, and no other browser engine
> ever supported it.
>
> * Plugins/WebBaseNetscapePluginView.h: Removed AGL.h import
> and OpenGL related ivars.
> * Plugins/WebBaseNetscapePluginView.mm: Removed soft linking
> for OpenGL and AGL frameworks.
> Also removed many methods AGL/CGL support methods that are
> no longer necessary.
> (-[WebBaseNetscapePluginView
> saveAndSetNewPortStateForUpdate:]): Removed NPDrawingModelOpenGL
> related code.
> (-[WebBaseNetscapePluginView restorePortState:]): Ditto.
> (-[WebBaseNetscapePluginView sendEvent:isDrawRect:]): Ditto.
> (-[WebBaseNetscapePluginView isNewWindowEqualToOldWindow]):
> Ditto.
> (-[WebBaseNetscapePluginView setWindowIfNecessary]): Ditto.
> (-[WebBaseNetscapePluginView stop]): Ditto.
> (-[WebBaseNetscapePluginView dealloc]): Ditto.
> (-[WebBaseNetscapePluginView drawRect:]):
> (-[WebBaseNetscapePluginView viewWillMoveToWindow:]): Ditto.
> (-[WebBaseNetscapePluginView invalidateRegion:]): Ditto.
> (-[WebBaseNetscapePluginView getVariable:value:]): Tell plug-
> ins WebKit does not support NPDrawingModelOpenGL.
> (-[WebBaseNetscapePluginView setVariable:value:]): Removed
> NPDrawingModelOpenGL related code.
> (-[WebBaseNetscapePluginView _viewHasMoved]): Ditto.
> Modified Paths
>
> trunk/WebKit/mac/ChangeLog
> trunk/WebKit/mac/Plugins/WebBaseNetscapePluginView.h
> trunk/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
> Diff
>
> Modified: trunk/WebKit/mac/ChangeLog (37130 => 37131)
>
> --- trunk/WebKit/mac/ChangeLog 2008-10-01 01:00:19 UTC (rev 37130)
> +++ trunk/WebKit/mac/ChangeLog 2008-10-01 01:05:38 UTC (rev 37131)
> @@ -1,3 +1,27 @@
> +2008-09-30 Kevin Decker <kdecker at apple.com>
> +
> + Reviewed by Anders Carlsson.
> +
> + Remove the NPDrawingModelOpenGL entirely. To my knowledge
> no shipping plug-in ever used it, and no other browser engine
> + ever supported it.
> +
> + * Plugins/WebBaseNetscapePluginView.h: Removed AGL.h import
> and OpenGL related ivars.
> + * Plugins/WebBaseNetscapePluginView.mm: Removed soft
> linking for OpenGL and AGL frameworks.
> + Also removed many methods AGL/CGL support methods that are
> no longer necessary.
> + (-[WebBaseNetscapePluginView
> saveAndSetNewPortStateForUpdate:]): Removed NPDrawingModelOpenGL
> related code.
> + (-[WebBaseNetscapePluginView restorePortState:]): Ditto.
> + (-[WebBaseNetscapePluginView sendEvent:isDrawRect:]): Ditto.
> + (-[WebBaseNetscapePluginView isNewWindowEqualToOldWindow]):
> Ditto.
> + (-[WebBaseNetscapePluginView setWindowIfNecessary]): Ditto.
> + (-[WebBaseNetscapePluginView stop]): Ditto.
> + (-[WebBaseNetscapePluginView dealloc]): Ditto.
> + (-[WebBaseNetscapePluginView drawRect:]):
> + (-[WebBaseNetscapePluginView viewWillMoveToWindow:]): Ditto.
> + (-[WebBaseNetscapePluginView invalidateRegion:]): Ditto.
> + (-[WebBaseNetscapePluginView getVariable:value:]): Tell
> plug-ins WebKit does not support NPDrawingModelOpenGL.
> + (-[WebBaseNetscapePluginView setVariable:value:]): Removed
> NPDrawingModelOpenGL related code.
> + (-[WebBaseNetscapePluginView _viewHasMoved]): Ditto.
> +
> 2008-09-30 Dave Hyatt <hyatt at apple.com>
>
> http://bugs.webkit.org/show_bug.cgi?id=21250
> Modified: trunk/WebKit/mac/Plugins/WebBaseNetscapePluginView.h
> (37130 => 37131)
>
> --- trunk/WebKit/mac/Plugins/WebBaseNetscapePluginView.h 2008-10-01
> 01:00:19 UTC (rev 37130)
> +++ trunk/WebKit/mac/Plugins/WebBaseNetscapePluginView.h 2008-10-01
> 01:05:38 UTC (rev 37131)
> @@ -29,7 +29,6 @@
> #if ENABLE(NETSCAPE_PLUGIN_API)
> #import <Cocoa/Cocoa.h>
>
> -#import <AGL/agl.h>
> #import <WebKit/npfunctions.h>
> #import <WebKit/npapi.h>
> #import <WebKit/WebBasePluginPackage.h>
> @@ -51,7 +50,6 @@
> NP_Port qdPort;
> #endif
> NP_CGContext cgPort;
> - NP_GLContext aglPort;
> } PluginPort;
>
> typedef struct _NPPluginTextInputFuncs NPPluginTextInputFuncs;
> @@ -82,9 +80,6 @@
> NPDrawingModel drawingModel;
> NPEventModel eventModel;
>
> - // These are only valid when drawingModel is NPDrawingModelOpenGL
> - AGLContext aglContext;
> - NSWindow *aglWindow;
>
> #ifndef NP_NO_QUICKDRAW
> // This is only valid when drawingModel is
> NPDrawingModelQuickDraw
> Modified: trunk/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
> (37130 => 37131)
>
> --- trunk/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm 2008-10-01
> 01:00:19 UTC (rev 37130)
> +++ trunk/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm 2008-10-01
> 01:05:38 UTC (rev 37131)
> @@ -76,43 +76,12 @@
> #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))
> -#ifndef BUILDING_ON_TIGER
> -SOFT_LINK(AGL, aglChoosePixelFormat, AGLPixelFormat, (const void
> *gdevs, GLint ndev, const GLint *attribs), (gdevs, ndev, attribs))
> -#else
> -SOFT_LINK(AGL, aglChoosePixelFormat, AGLPixelFormat, (const
> AGLDevice *gdevs, GLint ndev, const GLint *attribs), (gdevs, ndev,
> attribs))
> -#endif
> -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;
> - (void)_destroyPlugin;
> - (NSBitmapImageRep *)_printedPluginBitmap;
> -- (BOOL)_createAGLContextIfNeeded;
> -- (BOOL)_createWindowedAGLContext;
> -- (BOOL)_createWindowlessAGLContext;
> -- (CGLContextObj)_cglContext;
> -- (BOOL)_getAGLOffscreenBuffer:(GLvoid **)outBuffer width:(GLsizei
> *)outWidth height:(GLsizei *)outHeight;
> -- (void)_destroyAGLContext;
> -- (void)_reshapeAGLWindow;
> -- (void)_hideAGLWindow;
> -- (NSImage *)_aglOffscreenImageForDrawingInRect:
> (NSRect)drawingInRect;
> - (void)_redeliverStream;
> @end
>
> @@ -181,10 +150,6 @@
> CGContextRef context;
> } PortState_CG;
>
> -typedef struct {
> - AGLContext oldContext;
> -} PortState_GL;
> -
> @class NSTextInputContext;
> @interface NSResponder (AppKitDetails)
> - (NSTextInputContext *)inputContext;
> @@ -581,56 +546,6 @@
> break;
> }
>
> - case NPDrawingModelOpenGL: {
> - ASSERT([NSView focusView] == self);
> -
> - // Clear the "current" window and context -- they will
> be assigned below (if all goes well)
> - nPort.aglPort.window = NULL;
> - nPort.aglPort.context = NULL;
> -
> - // Create AGL context if needed
> - if (![self _createAGLContextIfNeeded]) {
> - LOG_ERROR("Could not create AGL context");
> - return NULL;
> - }
> -
> - // Update the plugin's window/context
> -#ifdef NP_NO_CARBON
> - nPort.aglPort.window = (NPNSWindow *)[self
> currentWindow];
> -#else
> - nPort.aglPort.window = eventHandler-
> >platformWindow([self currentWindow]);
> -#endif // NP_NO_CARBON
> - nPort.aglPort.context = [self _cglContext];
> - window.window = &nPort.aglPort;
> -
> - // Save/set current AGL context
> - PortState_GL *glPortState = (PortState_GL
> *)malloc(sizeof(PortState_GL));
> - portState = (PortState)glPortState;
> - glPortState->oldContext = aglGetCurrentContext();
> - aglSetCurrentContext(aglContext);
> -
> - // Adjust viewport according to clip
> - switch (window.type) {
> - case NPWindowTypeWindow:
> -
> glViewport(static_cast<GLint>(NSMinX(boundsInWindow) -
> NSMinX(visibleRectInWindow)),
> -
> static_cast<GLint>(NSMaxY(visibleRectInWindow) -
> NSMaxY(boundsInWindow)),
> - window.width, window.height);
> - break;
> -
> - case NPWindowTypeDrawable: {
> - GLsizei width, height;
> - if ([self _getAGLOffscreenBuffer:NULL
> width:&width height:&height])
> - glViewport(0, 0, width, height);
> - break;
> - }
> -
> - default:
> - ASSERT_NOT_REACHED();
> - break;
> - }
> - break;
> - }
> -
> default:
> ASSERT_NOT_REACHED();
> portState = NULL;
> @@ -682,11 +597,7 @@
> ASSERT(((PortState_CG *)portState)->context ==
> nPort.cgPort.context);
> CGContextRestoreGState(nPort.cgPort.context);
> break;
> -
> - case NPDrawingModelOpenGL:
> - aglSetCurrentContext(((PortState_GL *)portState)-
> >oldContext);
> - break;
> -
> +
> default:
> ASSERT_NOT_REACHED();
> _______________________________________________
> webkit-changes mailing list
> webkit-changes at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.webkit.org/pipermail/webkit-changes/attachments/20080930/a81d8ed6/attachment.html
More information about the webkit-changes
mailing list