Closed Bug 1027088 Opened 10 years ago Closed 10 years ago

Ensure fence delivery for TiledContentClient on gonk

Categories

(Core :: Graphics: Layers, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla33

People

(Reporter: sotaro, Assigned: sotaro)

References

Details

Attachments

(1 file, 3 obsolete files)

+++ This bug was initially created as a clone of Bug #1022167 +++

gecko deliver fence object by best effort for TiledContentClient. There is a cases that it is not enough. We need to ensure fence delivery for TiledContentClient.

Basics of fence delivery ensuring is already implemented by Bug 1006957. I am going to use it.
Assignee: nobody → sotaro.ikeda.g
Add OMTC check.
Attachment #8442137 - Attachment is obsolete: true
Attachment #8442147 - Flags: review?(nical.bugzilla)
Attachment #8442147 - Flags: review?(nical.bugzilla)
Status: NEW → ASSIGNED
Fix infinite loop at AsyncTransactionTracker::WaitComplete().
Attachment #8442147 - Attachment is obsolete: true
Attachment #8442257 - Attachment is patch: true
Attachment #8442257 - Attachment mime type: text/x-patch → text/plain
(In reply to Sotaro Ikeda [:sotaro] from comment #3)
> Created attachment 8442257 [details] [diff] [review]
> patch v3 - Ensure fence delivery for TiledContentClient on gonk
> 
> Fix infinite loop at AsyncTransactionTracker::WaitComplete().

TextureClientPool::ReturnTextureClient() with RemoveTextureFromCompositableTracker caused infinite loop at AsyncTransactionTracker::WaitComplete(). RemoveTextureFromCompositableTracker needs Compositor side's response. If the WaitComplete() is called before the layer transaction complete, compositor side do not receive a necessary message. attachment 8442257 [details] [diff] [review] fix this problem.
Attachment #8442257 - Flags: review?(nical.bugzilla)
Comment on attachment 8442257 [details] [diff] [review]
patch v3 - Ensure fence delivery for TiledContentClient on gonk

Review of attachment 8442257 [details] [diff] [review]:
-----------------------------------------------------------------

::: gfx/layers/client/TiledContentClient.cpp
@@ +539,5 @@
> +                                                                          mCompositableClient,
> +                                                                          mBackBuffer);
> +      }
> +      // TextureClient can be reused after transaction complete,
> +      // when RemoveTextureFromCompositableTracker is used. 

nit: trailing space

::: gfx/layers/client/TiledContentClient.h
@@ +228,5 @@
>    RefPtr<TextureClient> mFrontBuffer;
>    RefPtr<gfxSharedReadLock> mBackLock;
>    RefPtr<gfxSharedReadLock> mFrontLock;
>    RefPtr<ClientLayerManager> mManager;
> +  RefPtr<CompositableClient> mCompositableClient;

This is creating a cycle, can you prove that it will not leak? If so you should add a comment here about it
(In reply to Nicolas Silva [:nical] from comment #6)
> Comment on attachment 8442257 [details] [diff] [review]
> patch v3 - Ensure fence delivery for TiledContentClient on gonk
> 
> Review of attachment 8442257 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> ::: gfx/layers/client/TiledContentClient.cpp
> @@ +539,5 @@
> > +                                                                          mCompositableClient,
> > +                                                                          mBackBuffer);
> > +      }
> > +      // TextureClient can be reused after transaction complete,
> > +      // when RemoveTextureFromCompositableTracker is used. 
> 
> nit: trailing space
> 
> ::: gfx/layers/client/TiledContentClient.h
> @@ +228,5 @@
> >    RefPtr<TextureClient> mFrontBuffer;
> >    RefPtr<gfxSharedReadLock> mBackLock;
> >    RefPtr<gfxSharedReadLock> mFrontLock;
> >    RefPtr<ClientLayerManager> mManager;
> > +  RefPtr<CompositableClient> mCompositableClient;
> 
> This is creating a cycle, can you prove that it will not leak? If so you
> should add a comment here about it

We can change from Reference pointer to raw pointer. The pointer is used only when the TiledContentClient exist. All TileClients are released during TiledContentClient's destructor.

http://mxr.mozilla.org/mozilla-central/source/gfx/layers/client/TiledContentClient.h#469
(In reply to Sotaro Ikeda [:sotaro] from comment #7)
> > 
> > This is creating a cycle, can you prove that it will not leak? If so you
> > should add a comment here about it
> 
> We can change from Reference pointer to raw pointer. The pointer is used
> only when the TiledContentClient exist. All TileClients are released during
> TiledContentClient's destructor.
> 
> http://mxr.mozilla.org/mozilla-central/source/gfx/layers/client/
> TiledContentClient.h#469

Oh, destructor is too late.
Apply the comment. Confirmed that the patch works on master flame.
Attachment #8442257 - Attachment is obsolete: true
Attachment #8442257 - Flags: review?(nical.bugzilla)
Attachment #8442823 - Flags: review?(nical.bugzilla)
Attachment #8442823 - Flags: review?(nical.bugzilla) → review+
https://hg.mozilla.org/mozilla-central/rev/e9118a2be9b3
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
Blocks: 1010966
Depends on: 1029719
Depends on: 1073862
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: