WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
89681
[chromium] Allow impl thread to delete all allocated textures in TextureManager
https://bugs.webkit.org/show_bug.cgi?id=89681
Summary
[chromium] Allow impl thread to delete all allocated textures in TextureManager
Dana Jansens
Reported
2012-06-21 11:35:49 PDT
[chromium] Allow impl thread to delete all allocated textures in TextureManager
Attachments
Patch
(4.35 KB, patch)
2012-06-21 11:36 PDT
,
Dana Jansens
no flags
Details
Formatted Diff
Diff
Patch
(3.25 KB, patch)
2012-06-21 12:00 PDT
,
Dana Jansens
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Dana Jansens
Comment 1
2012-06-21 11:36:23 PDT
Created
attachment 148849
[details]
Patch
Dana Jansens
Comment 2
2012-06-21 11:38:45 PDT
The patch only modifies functions on TM that take TextureAllocator*, which means all these methods are accessed only from impl thread. The departure here is that the deleteAllTexturesOnImpl can be called at any time on impl without main thread being blocked (it doesn't touch anything that is used by methods that don't take TextureAllocator* as input). Then, when main/impl thread are synced, in beginFrame somewhere, one would call the syncTexturesWithImpl method.
Dana Jansens
Comment 3
2012-06-21 12:00:04 PDT
Created
attachment 148853
[details]
Patch I think the visiblity stuff makes the previous code ok but it isn't obvious that it's threadsafe. I looked at your patch again James to see how you're calling the TextureAllocator and TextureManager and mimicing that a bit better. So the Proxy can decide to tell the TM that everything is deleted or not as you currently do. This just lets us do the texture id tracking/free here instead of adding it to TextureAllocator, which was the intention.
James Robinson
Comment 4
2012-06-21 12:13:19 PDT
Comment on
attachment 148853
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=148853&action=review
> Source/WebCore/platform/graphics/chromium/TextureManager.h:92 > + // notifyDeletedAllTexturesOnImpl() must be called between calling this and allocating new > + // textures. This method does not require main thread to be blocked in order to be used.
I'm not a fan of making the texture manager itself have to know about different threads. Currently threading concerns are managed by the caller
Dana Jansens
Comment 5
2012-06-21 13:43:30 PDT
Comment on
attachment 148853
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=148853&action=review
>> Source/WebCore/platform/graphics/chromium/TextureManager.h:92 >> + // textures. This method does not require main thread to be blocked in order to be used. > > I'm not a fan of making the texture manager itself have to know about different threads. Currently threading concerns are managed by the caller
The caller does manage the thread safety here also, by making notifyDeletedAllTexturesOnImpl() the first thing it calls on main thread, after using deleteAllTexturesOnImpl(). TM allows this by using a data structure that is only touched during allocate/free (and these are only done on impl thread). Does that mean it knows about different threads? I don't really like using TextureAllocator as another texture manager, which is why I propose this, but maybe there are other solutions. I'll bring the discussion about TextureAllocator over there.
James Robinson
Comment 6
2012-06-22 13:33:22 PDT
I don't really understand what the problem is that you are trying to solve.
Dana Jansens
Comment 7
2012-06-22 13:37:40 PDT
It just seems like we're distributing some of the role of TextureManager to TextureAllocator, and we already have so many classes that create/delete/manage lifetime of textures in some way, making yet another class with these types of responsibilities seems to be cluttering things. Maybe I've just been staring at this stuff too long, but I'd like to have these responsibilities in fewer classes instead of more.
Dana Jansens
Comment 8
2012-07-05 16:32:16 PDT
this is invalidated by PTM landing.
Adrienne Walker
Comment 9
2012-07-09 10:26:28 PDT
Comment on
attachment 148853
[details]
Patch Taking review flag off to clear from the queue, since this is marked as invalid.
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