Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Issue 11638028: Mailbox support for texture layers. (Closed)

Created:
8 years ago by alexst (slow to review)
Modified:
7 years, 11 months ago
Reviewers:
danakj, jamesr, jamesr1, piman
CC:
chromium-reviews, cc-bugs_chromium.org
Visibility:
Public.

Description

Mailbox support for texture layers. A callback object is passed along with the mailbox name to the layer. This callback is triggered with a sync point to signal when the mailbox is no longer in use by the compositor. TextureLayerImpl packages a mailbox up as a resource on willDraw and releases it when a new mailbox is ready for consumption or when the layer is destroyed. BUG=123444 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=175529

Patch Set 1 : #

Total comments: 23

Patch Set 2 : Feedback #

Patch Set 3 : Formatting #

Total comments: 20

Patch Set 4 : Feedback, callback runs on main. #

Total comments: 3

Patch Set 5 : Nits #

Patch Set 6 : Tests #

Total comments: 28

Patch Set 7 : Comments #

Total comments: 4

Patch Set 8 : More tests, cleanup #

Total comments: 6

Patch Set 9 : Amended tests #

Patch Set 10 : Rebase #

Total comments: 8

Patch Set 11 : Comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+382 lines, -18 lines) Patch
M cc/resource_provider.h View 1 2 3 4 5 6 7 8 9 10 5 chunks +10 lines, -2 lines 0 comments Download
M cc/resource_provider.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +38 lines, -1 line 0 comments Download
M cc/texture_layer.h View 1 2 3 4 5 6 7 5 chunks +15 lines, -1 line 0 comments Download
M cc/texture_layer.cc View 1 2 3 4 5 6 7 6 chunks +45 lines, -6 lines 0 comments Download
M cc/texture_layer_impl.h View 1 2 3 4 chunks +13 lines, -3 lines 0 comments Download
M cc/texture_layer_impl.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +45 lines, -4 lines 0 comments Download
M cc/texture_layer_unittest.cc View 1 2 3 4 5 6 7 8 3 chunks +216 lines, -1 line 0 comments Download

Messages

Total messages: 38 (0 generated)
piman
https://codereview.chromium.org/11638028/diff/2001/cc/mailbox_release_client.h File cc/mailbox_release_client.h (right): https://codereview.chromium.org/11638028/diff/2001/cc/mailbox_release_client.h#newcode17 cc/mailbox_release_client.h:17: virtual void mailboxReleased(const std::string& name, unsigned syncPoint) = 0; ...
8 years ago (2012-12-20 02:14:21 UTC) #1
danakj
I think we need to decouple the layer from the mailbox a bit. Their lifetimes ...
8 years ago (2012-12-20 02:16:19 UTC) #2
piman
On Wed, Dec 19, 2012 at 6:16 PM, <danakj@chromium.org> wrote: > I think we need ...
8 years ago (2012-12-20 02:22:39 UTC) #3
alexst (slow to review)
I'll have a new patch up shortly. General question about code style. It seems like ...
8 years ago (2012-12-21 14:15:21 UTC) #4
danakj
Generally new files in new style. old files in oldstyle unless its been converted. But ...
8 years ago (2012-12-21 18:49:25 UTC) #5
alexst (slow to review)
New patch
7 years, 12 months ago (2012-12-27 21:01:16 UTC) #6
danakj
I like the delete calling the callback business. A bunch of little nits, but two ...
7 years, 11 months ago (2013-01-02 16:17:22 UTC) #7
alexst (slow to review)
I updated the nits and made sure the callback is a postTask on main. https://codereview.chromium.org/11638028/diff/12001/cc/resource_provider.cc ...
7 years, 11 months ago (2013-01-02 19:31:35 UTC) #8
danakj
https://codereview.chromium.org/11638028/diff/12001/cc/texture_layer_impl.cc File cc/texture_layer_impl.cc (right): https://codereview.chromium.org/11638028/diff/12001/cc/texture_layer_impl.cc#newcode35 cc/texture_layer_impl.cc:35: DCHECK(!provider->inUseByConsumer(m_externalTextureResource)); On 2013/01/02 19:31:35, alexst wrote: > Since callback ...
7 years, 11 months ago (2013-01-02 19:43:27 UTC) #9
danakj
https://codereview.chromium.org/11638028/diff/15003/cc/texture_layer.cc File cc/texture_layer.cc (right): https://codereview.chromium.org/11638028/diff/15003/cc/texture_layer.cc#newcode15 cc/texture_layer.cc:15: static void runCallback(const base::Callback<void(unsigned)>& callback, unsigned syncPoint) { This ...
7 years, 11 months ago (2013-01-02 20:09:44 UTC) #10
alexst (slow to review)
I added tests and the remaining nits should be addressed.
7 years, 11 months ago (2013-01-03 23:32:46 UTC) #11
jamesr
I don't think you are using GLC() correctly. Look at what it does in gl_renderer.h ...
7 years, 11 months ago (2013-01-03 23:40:14 UTC) #12
danakj
https://codereview.chromium.org/11638028/diff/25001/cc/texture_layer_unittest.cc File cc/texture_layer_unittest.cc (right): https://codereview.chromium.org/11638028/diff/25001/cc/texture_layer_unittest.cc#newcode5 cc/texture_layer_unittest.cc:5: #include <string> put this between cc/texture_layer.h and the rest ...
7 years, 11 months ago (2013-01-04 15:10:35 UTC) #13
alexst (slow to review)
New patch https://codereview.chromium.org/11638028/diff/25001/cc/resource_provider.cc File cc/resource_provider.cc (right): https://codereview.chromium.org/11638028/diff/25001/cc/resource_provider.cc#newcode245 cc/resource_provider.cc:245: GLC(context3d, textureId = context3d->createTexture()); Copy-pasted code from ...
7 years, 11 months ago (2013-01-04 16:20:48 UTC) #14
danakj
Thanks, this LGTM though I think we could still test that the callback happens at ...
7 years, 11 months ago (2013-01-04 21:36:27 UTC) #15
jamesr
https://codereview.chromium.org/11638028/diff/15005/cc/resource_provider.cc File cc/resource_provider.cc (right): https://codereview.chromium.org/11638028/diff/15005/cc/resource_provider.cc#newcode247 cc/resource_provider.cc:247: context3d->flush(); I'd still like to understand what the meaning ...
7 years, 11 months ago (2013-01-04 21:38:31 UTC) #16
alexst (slow to review)
> Do you think this is something we can test here? Maybe call > prepareSendToParent() ...
7 years, 11 months ago (2013-01-04 21:41:22 UTC) #17
jamesr1
On Fri, Jan 4, 2013 at 8:20 AM, <alexst@chromium.org> wrote: > > https://codereview.chromium.**org/11638028/diff/25001/cc/** > resource_provider.cc#**newcode248<https://codereview.chromium.org/11638028/diff/25001/cc/resource_provider.cc#newcode248> ...
7 years, 11 months ago (2013-01-04 21:43:15 UTC) #18
alexst (slow to review)
Actually, come to think of it, it's a remnant of my earlier prototype, where the ...
7 years, 11 months ago (2013-01-07 16:21:04 UTC) #19
alexst (slow to review)
> > How about the case when the resource from the mailbox is in use ...
7 years, 11 months ago (2013-01-07 18:21:35 UTC) #20
danakj
https://codereview.chromium.org/11638028/diff/27002/cc/texture_layer_unittest.cc File cc/texture_layer_unittest.cc (right): https://codereview.chromium.org/11638028/diff/27002/cc/texture_layer_unittest.cc#newcode19 cc/texture_layer_unittest.cc:19: no newline here https://codereview.chromium.org/11638028/diff/27002/cc/texture_layer_unittest.cc#newcode375 cc/texture_layer_unittest.cc:375: implLayer->willDraw(m_hostImpl.activeTree()->resource_provider()); if you didDraw() ...
7 years, 11 months ago (2013-01-07 18:24:28 UTC) #21
alexst (slow to review)
https://codereview.chromium.org/11638028/diff/27002/cc/texture_layer_unittest.cc File cc/texture_layer_unittest.cc (right): https://codereview.chromium.org/11638028/diff/27002/cc/texture_layer_unittest.cc#newcode19 cc/texture_layer_unittest.cc:19: On 2013/01/07 18:24:28, danakj wrote: > no newline here ...
7 years, 11 months ago (2013-01-07 18:38:04 UTC) #22
danakj
Thanks and LGTM
7 years, 11 months ago (2013-01-07 18:40:53 UTC) #23
jamesr
I still think a typedef for base::Callback<void(unsigned)> would make the code shorter and clearer
7 years, 11 months ago (2013-01-07 21:08:51 UTC) #24
danakj
On 2013/01/07 21:08:51, jamesr wrote: > I still think a typedef for base::Callback<void(unsigned)> would make ...
7 years, 11 months ago (2013-01-07 21:09:34 UTC) #25
danakj
https://codereview.chromium.org/11638028/diff/32013/cc/transferable_resource.h File cc/transferable_resource.h (right): https://codereview.chromium.org/11638028/diff/32013/cc/transferable_resource.h#newcode23 cc/transferable_resource.h:23: base::Callback<void(unsigned)> releaseCallback; oh I see. How about Mailbox::ReleaseCallback, and ...
7 years, 11 months ago (2013-01-07 21:10:59 UTC) #26
jamesr
https://codereview.chromium.org/11638028/diff/32013/cc/resource_provider.h File cc/resource_provider.h (right): https://codereview.chromium.org/11638028/diff/32013/cc/resource_provider.h#newcode89 cc/resource_provider.h:89: ResourceId createResourceFromTextureMailbox(const std::string& mailboxName, const base::Callback<void(unsigned)>& releaseCallback); this is ...
7 years, 11 months ago (2013-01-07 21:11:48 UTC) #27
alexst (slow to review)
https://codereview.chromium.org/11638028/diff/32013/cc/resource_provider.h File cc/resource_provider.h (right): https://codereview.chromium.org/11638028/diff/32013/cc/resource_provider.h#newcode89 cc/resource_provider.h:89: ResourceId createResourceFromTextureMailbox(const std::string& mailboxName, const base::Callback<void(unsigned)>& releaseCallback); On 2013/01/07 ...
7 years, 11 months ago (2013-01-07 21:38:47 UTC) #28
alexst (slow to review)
Just to follow up, do we have a consensus one way or another? I'd like ...
7 years, 11 months ago (2013-01-08 01:27:40 UTC) #29
jamesr1
It's not a blocking issue for me. On Mon, Jan 7, 2013 at 5:27 PM, ...
7 years, 11 months ago (2013-01-08 01:28:27 UTC) #30
alexst (slow to review)
Great, thanks for the feedback. I'll start landing it. On 2013/01/08 01:28:27, jamesr1 wrote: > ...
7 years, 11 months ago (2013-01-08 01:33:56 UTC) #31
danakj
On 2013/01/08 01:27:40, alexst wrote: > Just to follow up, do we have a consensus ...
7 years, 11 months ago (2013-01-08 01:43:37 UTC) #32
piman
https://codereview.chromium.org/11638028/diff/32013/cc/transferable_resource.h File cc/transferable_resource.h (right): https://codereview.chromium.org/11638028/diff/32013/cc/transferable_resource.h#newcode23 cc/transferable_resource.h:23: base::Callback<void(unsigned)> releaseCallback; NAK here, this is intended to be ...
7 years, 11 months ago (2013-01-08 01:45:34 UTC) #33
piman
Couple of more things from my side, otherwise, modulo my other comment, this looks good. ...
7 years, 11 months ago (2013-01-08 02:01:52 UTC) #34
alexst (slow to review)
Moved the mailbox callback out of transferable_resource.h and addressed comments. I'll do a followup with ...
7 years, 11 months ago (2013-01-08 02:46:27 UTC) #35
piman
Cool, LGTM!
7 years, 11 months ago (2013-01-08 02:48:47 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/alexst@chromium.org/11638028/41003
7 years, 11 months ago (2013-01-08 13:21:00 UTC) #37
commit-bot: I haz the power
7 years, 11 months ago (2013-01-08 15:28:48 UTC) #38
Message was sent while issue was closed.
Change committed as 175529

Powered by Google App Engine
This is Rietveld 408576698