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

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

Created:
7 years, 4 months ago by danakj
Modified:
7 years, 4 months ago
CC:
chromium-reviews, sadrul, yusukes+watch_chromium.org, ben+watch_chromium.org, Ian Vollick, jonathan.backer, jam, penghuang+watch_chromium.org, apatrick_chromium, joi+watch-content_chromium.org, nona+watch_chromium.org, darin-cc_chromium.org, piman+watch_chromium.org, cc-bugs_chromium.org, James Su, miu+watch_chromium.org, boliu, no sievers
Visibility:
Public.

Description

Clean up compositor initialization/destruction. 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. R=jbauman, piman BUG=258625, 266565

Patch Set 1 #

Patch Set 2 : cleanupcompositor: #

Total comments: 3

Patch Set 3 : cleanupcompositor: Fixin fixin #

Patch Set 4 : cleanupcompositor: compositortestsDrawPixels #

Patch Set 5 : cleanupcompositor: All work maybe? #

Total comments: 2

Patch Set 6 : cleanupcompositor: No LOG(INFO)s #

Total comments: 1

Patch Set 7 : cleanupcompositor: DrawPixels fill viewport on all platforms #

Patch Set 8 : cleanupcompositor: Fix DesktopNotifications tests on win_aura? #

Patch Set 9 : cleanupcompositor: Can I has passing? #

Patch Set 10 : cleanupcompositor: printf debugging #

Patch Set 11 : cleanupcompositor: OK this time for sure #

Patch Set 12 : cleanupcompositor: rebase #

Patch Set 13 : cleanupcompositor: Flaky tests are flaky #

Patch Set 14 : cleanupcompositor: nits #

Patch Set 15 : cleanupcompositor: Revert change to use osmesa #

Patch Set 16 : cleanupcompositor: Win needs osmesa gl for compositor unit tests too #

Patch Set 17 : cleanupcompositor: rebase #

Patch Set 18 : cleanupcompositor: Don't disable threaded cmopositor #

Patch Set 19 : cleanupcompositor: Disable threaded compositor only when not using test contexts #

Patch Set 20 : cleanupcompositor: Choose real GL in one place #

Patch Set 21 : cleanupcompositor: rebase #

Patch Set 22 : cleanupcompositor: fix switches includes #

Patch Set 23 : cleanupcompositor: gfx prefix #

Patch Set 24 : cleanupcompositor: More tests were setting kUseGL #

Patch Set 25 : cleanupcompositor: Use real GL bindings for GPUVideoDecoder tests. Use real GL Contexts only on aur… #

Patch Set 26 : cleanupcompositor: nits #

Patch Set 27 : cleanupcompositor: kTestCompositor only defined on USE_AURA #

Patch Set 28 : cleanupcompositor: Fix dominance #

Total comments: 6

Patch Set 29 : cleanupcompositor: skys review #

Patch Set 30 : cleanupcompositor: Fix TabsApi test #

Patch Set 31 : cleanupcompositor: UsesTestContexts -> DoesCreateTestContexts #

Total comments: 2

Patch Set 32 : cleanupcompositor: no weird net/ whitespace #

Patch Set 33 : cleanupcompositor: Only turn on real gpu on platforms that need it for video decode #

Patch Set 34 : cleanupcompositor: Blah. #

Patch Set 35 : cleanupcompositor: UseRealGLBindings in BrowserPluginHostTest for AcceptDragEvents on win_rel #

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+364 lines, -378 lines) Patch
M ash/test/test_shell_delegate.cc View 1 2 3 4 5 6 7 8 10 2 chunks +5 lines, -0 lines 0 comments Download
M ash/test/test_suite.cc View 1 2 chunks +0 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +0 lines, -12 lines 0 comments Download
M chrome/browser/extensions/extension_resource_request_policy_apitest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 1 chunk +8 lines, -0 lines 0 comments Download
M chrome/browser/extensions/requirements_checker_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +1 line, -12 lines 0 comments Download
M chrome/browser/extensions/web_view_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 3 chunks +0 lines, -11 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 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 2 chunks +12 lines, -0 lines 0 comments Download
M chrome/browser/ui/ash/ash_init.cc View 1 1 chunk +0 lines, -1 line 0 comments Download
M chrome/test/base/in_process_browser_test.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +0 lines, -15 lines 0 comments Download
M chrome/test/base/test_launcher_utils.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +0 lines, -6 lines 0 comments Download
M chrome/test/base/test_launcher_utils.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 2 chunks +0 lines, -11 lines 0 comments Download
M chrome/test/base/view_event_test_base.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 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 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 9 chunks +13 lines, -22 lines 0 comments Download
M chrome/test/gpu/webgl_infobar_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 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 18 19 2 chunks +0 lines, -10 lines 0 comments Download
M chrome/test/ui/ui_test.cc View 1 2 chunks +0 lines, -10 lines 0 comments Download
M components/test/run_all_unittests.cc View 1 2 chunks +0 lines, -4 lines 0 comments Download
M content/browser/aura/gpu_process_transport_factory.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 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 18 19 20 21 22 23 24 25 26 27 28 29 30 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/aura/image_transport_factory.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 2 chunks +30 lines, -8 lines 0 comments Download
content/browser/browser_plugin/browser_plugin_host_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/gpu/gpu_info_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 2 chunks +5 lines, -4 lines 0 comments Download
M content/browser/gpu/gpu_ipc_browsertests.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +0 lines, -12 lines 0 comments Download
M content/browser/gpu/gpu_pixel_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 3 chunks +7 lines, -3 lines 0 comments Download
M content/browser/media/media_browsertest.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/media/media_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 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 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 4 chunks +15 lines, -23 lines 0 comments Download
M content/common/gpu/client/gl_helper.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M content/common/gpu/client/gl_helper.cc View 1 2 9 chunks +20 lines, -9 lines 0 comments Download
M content/public/test/browser_test_base.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 2 chunks +20 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 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 3 chunks +43 lines, -1 line 0 comments Download
M content/public/test/content_test_suite_base.cc View 1 2 chunks +0 lines, -4 lines 0 comments Download
M content/test/content_browser_test.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 1 chunk +0 lines, -6 lines 0 comments Download
M ui/aura/test/aura_test_helper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +6 lines, -0 lines 0 comments Download
M ui/aura/test/test_suite.cc View 1 2 chunks +0 lines, -3 lines 0 comments Download
M ui/compositor/compositor.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 4 chunks +14 lines, -0 lines 0 comments Download
M ui/compositor/compositor.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 11 chunks +65 lines, -53 lines 0 comments Download
M ui/compositor/compositor.gyp View 1 1 chunk +0 lines, -1 line 0 comments Download
M ui/compositor/compositor_setup.h View 1 1 chunk +0 lines, -29 lines 0 comments Download
M ui/compositor/layer_unittest.cc View 1 2 3 4 5 6 18 chunks +59 lines, -73 lines 0 comments Download
M ui/compositor/test/test_suite.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +1 line, -5 lines 0 comments Download
M ui/keyboard/keyboard_test_suite.cc View 1 2 chunks +0 lines, -3 lines 0 comments Download
M ui/message_center/test/run_all_unittests.cc View 1 2 chunks +0 lines, -8 lines 0 comments Download
M ui/snapshot/snapshot_aura_unittest.cc View 1 1 chunk +0 lines, -1 line 0 comments Download
M ui/views/run_all_unittests.cc View 1 2 chunks +0 lines, -3 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_capture_client_unittest.cc View 1 2 3 4 1 chunk +8 lines, -0 lines 0 comments Download

Messages

Total messages: 20 (0 generated)
danakj
Throwing this at bots, and I'll come back to it tomorrow to look through any ...
7 years, 4 months ago (2013-07-31 01:32:50 UTC) #1
piman
LGTM on the approach. Thanks for the cleanup. You probably need some extra fixes in ...
7 years, 4 months ago (2013-07-31 07:01:48 UTC) #2
danakj
I think I should have all (or most) of the tests working now, try jobs ...
7 years, 4 months ago (2013-07-31 20:14:50 UTC) #3
danakj
Also, interestingly on win7_aura: LayerWithRealCompositorTest.DrawPixels: e:\b\build\slave\win7_aura\build\src\ui\compositor\layer_unittest.cc(819): error: Value of: GetCompositor()->size().ToString() Actual: "484x462" Expected: gfx::Size(500, 500).ToString() ...
7 years, 4 months ago (2013-07-31 20:36:03 UTC) #4
danakj
PTAL, the tests failing in PS12 were all flaky failing for me locally, so I'm ...
7 years, 4 months ago (2013-08-01 21:30:27 UTC) #5
danakj
+sky Please have a look for a more deterministic and orderly compositor startup/shutdown. We use ...
7 years, 4 months ago (2013-08-01 21:31:53 UTC) #6
danakj
piman/sky: review ping I keep getting different flaky tests failing on the bots, but the ...
7 years, 4 months ago (2013-08-02 16:02:16 UTC) #7
danakj
Non-test comopsitor is super flaky with threaded compositor in these tests: http://build.chromium.org/p/tryserver.chromium/builders/linux_chromeos/builds/141886 So went back ...
7 years, 4 months ago (2013-08-03 00:06:37 UTC) #8
sky
LGTM https://codereview.chromium.org/21052007/diff/295001/content/browser/aura/image_transport_factory.cc File content/browser/aura/image_transport_factory.cc (right): https://codereview.chromium.org/21052007/diff/295001/content/browser/aura/image_transport_factory.cc#newcode49 content/browser/aura/image_transport_factory.cc:49: if (use_test_contexts) { nit: no need for local ...
7 years, 4 months ago (2013-08-05 16:50:58 UTC) #9
danakj
https://codereview.chromium.org/21052007/diff/295001/content/browser/aura/image_transport_factory.cc File content/browser/aura/image_transport_factory.cc (right): https://codereview.chromium.org/21052007/diff/295001/content/browser/aura/image_transport_factory.cc#newcode49 content/browser/aura/image_transport_factory.cc:49: if (use_test_contexts) { On 2013/08/05 16:50:58, sky wrote: > ...
7 years, 4 months ago (2013-08-05 16:53:34 UTC) #10
sky
I don't think any of the names imply the value can or can't change. A ...
7 years, 4 months ago (2013-08-05 17:44:54 UTC) #11
danakj
On 2013/08/05 17:44:54, sky wrote: > I don't think any of the names imply the ...
7 years, 4 months ago (2013-08-05 20:53:35 UTC) #12
piman
lgtm
7 years, 4 months ago (2013-08-05 21:30:20 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/danakj@chromium.org/21052007/321001
7 years, 4 months ago (2013-08-05 21:49:55 UTC) #14
commit-bot: I haz the power
Retried try job too often on chromium_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_presubmit&number=18861
7 years, 4 months ago (2013-08-05 22:11:55 UTC) #15
danakj
+joi for components/ +rsleevi for net/
7 years, 4 months ago (2013-08-05 22:22:08 UTC) #16
Ryan Sleevi
https://codereview.chromium.org/21052007/diff/321001/net/http/http_network_transaction_unittest.cc File net/http/http_network_transaction_unittest.cc (right): https://codereview.chromium.org/21052007/diff/321001/net/http/http_network_transaction_unittest.cc#newcode10798 net/http/http_network_transaction_unittest.cc:10798: Um... do you actually need this? :)
7 years, 4 months ago (2013-08-05 22:23:01 UTC) #17
danakj
https://codereview.chromium.org/21052007/diff/321001/net/http/http_network_transaction_unittest.cc File net/http/http_network_transaction_unittest.cc (right): https://codereview.chromium.org/21052007/diff/321001/net/http/http_network_transaction_unittest.cc#newcode10798 net/http/http_network_transaction_unittest.cc:10798: On 2013/08/05 22:23:03, Ryan Sleevi wrote: > Um... do ...
7 years, 4 months ago (2013-08-05 22:33:30 UTC) #18
danakj
I can no longer upload to this CL (boo). So I'm moving to https://codereview.chromium.org/22293003/ and ...
7 years, 4 months ago (2013-08-06 21:05:06 UTC) #19
Jói Sigurðsson
7 years, 4 months ago (2013-08-09 16:57:33 UTC) #20
joi.sigurdsson@gmail.com -> joi@chromium.org; also, I'm on vacation
until Monday, will look then if this is still live.

Cheers,
Jói


On Tue, Aug 6, 2013 at 9:05 PM,  <danakj@chromium.org> wrote:
> I can no longer upload to this CL (boo). So I'm moving to
> https://codereview.chromium.org/22293003/ and closing this. I'll TBR from
> there
> once I can get win_rel to pass if I don't have to do anything silly.
>
> https://codereview.chromium.org/21052007/

Powered by Google App Engine
This is Rietveld 408576698