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

Issue 11571068: Use WeakPtr for posting cc tasks to main thread (Closed)

Created:
8 years ago by jamesr
Modified:
7 years, 11 months ago
Reviewers:
danakj, nduca
CC:
chromium-reviews, cc-bugs_chromium.org, enne (OOO)
Visibility:
Public.

Description

Use WeakPtr for posting cc tasks to main thread This gets rid of cc::ScopedThreadProxy in favor of using base::WeakPtr everywhere. The semantics (should be) unchanged, the main benefit is getting rid of base::Unretained(this) everywhere in cc. BUG= Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=174891

Patch Set 1 #

Patch Set 2 : use WeakPtr for tasks posted to main thread in ThreadedTests #

Total comments: 1

Patch Set 3 : rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+31 lines, -147 lines) Patch
M cc/cc.gyp View 1 2 1 chunk +0 lines, -2 lines 0 comments Download
M cc/layer_tree_host_unittest.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M cc/layer_tree_host_unittest_animation.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
D cc/scoped_thread_proxy.h View 1 chunk +0 lines, -54 lines 0 comments Download
D cc/scoped_thread_proxy.cc View 1 chunk +0 lines, -44 lines 0 comments Download
M cc/test/layer_tree_test_common.h View 1 2 6 chunks +3 lines, -8 lines 0 comments Download
M cc/test/layer_tree_test_common.cc View 1 2 5 chunks +13 lines, -26 lines 0 comments Download
M cc/thread_proxy.h View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M cc/thread_proxy.cc View 1 2 10 chunks +10 lines, -9 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
jamesr
8 years ago (2012-12-19 22:28:07 UTC) #1
danakj
Neet! LGTM https://codereview.chromium.org/11571068/diff/2001/cc/test/layer_tree_test_common.cc File cc/test/layer_tree_test_common.cc (right): https://codereview.chromium.org/11571068/diff/2001/cc/test/layer_tree_test_common.cc#newcode340 cc/test/layer_tree_test_common.cc:340: m_layerTreeHost->proxy()->mainThread()->postTask(base::Bind(&ThreadedTest::realEndTest, m_mainThreadWeakPtr)); nit: proxy() directly like the ...
8 years ago (2012-12-20 02:35:32 UTC) #2
nduca
LGTM. It seems to me that the next logical step is to split the thread ...
8 years ago (2012-12-20 18:48:46 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jamesr@chromium.org/11571068/8001
7 years, 11 months ago (2013-01-02 21:34:12 UTC) #4
commit-bot: I haz the power
7 years, 11 months ago (2013-01-02 23:59:51 UTC) #5
Message was sent while issue was closed.
Change committed as 174891

Powered by Google App Engine
This is Rietveld 408576698