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

Issue 23454014: cc: Drop ContextProvider references on the impl thread before quitting (Closed)

Created:
7 years, 3 months ago by danakj
Modified:
7 years, 3 months ago
Reviewers:
piman
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, cc-bugs_chromium.org, jam, jbauman
Visibility:
Public.

Description

cc: Drop ContextProvider references on the impl thread before quitting When passing a TextureMailbox from the impl thread out to the cc embedder on the main thread, we need to keep a ref on the ContextProvider that owns the texture in the mailbox, to keep the mailbox alive while the embedder is receiving it. However if the compositor shutsdown and the impl thread goes away, we must have already dropped the ref on the ContextProvider or it will be destroyed (a) on the wrong thread and (b) after the global GPU process objects it holds pointers to have been destroyed. Crash will occur. So, we add a TextureMailboxDeleter class that the GLRenderer uses to generate a TextureMailbox release callback for the main thread instead of rolling its own thing. The TMDeleter class' lifetime is bounded by the life of the compositor instance on the impl thread, so it is destroyed before the impl thread is joined. And when it is destroyed it deletes the textures it was meant to destroy, and drops its ref on the context provider. BUG=283625 R=piman Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=222207

Patch Set 1 #

Patch Set 2 : callbackcontrolcenter: Add test #

Patch Set 3 : callbackcontrolcenter: Add another test #

Patch Set 4 : callbackcontrolcenter: rebase #

Patch Set 5 : callbackcontrolcenter: rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+271 lines, -50 lines) Patch
M cc/cc.gyp View 1 chunk +2 lines, -0 lines 0 comments Download
M cc/cc_tests.gyp View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M cc/output/gl_renderer.h View 1 2 3 4 3 chunks +12 lines, -6 lines 0 comments Download
M cc/output/gl_renderer.cc View 1 2 3 4 5 chunks +14 lines, -35 lines 0 comments Download
M cc/output/gl_renderer_unittest.cc View 1 2 3 4 1 chunk +6 lines, -1 line 0 comments Download
A cc/resources/texture_mailbox_deleter.h View 1 chunk +46 lines, -0 lines 0 comments Download
A cc/resources/texture_mailbox_deleter.cc View 1 chunk +89 lines, -0 lines 0 comments Download
A cc/resources/texture_mailbox_deleter_unittest.cc View 1 1 chunk +39 lines, -0 lines 0 comments Download
M cc/test/pixel_test.h View 1 2 3 4 3 chunks +5 lines, -0 lines 0 comments Download
M cc/test/pixel_test.cc View 1 2 3 4 2 chunks +5 lines, -0 lines 0 comments Download
M cc/trees/layer_tree_host_impl.h View 1 2 3 4 2 chunks +3 lines, -0 lines 0 comments Download
M cc/trees/layer_tree_host_impl.cc View 1 2 3 4 3 chunks +3 lines, -0 lines 0 comments Download
M cc/trees/layer_tree_host_impl_unittest.cc View 1 2 3 4 3 chunks +45 lines, -1 line 0 comments Download
M content/browser/browser_plugin/browser_plugin_host_browsertest.cc View 1 chunk +1 line, -7 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
danakj
7 years, 3 months ago (2013-09-06 20:41:01 UTC) #1
danakj
ping
7 years, 3 months ago (2013-09-09 14:37:43 UTC) #2
piman
lgtm
7 years, 3 months ago (2013-09-09 20:51:52 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/danakj@chromium.org/23454014/9001
7 years, 3 months ago (2013-09-09 20:54:20 UTC) #4
commit-bot: I haz the power
Failed to apply patch for cc/output/gl_renderer.cc: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
7 years, 3 months ago (2013-09-09 20:54:27 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/danakj@chromium.org/23454014/18001
7 years, 3 months ago (2013-09-09 21:08:50 UTC) #6
commit-bot: I haz the power
Failed to apply patch for cc/output/gl_renderer.cc: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
7 years, 3 months ago (2013-09-09 21:08:56 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/danakj@chromium.org/23454014/22001
7 years, 3 months ago (2013-09-09 22:07:03 UTC) #8
commit-bot: I haz the power
Retried try job too often on win7_aura for step(s) interactive_ui_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win7_aura&number=76969
7 years, 3 months ago (2013-09-10 00:19:16 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/danakj@chromium.org/23454014/22001
7 years, 3 months ago (2013-09-10 04:43:04 UTC) #10
commit-bot: I haz the power
7 years, 3 months ago (2013-09-10 08:25:17 UTC) #11
Message was sent while issue was closed.
Change committed as 222207

Powered by Google App Engine
This is Rietveld 408576698