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

Issue 16888015: Reland r206537 - cc: Don't return mailboxes if the TextureLayer is removed from the tree. (Closed)

Created:
7 years, 6 months ago by piman
Modified:
7 years, 6 months ago
Reviewers:
danakj
CC:
chromium-reviews, cc-bugs_chromium.org
Visibility:
Public.

Description

Reland r206537 - cc: Don't return mailboxes if the TextureLayer is removed from the tree. When the TextureLayer is removed from the tree, the TextureLayerImpl is destroyed, so it will return the mailbox to the main thread. Prior to this patch we would return the mailbox to the client. When re-attaching the TextureLayer, we would then not push the mailbox to the new TextureLayerImpl, and stop drawing the layer. Instead, keep the mailbox on the TextureLayer. If the TextureLayer is re-attached to the tree, we push the mailbox again (which is ok to do now). Only after the impl side has returned the mailbox *and* the mailbox is replaced on the TextureLayer (or it is destroyed), will we call the callback. To do that we add a refcounted MailboxHolder whose job is to call the callback when it's destroyed. It's referenced by the TextureLayer itself, while being the current mailbox, and the closures we give to the impl thread. BUG=249535 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=207081

Patch Set 1 #

Patch Set 2 : Fix threading issues #

Total comments: 4

Patch Set 3 : Safer semantics #

Total comments: 8

Patch Set 4 : nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+167 lines, -44 lines) Patch
M cc/layers/texture_layer.h View 1 2 3 chunks +50 lines, -2 lines 0 comments Download
M cc/layers/texture_layer.cc View 1 2 3 8 chunks +96 lines, -40 lines 0 comments Download
M cc/layers/texture_layer_impl.cc View 1 chunk +0 lines, -2 lines 0 comments Download
M cc/layers/texture_layer_unittest.cc View 1 chunk +21 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
piman
dana: PTAL PS1 is the original issue (after rebase). PS2 has the fix.
7 years, 6 months ago (2013-06-17 23:10:40 UTC) #1
danakj
https://codereview.chromium.org/16888015/diff/2001/cc/layers/texture_layer.cc File cc/layers/texture_layer.cc (right): https://codereview.chromium.org/16888015/diff/2001/cc/layers/texture_layer.cc#newcode261 cc/layers/texture_layer.cc:261: message_loop_->PostTask(FROM_HERE, base::Bind( I guess the downside here is we ...
7 years, 6 months ago (2013-06-18 00:53:24 UTC) #2
piman
PTAL https://codereview.chromium.org/16888015/diff/2001/cc/layers/texture_layer.cc File cc/layers/texture_layer.cc (right): https://codereview.chromium.org/16888015/diff/2001/cc/layers/texture_layer.cc#newcode261 cc/layers/texture_layer.cc:261: message_loop_->PostTask(FROM_HERE, base::Bind( On 2013/06/18 00:53:24, danakj wrote: > ...
7 years, 6 months ago (2013-06-18 02:10:58 UTC) #3
danakj
Cool, LGTM https://codereview.chromium.org/16888015/diff/16001/cc/layers/texture_layer.cc File cc/layers/texture_layer.cc (right): https://codereview.chromium.org/16888015/diff/16001/cc/layers/texture_layer.cc#newcode160 cc/layers/texture_layer.cc:160: if (!host && uses_mailbox_ && holder_ref_.get()) nit: ...
7 years, 6 months ago (2013-06-18 02:20:20 UTC) #4
piman
https://codereview.chromium.org/16888015/diff/16001/cc/layers/texture_layer.cc File cc/layers/texture_layer.cc (right): https://codereview.chromium.org/16888015/diff/16001/cc/layers/texture_layer.cc#newcode160 cc/layers/texture_layer.cc:160: if (!host && uses_mailbox_ && holder_ref_.get()) On 2013/06/18 02:20:20, ...
7 years, 6 months ago (2013-06-18 02:53:01 UTC) #5
danakj
LGTM!
7 years, 6 months ago (2013-06-18 03:00:03 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/piman@chromium.org/16888015/26001
7 years, 6 months ago (2013-06-18 18:58:01 UTC) #7
commit-bot: I haz the power
7 years, 6 months ago (2013-06-18 21:12:45 UTC) #8
Message was sent while issue was closed.
Change committed as 207081

Powered by Google App Engine
This is Rietveld 408576698