RESOLVED FIXED 106666
[EFL][Qt][WebGL] Share the common code between GraphicsSurfaceGLX and X11WindowResources.
https://bugs.webkit.org/show_bug.cgi?id=106666
Summary [EFL][Qt][WebGL] Share the common code between GraphicsSurfaceGLX and X11Wind...
Kalyan
Reported 2013-01-11 07:49:00 PST
X11WindowResources contains the X related code which is used by both of our GLX and EGL implementaion. GraphicsSurfaceGLX also has similar code which could be shared by both the classes. This would avoid any code duplication and need to fix bugs in both places. Same case with GLXConfigSelector
Attachments
WIP (25.96 KB, patch)
2013-01-17 07:01 PST, Kalyan
no flags
patch (29.12 KB, patch)
2013-01-17 08:42 PST, Kalyan
webkit-ews: commit-queue-
patchv3 (30.72 KB, patch)
2013-01-17 17:40 PST, Kalyan
no flags
patch (59.30 KB, patch)
2013-02-03 13:43 PST, Kalyan
webkit-ews: commit-queue-
WIP (57.78 KB, patch)
2013-02-03 17:09 PST, Kalyan
no flags
patch (57.80 KB, patch)
2013-02-04 12:30 PST, Kalyan
no flags
patch (57.38 KB, patch)
2013-02-04 12:32 PST, Kalyan
no flags
patchv2 (57.35 KB, patch)
2013-02-04 13:58 PST, Kalyan
buildbot: commit-queue-
patchv3 (58.30 KB, patch)
2013-02-06 12:37 PST, Kalyan
kenneth: review+
webkit.review.bot: commit-queue-
patch (58.30 KB, patch)
2013-02-08 00:53 PST, Kalyan
no flags
Kalyan
Comment 1 2013-01-17 07:01:32 PST
Kalyan
Comment 2 2013-01-17 08:42:45 PST
Early Warning System Bot
Comment 3 2013-01-17 08:48:21 PST
Early Warning System Bot
Comment 4 2013-01-17 08:48:40 PST
Zeno Albisser
Comment 5 2013-01-17 08:58:51 PST
I'm looking at the issues reported by Qt EWS.
Kalyan
Comment 6 2013-01-17 17:40:20 PST
Kalyan
Comment 7 2013-01-17 17:59:30 PST
Comment on attachment 183329 [details] patchv3 Will upload a rebased patch
Kalyan
Comment 8 2013-02-03 13:43:00 PST
Kenneth Rohde Christiansen
Comment 9 2013-02-03 13:53:53 PST
Comment on attachment 186267 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=186267&action=review > Source/WebCore/platform/graphics/surfaces/glx/X11Wrapper.cpp:174 > +} > +#endif > + > +#endif I hate nested ifdefs. Can they be avoided? > Source/WebCore/platform/graphics/surfaces/glx/X11Wrapper.h:54 > +// Used for handling XError. > +static bool validOperation = true; > +static int handleXPixmapCreationError(Display*, XErrorEvent* event) > +{ > + if (event->error_code == BadMatch || event->error_code == BadWindow || event->error_code == BadAlloc) { > + validOperation = false; > + > + switch (event->error_code) { > + case BadMatch: why is this in the header? > Source/WebCore/platform/graphics/surfaces/glx/X11Wrapper.h:96 > + // XSync must be called to ensure that current errors are handled by the original handler. > + XSync(X11Wrapper::nativeDisplay(), false); > + m_previousErrorHandler = XSetErrorHandler(handleXPixmapCreationError); > + } > + This is more than a simple implementation, so why is it in the header
Early Warning System Bot
Comment 10 2013-02-03 13:56:35 PST
Early Warning System Bot
Comment 11 2013-02-03 13:57:52 PST
Build Bot
Comment 12 2013-02-03 14:46:02 PST
Kalyan
Comment 13 2013-02-03 17:09:38 PST
Created attachment 186280 [details] WIP Looking into the build issue with Qt. Will mark it for review once I get to resolve it but feel free to give any feedback.
Kalyan
Comment 14 2013-02-03 17:11:01 PST
(In reply to comment #9) > (From update of attachment 186267 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=186267&action=review > > > Source/WebCore/platform/graphics/surfaces/glx/X11Wrapper.cpp:174 > > +} > > +#endif > > + > > +#endif > > I hate nested ifdefs. Can they be avoided? Yes, done. > why is this in the header? > > Source/WebCore/platform/graphics/surfaces/glx/X11Wrapper.h:96 > > + > > This is more than a simple implementation, so why is it in the header Moved the implementation to cpp file.
Zeno Albisser
Comment 15 2013-02-04 02:30:31 PST
Comment on attachment 186280 [details] WIP View in context: https://bugs.webkit.org/attachment.cgi?id=186280&action=review > Source/WebCore/platform/graphics/surfaces/glx/GLXConfigSelector.h:159 > + { This looks like duplicate code. Would it be possible to have something like: GLXFBConfig findMatchingConfig(const int attributes[], int depth, VisualID id = 0) ? > Source/WebCore/platform/graphics/surfaces/glx/X11Wrapper.h:47 > + nit: I don't really like the name X11Wrapper. It sounds highly generic and looks rather like a Helper or a convenience class to me than a Wrapper. How about X11OffScreenHelper, or just X11Helper ? All in all, i would say this is a very nice piece of work! :) Thanks a lot!
Kalyan
Comment 16 2013-02-04 12:30:28 PST
Kalyan
Comment 17 2013-02-04 12:31:21 PST
Comment on attachment 186437 [details] patch will upload a rebased patch
Kalyan
Comment 18 2013-02-04 12:32:29 PST
Kalyan
Comment 19 2013-02-04 13:58:03 PST
Created attachment 186453 [details] patchv2 review fixes
Kalyan
Comment 20 2013-02-04 13:58:50 PST
(In reply to comment #15) > (From update of attachment 186280 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=186280&action=review > > Source/WebCore/platform/graphics/surfaces/glx/X11Wrapper.h:47 > > + done > nit: I don't really like the name X11Wrapper. It sounds highly generic and looks rather like a Helper or a convenience class to me than a Wrapper. > How about X11OffScreenHelper, or just X11Helper ? > renamed it as X11Helper
Build Bot
Comment 21 2013-02-04 17:31:49 PST
Zeno Albisser
Comment 22 2013-02-06 06:59:05 PST
Comment on attachment 186453 [details] patchv2 View in context: https://bugs.webkit.org/attachment.cgi?id=186453&action=review > Source/WebCore/platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp:-330 > - XFree(configs); don't you need to free the configs received from m_configSelector->surfaceclientConfig(..) somewhere again?
Kalyan
Comment 23 2013-02-06 07:39:08 PST
(In reply to comment #22) > (From update of attachment 186453 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=186453&action=review > > > Source/WebCore/platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp:-330 > > - XFree(configs); > > don't you need to free the configs received from m_configSelector->surfaceclientConfig(..) somewhere again? findMatchingConfig(uses OwnPtrX11) in GLXConfigSelector should take care of freeing XResources automatically once it goes out of scope. We make a temp copy(on stack) of the selected config.
Zeno Albisser
Comment 24 2013-02-06 08:10:48 PST
(In reply to comment #23) LGTM
Kalyan
Comment 25 2013-02-06 12:37:53 PST
Created attachment 186896 [details] patchv3 Rebased patch
WebKit Review Bot
Comment 26 2013-02-07 06:16:06 PST
Comment on attachment 186896 [details] patchv3 Rejecting attachment 186896 [details] from commit-queue. Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '--bot-id=gce-cq-04', 'land-attachment', '--force-clean', '--non-interactive', '--parent-command=commit-queue', 186896, '--port=chromium-xvfb']" exit_code: 2 cwd: /mnt/git/webkit-commit-queue Last 500 characters of output: rce/WebKit/chromium/webkit/media/crypto/ppapi/cdm --revision 173055 --non-interactive --force --accept theirs-conflict --ignore-externals' in '/mnt/git/webkit-commit-queue/Source/WebKit/chromium' 56>At revision 173055. ________ running '/usr/bin/python tools/clang/scripts/update.py --mac-only' in '/mnt/git/webkit-commit-queue/Source/WebKit/chromium' ________ running '/usr/bin/python gyp_webkit' in '/mnt/git/webkit-commit-queue/Source/WebKit/chromium' Updating webkit projects from gyp files... Full output: http://queues.webkit.org/results/16426166
Kalyan
Comment 27 2013-02-08 00:53:09 PST
WebKit Review Bot
Comment 28 2013-02-09 07:11:46 PST
Comment on attachment 187260 [details] patch Clearing flags on attachment: 187260 Committed r142355: <http://trac.webkit.org/changeset/142355>
WebKit Review Bot
Comment 29 2013-02-09 07:11:52 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.