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

Issue 22852006: cc: Don't leak the texture returned in CopyOutputRequest ever. (Closed)

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

Description

cc: Don't leak the texture returned in CopyOutputRequest ever. Currently we use a WeakPtr on the GLRenderer to prevent crashing if the GLRenderer goes away before the embedder is done with the texture returned in the CopyOutputRequest. But if the GLRenderer goes away, we just leak the texture. :( So, now that we have ContextProvider available, we hold a ref on the provider inside the Callback, and this way we can always destroy the texture when it is released. :) Also, we can remove the WeakPtrFactory from GLRenderer. R=piman BUG=255634 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=218148

Patch Set 1 #

Patch Set 2 : glrendererleak: addtest #

Patch Set 3 : glrendererleak: one less snc #

Patch Set 4 : glrendererleak: unneeded forward declare #

Total comments: 4

Patch Set 5 : glrendererleak: #

Patch Set 6 : glrendererleak: #

Patch Set 7 : glrendererleak: #

Patch Set 8 : glrendererleak: fix tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+179 lines, -30 lines) Patch
M cc/debug/test_context_provider.h View 1 2 3 4 5 6 7 1 chunk +7 lines, -1 line 0 comments Download
M cc/debug/test_context_provider.cc View 1 2 3 4 5 6 7 1 chunk +15 lines, -0 lines 0 comments Download
M cc/output/gl_renderer.h View 1 2 3 2 chunks +0 lines, -12 lines 0 comments Download
M cc/output/gl_renderer.cc View 3 chunks +15 lines, -15 lines 0 comments Download
M cc/output/output_surface_unittest.cc View 1 2 3 4 5 6 7 2 chunks +4 lines, -2 lines 0 comments Download
M cc/trees/layer_tree_host_unittest.cc View 1 2 3 4 5 1 chunk +138 lines, -0 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
danakj
Phew, this test was a bit tricky to write, I hope it looks reasonable.
7 years, 4 months ago (2013-08-16 02:37:03 UTC) #1
piman
The prod code changes LG, but not sure about threading in the test https://codereview.chromium.org/22852006/diff/8001/cc/trees/layer_tree_host_unittest.cc File ...
7 years, 4 months ago (2013-08-16 03:32:26 UTC) #2
danakj
https://codereview.chromium.org/22852006/diff/8001/cc/trees/layer_tree_host_unittest.cc File cc/trees/layer_tree_host_unittest.cc (right): https://codereview.chromium.org/22852006/diff/8001/cc/trees/layer_tree_host_unittest.cc#newcode3116 cc/trees/layer_tree_host_unittest.cc:3116: EXPECT_TRUE(result_); On 2013/08/16 03:32:27, piman wrote: > result_ is ...
7 years, 4 months ago (2013-08-16 18:18:38 UTC) #3
danakj
PTAL
7 years, 4 months ago (2013-08-16 18:28:28 UTC) #4
piman
OK, LGTM.
7 years, 4 months ago (2013-08-16 18:46:07 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/22852006/25001
7 years, 4 months ago (2013-08-16 18:48:25 UTC) #6
commit-bot: I haz the power
Retried try job too often on linux_rel for step(s) cc_unittests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_rel&number=160077
7 years, 4 months ago (2013-08-16 20:07:14 UTC) #7
danakj
Oh, nice, the added DCHECKs in TestContextProvider found some weirdness in tests.
7 years, 4 months ago (2013-08-16 21:23:46 UTC) #8
danakj
Ah, a couple output surface tests want to muck with state on the test content ...
7 years, 4 months ago (2013-08-16 21:47:50 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/22852006/42002
7 years, 4 months ago (2013-08-16 21:54:05 UTC) #10
piman
lgtm
7 years, 4 months ago (2013-08-17 00:09:51 UTC) #11
commit-bot: I haz the power
7 years, 4 months ago (2013-08-17 02:29:12 UTC) #12
Message was sent while issue was closed.
Change committed as 218148

Powered by Google App Engine
This is Rietveld 408576698