WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
107397
[Efl][WebGL] Add better support to track and free XResources.
https://bugs.webkit.org/show_bug.cgi?id=107397
Summary
[Efl][WebGL] Add better support to track and free XResources.
Kalyan
Reported
2013-01-20 04:34:31 PST
We leak Memory during config selection as we dont free temp allocated visuals, config etc. It would be better to have some thing like a scoped class, this would free memory when class goes out of scope or when assigned a different value.
Attachments
patch
(17.43 KB, patch)
2013-01-20 06:03 PST
,
Kalyan
no flags
Details
Formatted Diff
Diff
patchv2
(17.72 KB, patch)
2013-01-20 09:15 PST
,
Kalyan
no flags
Details
Formatted Diff
Diff
patchv3
(18.04 KB, patch)
2013-01-20 21:19 PST
,
Kalyan
no flags
Details
Formatted Diff
Diff
patchv4
(17.91 KB, patch)
2013-01-21 15:20 PST
,
Kalyan
noam
: review-
Details
Formatted Diff
Diff
patchv5
(19.58 KB, patch)
2013-01-26 07:03 PST
,
Kalyan
no flags
Details
Formatted Diff
Diff
patchv6
(19.51 KB, patch)
2013-01-28 15:10 PST
,
Kalyan
noam
: review+
Details
Formatted Diff
Diff
patchforlanding
(18.13 KB, patch)
2013-01-31 00:04 PST
,
Kalyan
no flags
Details
Formatted Diff
Diff
patchforlanding
(18.62 KB, patch)
2013-01-31 00:18 PST
,
Kalyan
eflews.bot
: commit-queue-
Details
Formatted Diff
Diff
Patch
(19.63 KB, patch)
2013-01-31 03:00 PST
,
Kalyan
no flags
Details
Formatted Diff
Diff
Show Obsolete
(8)
View All
Add attachment
proposed patch, testcase, etc.
Kalyan
Comment 1
2013-01-20 06:03:09 PST
Created
attachment 183669
[details]
patch
Kalyan
Comment 2
2013-01-20 09:15:10 PST
Created
attachment 183674
[details]
patchv2 removed usused member varibles in X11WindowResources
Laszlo Gombos
Comment 3
2013-01-20 19:38:18 PST
Comment on
attachment 183674
[details]
patchv2 View in context:
https://bugs.webkit.org/attachment.cgi?id=183674&action=review
> Source/WebCore/ChangeLog:8 > + Covered by existing WebGL tests.
This is probably true but WebGL tests are not enabled for EFL on the bot so I think it is about time to hold on with re-factoring like this and enable the WebGL tests first.
Kalyan
Comment 4
2013-01-20 20:31:10 PST
(In reply to
comment #3
)
> (From update of
attachment 183674
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=183674&action=review
> > > Source/WebCore/ChangeLog:8 > > + Covered by existing WebGL tests. > > This is probably true but WebGL tests are not enabled for EFL on the bot so I think it is about time to hold on with re-factoring like this and enable the WebGL tests first.
I do agree with you but I don't see this as refactoring but rather part of effort in fixing things to enable the layout tests in our port. I was atleast having constant WebProcess crashes(doing double deletions sometimes) without these changes.
Kalyan
Comment 5
2013-01-20 21:11:40 PST
(In reply to
comment #3
)
> (From update of
attachment 183674
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=183674&action=review
> > > Source/WebCore/ChangeLog:8 > > + Covered by existing WebGL tests. > > This is probably true but WebGL tests are not enabled for EFL on the bot so I think it is about time to hold on with re-factoring like this and enable the WebGL tests first.
On side note we need 106878,107397,107178 fixed before trying to enable WebGL tests (atleast ones under fast/canvas/webgl). Atleast, I needed these before I could run the tests without any random crashes. I will create a separate issue to enable to the tests.
Kalyan
Comment 6
2013-01-20 21:19:24 PST
Created
attachment 183703
[details]
patchv3 updated the changelog
Kalyan
Comment 7
2013-01-21 15:20:12 PST
Created
attachment 183837
[details]
patchv4 rebased patch. Not marking it for review yet. Layout tests with latest source seems stable even without this patch and don't see any de-allocation issues. The patch only fixes memory leaks and thus could be considered after enabling them.
Noam Rosenthal
Comment 8
2013-01-23 02:40:06 PST
Comment on
attachment 183837
[details]
patchv4 View in context:
https://bugs.webkit.org/attachment.cgi?id=183837&action=review
> Source/WebCore/platform/graphics/surfaces/glx/X11WindowResources.h:49 > +struct ScopedXResource {
This is not needed. You can have OwnPtr with a specialized template, like GTK/Cairo does.
Kalyan
Comment 9
2013-01-26 07:03:20 PST
Created
attachment 184862
[details]
patchv5 Changed name of ScopedXResource to ScopedPtrX11 and moved it to a separate header. Cannot use OwnPtr here with GLXFBConfig, as it is a pointer. i.e it is defined as typedef struct __GLXFBConfigRec *GLXFBConfig. One way would have been to handle this case separately but as we would need this change (ScopedPtrX11) for it, so I let it manage all the X Resources.
Kalyan
Comment 10
2013-01-28 15:10:52 PST
Created
attachment 185079
[details]
patchv6
Noam Rosenthal
Comment 11
2013-01-30 03:17:04 PST
Comment on
attachment 185079
[details]
patchv6 View in context:
https://bugs.webkit.org/attachment.cgi?id=185079&action=review
> Source/WebCore/ChangeLog:8 > + We leak Memory during config selection as we dont free temp
temp -> temporary
> Source/WebCore/ChangeLog:35 > + Calls XFree on pointer to memory allocated by X when the class goes out of scope.
Add some short explanation on why this was needed rather than using OwnPtr.
Kalyan
Comment 12
2013-01-31 00:04:06 PST
Created
attachment 185694
[details]
patchforlanding
Kalyan
Comment 13
2013-01-31 00:18:11 PST
Created
attachment 185698
[details]
patchforlanding
EFL EWS Bot
Comment 14
2013-01-31 01:03:52 PST
Comment on
attachment 185698
[details]
patchforlanding
Attachment 185698
[details]
did not pass efl-ews (efl): Output:
http://queues.webkit.org/results/16264129
Kalyan
Comment 15
2013-01-31 03:00:54 PST
Created
attachment 185731
[details]
Patch
WebKit Review Bot
Comment 16
2013-01-31 04:48:55 PST
Comment on
attachment 185731
[details]
Patch Clearing flags on attachment: 185731 Committed
r141404
: <
http://trac.webkit.org/changeset/141404
>
WebKit Review Bot
Comment 17
2013-01-31 04:49:00 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.
Top of Page
Format For Printing
XML
Clone This Bug