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

Issue 22293003: Clean up compositor initialization/destruction. (Closed)

Created:
7 years, 4 months ago by danakj
Modified:
5 years, 7 months ago
Reviewers:
gab, sky, Jói, piman
CC:
chromium-reviews, sadrul, yusukes+watch_chromium.org, tburkard+watch_chromium.org, sievers+watch_chromium.org, joi+watch-content_chromium.org, miu+watch_chromium.org, extensions-reviews_chromium.org, cbentzel+watch_chromium.org, ben+watch_chromium.org, jam, apatrick_chromium, jbauman+watch_chromium.org, nona+watch_chromium.org, darin-cc_chromium.org, chromium-apps-reviews_chromium.org, penghuang+watch_chromium.org, feature-media-reviews_chromium.org, piman+watch_chromium.org, cc-bugs_chromium.org, gavinp+prer_chromium.org, Ian Vollick, tfarina, dominich+watch_chromium.org, danakj+watch_chromium.org, James Su
Visibility:
Public.

Description

Clean up compositor initialization/destruction. Moved from https://codereview.chromium.org/21052007/ Currently the ContextFactory is outliving the compositor thread in tests, which is bad since the contexts in there can be bound to the compositor thread. Then we end up reusing those contexts and bad things happen. This enforces ordering for initializing and destroying the compositor as follows: Initialize ContextFactory ..Compositor::Initialize ....Create Compositor instances ....Delete Compositor instances ..Compositor::Terminate The Compositor::Terminate call also destroys the ContextFactory. The ContextFactory can be initialized in one of two ways: 1. ImageTransportFactory::Initialize will set up the ContextFactory. This is used by things that invoke all of content/browser/. 2. Compositor::InitializeContextFactoryForTests() must be explicitly called by any unit tests that create a compositor. Since some tests want a real GL context and some don't, this does away with the misnomer of initializing the Compositor once for the entire test suite, and then re-initializing somewhere in the middle of the test suite. Instead, each test must Initialize/Terminate the compositor with the ContextFactory type of its choice. Incidently, this test enables 20 tests on aura or win_aura that were previously being skipped. TBR=piman@chromium.org BUG=258625 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=216780 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=217069

Patch Set 1 #

Patch Set 2 : cleanupcompositor: UseRealGLBindings for CompositingRWHVBrowserTests on win_rel #

Patch Set 3 : cleanupcompositor: UseRealGLBindings for TabCaptureApi tests on win_rel #

Patch Set 4 : cleanupcompositor: Fix ordering #

Patch Set 5 : cleanupcompositor: Undo the UsingAcceleratedVideoDecoder stuff and add TODO and crbug to it #

Patch Set 6 : cleanupcompositor: Disable EndToEnd on win_rel #

Patch Set 7 : cleanupcompositor: More ordering #

Patch Set 8 : cleanupcompositor: Re-enable EndToEnd, it passed in Patch Set 4, at least once #

Patch Set 9 : cleanupcompositor: fix build breakage2 #

Patch Set 10 : cleanupcompositor: More tests failing GPU video decoder #

Patch Set 11 : cleanupcompositor: Chromeos always real Gl bindings #

Patch Set 12 : cleanupcompositor: All perf bots use --enable-gpu to say use GPU, so turn on real GL bindings there #

Patch Set 13 : cleanupcompositor: Pair real contexts with real GL bindings on ChromeOS #

Patch Set 14 : cleanupcompositor: LOG INFOs #

Patch Set 15 : cleanupcompositor: RealGLBindings in TabDrag tests (why?) #

Patch Set 16 : cleanupcompositor: With LOG #

Patch Set 17 : cleanupcompositor: Without LOGing, better TODO in TabDrag tests #

Patch Set 18 : cleanupcompositor: rebase #

Patch Set 19 : cleanupcompositor: Use real GPU in Webrtc browser tests #

Patch Set 20 : cleanupcompositor: UseRealGLBindings in NetInternalsTest #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+424 lines, -403 lines) Patch
M ash/test/test_shell_delegate.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +5 lines, -0 lines 0 comments Download
M ash/test/test_suite.cc View 2 chunks +0 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/extensions/file_manager/file_manager_browsertest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +8 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/tab_capture/tab_capture_apitest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +8 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc View 2 chunks +0 lines, -12 lines 0 comments Download
M chrome/browser/extensions/extension_resource_request_policy_apitest.cc View 1 2 3 4 1 chunk +8 lines, -0 lines 0 comments Download
M chrome/browser/extensions/requirements_checker_browsertest.cc View 3 chunks +1 line, -12 lines 0 comments Download
M chrome/browser/extensions/web_view_browsertest.cc View 1 2 3 chunks +0 lines, -11 lines 0 comments Download
M chrome/browser/media/chrome_webrtc_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +8 lines, -0 lines 0 comments Download
M chrome/browser/prerender/prerender_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +12 lines, -0 lines 0 comments Download
M chrome/browser/ui/ash/ash_init.cc View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +9 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/net_internals/net_internals_ui_browsertest.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/webui/net_internals/net_internals_ui_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +10 lines, -0 lines 0 comments Download
M chrome/test/base/in_process_browser_test.cc View 1 2 14 4 chunks +0 lines, -15 lines 0 comments Download
M chrome/test/base/test_launcher_utils.h View 1 chunk +0 lines, -6 lines 0 comments Download
M chrome/test/base/test_launcher_utils.cc View 2 chunks +0 lines, -11 lines 0 comments Download
M chrome/test/base/view_event_test_base.cc View 3 chunks +13 lines, -4 lines 0 comments Download
M chrome/test/gpu/gpu_feature_browsertest.cc View 1 2 3 4 5 6 7 8 9 chunks +13 lines, -22 lines 0 comments Download
M chrome/test/gpu/webgl_infobar_browsertest.cc View 1 chunk +0 lines, -7 lines 0 comments Download
M chrome/test/ppapi/ppapi_test.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +0 lines, -10 lines 0 comments Download
M chrome/test/ui/ui_test.cc View 2 chunks +0 lines, -10 lines 0 comments Download
M components/test/run_all_unittests.cc View 2 chunks +0 lines, -4 lines 0 comments Download
M content/browser/aura/gpu_process_transport_factory.h View 2 chunks +4 lines, -1 line 0 comments Download
M content/browser/aura/gpu_process_transport_factory.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/aura/image_transport_factory.cc View 16 2 chunks +30 lines, -8 lines 0 comments Download
M content/browser/browser_plugin/browser_plugin_host_browsertest.cc View 1 2 3 4 5 6 1 chunk +5 lines, -0 lines 0 comments Download
M content/browser/gpu/gpu_info_browsertest.cc View 2 chunks +5 lines, -4 lines 0 comments Download
M content/browser/gpu/gpu_ipc_browsertests.cc View 1 chunk +0 lines, -12 lines 0 comments Download
M content/browser/gpu/gpu_pixel_browsertest.cc View 3 chunks +7 lines, -3 lines 0 comments Download
M content/browser/media/media_browsertest.h View 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/media/media_browsertest.cc View 1 2 3 4 1 chunk +8 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_browsertest.cc View 1 2 3 4 5 6 7 8 7 chunks +13 lines, -46 lines 0 comments Download
M content/browser/web_contents/web_contents_view_aura_browsertest.cc View 1 2 3 4 5 6 7 8 4 chunks +5 lines, -7 lines 0 comments Download
M content/common/gpu/client/gl_helper.h View 1 chunk +1 line, -1 line 0 comments Download
M content/common/gpu/client/gl_helper.cc View 9 chunks +20 lines, -9 lines 0 comments Download
M content/public/test/browser_test_base.h View 1 2 3 4 2 chunks +16 lines, -0 lines 0 comments Download
M content/public/test/browser_test_base.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +54 lines, -1 line 3 comments Download
M content/public/test/content_test_suite_base.cc View 2 chunks +0 lines, -4 lines 0 comments Download
M ui/aura/test/aura_test_helper.cc View 2 chunks +6 lines, -0 lines 0 comments Download
M ui/aura/test/test_suite.cc View 2 chunks +0 lines, -3 lines 0 comments Download
M ui/compositor/compositor.h View 4 chunks +14 lines, -0 lines 0 comments Download
M ui/compositor/compositor.cc View 11 chunks +65 lines, -53 lines 0 comments Download
M ui/compositor/compositor.gyp View 1 chunk +0 lines, -1 line 0 comments Download
D ui/compositor/compositor_setup.h View 1 chunk +0 lines, -29 lines 0 comments Download
M ui/compositor/layer_unittest.cc View 18 chunks +59 lines, -73 lines 0 comments Download
M ui/compositor/test/test_suite.cc View 1 chunk +1 line, -5 lines 0 comments Download
M ui/keyboard/keyboard_test_suite.cc View 2 chunks +0 lines, -3 lines 0 comments Download
M ui/message_center/test/run_all_unittests.cc View 2 chunks +0 lines, -8 lines 0 comments Download
M ui/snapshot/snapshot_aura_unittest.cc View 1 chunk +0 lines, -1 line 0 comments Download
M ui/views/run_all_unittests.cc View 2 chunks +0 lines, -3 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_capture_client_unittest.cc View 1 chunk +8 lines, -0 lines 0 comments Download

Messages

Total messages: 31 (0 generated)
danakj
7 years, 4 months ago (2013-08-07 00:59:59 UTC) #1
piman
lgtm
7 years, 4 months ago (2013-08-07 01:03:16 UTC) #2
danakj
Committed patchset #8 manually as r216179 (presubmit successful).
7 years, 4 months ago (2013-08-07 14:08:53 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/22293003/69001
7 years, 4 months ago (2013-08-07 14:42:51 UTC) #4
commit-bot: I haz the power
Failed to trigger a try job on linux_chromeos HTTP Error 400: Bad Request
7 years, 4 months ago (2013-08-07 17:02:10 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/22293003/82001
7 years, 4 months ago (2013-08-07 17:02:47 UTC) #6
danakj
This has passed everything except win_rel EndToEnd which was being flaky. I'll dcommit again.
7 years, 4 months ago (2013-08-07 21:40:06 UTC) #7
danakj
Committed patchset #10 manually as r216278 (presubmit successful).
7 years, 4 months ago (2013-08-07 21:48:24 UTC) #8
miu
On 2013/08/07 21:48:24, danakj wrote: > Committed patchset #10 manually as r216278 (presubmit successful). sgtm. ...
7 years, 4 months ago (2013-08-07 22:02:12 UTC) #9
danakj
I've matched things up so when real GL contexts (ie not faked out test contexts) ...
7 years, 4 months ago (2013-08-08 00:26:00 UTC) #10
danakj
I've made android always use real GL bindings as OSmesa does not exist there, and ...
7 years, 4 months ago (2013-08-09 00:47:58 UTC) #11
danakj
I got 6 clean runs of linux_chromeos while not using OSMesa in the TabDrag tests. ...
7 years, 4 months ago (2013-08-09 17:01:44 UTC) #12
danakj
I've gone far enough down this rabbit hole to I think understand what's going on. ...
7 years, 4 months ago (2013-08-09 18:58:29 UTC) #13
danakj
So, I believe my way forward is to land this with "real GL bindings that ...
7 years, 4 months ago (2013-08-09 18:59:14 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/danakj@chromium.org/22293003/157001
7 years, 4 months ago (2013-08-09 19:01:26 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/danakj@chromium.org/22293003/161001
7 years, 4 months ago (2013-08-09 21:11:54 UTC) #16
commit-bot: I haz the power
Change committed as 216780
7 years, 4 months ago (2013-08-09 23:48:59 UTC) #17
f(malita)
On 2013/08/09 23:48:59, I haz the power (commit-bot) wrote: > Change committed as 216780 There's ...
7 years, 4 months ago (2013-08-11 21:45:56 UTC) #18
Isaac (away)
This was reverted in r216907 and it did indeed fix the broken aura test. Interestingly, ...
7 years, 4 months ago (2013-08-12 05:53:40 UTC) #19
danakj
On 2013/08/12 05:53:40, Isaac wrote: > This was reverted in r216907 and it did indeed ...
7 years, 4 months ago (2013-08-12 15:56:09 UTC) #20
danakj
Patch set 19 turns on real GL bindings for Webrtc browser tests, which are perf ...
7 years, 4 months ago (2013-08-12 16:57:16 UTC) #21
danakj
Patch set 20 turns on real GL bindings for NetInternalsTest tests on Win7 Aura.
7 years, 4 months ago (2013-08-12 17:13:56 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/danakj@chromium.org/22293003/185001
7 years, 4 months ago (2013-08-12 17:13:57 UTC) #23
commit-bot: I haz the power
Step "update" is always a major failure. Look at the try server FAQ for more ...
7 years, 4 months ago (2013-08-12 17:23:41 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/danakj@chromium.org/22293003/185001
7 years, 4 months ago (2013-08-12 17:26:13 UTC) #25
commit-bot: I haz the power
List of reviewers changed. joi@chromium.org did a drive-by without LGTM'ing!
7 years, 4 months ago (2013-08-12 20:46:55 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/danakj@chromium.org/22293003/185001
7 years, 4 months ago (2013-08-12 20:48:49 UTC) #27
commit-bot: I haz the power
Change committed as 217069
7 years, 4 months ago (2013-08-12 20:58:06 UTC) #28
gab
Hey danakj, just noticed something and wanted to make sure this was known/intentional, see below. ...
7 years, 4 months ago (2013-08-15 19:40:46 UTC) #29
danakj
https://chromiumcodereview.appspot.com/22293003/diff/185001/content/public/test/browser_test_base.cc File content/public/test/browser_test_base.cc (right): https://chromiumcodereview.appspot.com/22293003/diff/185001/content/public/test/browser_test_base.cc#newcode105 content/public/test/browser_test_base.cc:105: MainFunctionParams params(*command_line); On 2013/08/15 19:40:46, gab wrote: > Looks ...
7 years, 4 months ago (2013-08-15 20:15:12 UTC) #30
gab
7 years, 4 months ago (2013-08-15 20:18:46 UTC) #31
Message was sent while issue was closed.
https://chromiumcodereview.appspot.com/22293003/diff/185001/content/public/te...
File content/public/test/browser_test_base.cc (right):

https://chromiumcodereview.appspot.com/22293003/diff/185001/content/public/te...
content/public/test/browser_test_base.cc:105: MainFunctionParams
params(*command_line);
On 2013/08/15 20:15:13, danakj wrote:
> On 2013/08/15 19:40:46, gab wrote:
> > Looks like the |command_line| is used here to launch the test; yet you are
> > appending more switches to the |command_line| after this line; is this
> > ok/intentional?
> 
> Hm, it seems to work fine in practice for these switches. But I should move
them
> up. Thanks.

Ah, just noticed that it seems MainFunctionParams stores the CommandLine by
reference (which would explain why it still works); still a weird flow to read.

I'd say we can just move the creation of MainFunctionParams to the bottom of
this method as it's not used before anyways...

Powered by Google App Engine
This is Rietveld 408576698