summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordanakj <danakj@chromium.org>2015-03-27 15:57:57 -0700
committerCommit bot <commit-bot@chromium.org>2015-03-27 22:59:22 +0000
commit6ab2e52d484e53a5bb25731b0463bb461992069f (patch)
tree5af2b5d79be78eaeb79a1cac5bb23036965e1d9f
parent1f496c6080968dead0618f375928b3c31b312234 (diff)
downloadchromium_src-6ab2e52d484e53a5bb25731b0463bb461992069f.zip
chromium_src-6ab2e52d484e53a5bb25731b0463bb461992069f.tar.gz
chromium_src-6ab2e52d484e53a5bb25731b0463bb461992069f.tar.bz2
Revert of Add switch (for cast_shell) to defer creation of GPU process. (patchset #8 id:140001 of https://codereview.chromium.org/1038783002/)
Reason for revert: Breaking mac browser tests? http://build.chromium.org/p/chromium.mac/builders/Mac10.6%20Tests/builds/436 BrowserGpuChannelHostFactoryTest.AlreadyEstablished (run #1): [ RUN ] BrowserGpuChannelHostFactoryTest.AlreadyEstablished [35311:27139:0327/154011:20111614311426:ERROR:browser_gpu_channel_host_factory.cc(134)] Failed to launch GPU process. [35311:27139:0327/154011:20111614504937:ERROR:browser_gpu_channel_host_factory.cc(134)] Failed to launch GPU process. ../../content/browser/gpu/gpu_ipc_browsertests.cc:179: Failure Value of: event Actual: false Expected: true [ FAILED ] BrowserGpuChannelHostFactoryTest.AlreadyEstablished, where TypeParam = and GetParam() = (215 ms) Original issue's description: > Add switch (for cast_shell) to defer creation of GPU process. > > For context - on Chromecast, we have the following scenario: > * We support running in the background (i.e. not rendering anything) > with our service running in the browser process to listen for incoming > cast connections. > * We cannot acquire any GPU resources (e.g. a GL context or surface) > during this time as another external application needs it, and it's a > global resource. > > We have supported starting up in the foreground and switching to this > mode for a long time. > > But now, we need to support starting up in this mode. In other words, > we need to bring up the browser process and run our cast receiver > service, but we cannot run any of the GPU process's initialisation > code until an incoming cast arrives. > > BUG=internal b/19898960 > > Committed: https://crrev.com/db7efe6dfbda08faa1e55cda4441b43dac005733 > Cr-Commit-Position: refs/heads/master@{#322655} TBR=enne@chromium.org,nasko@chromium.org,piman@chromium.org,sievers@chromium.org,halliwell@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=internal b/19898960 Review URL: https://codereview.chromium.org/1043603002 Cr-Commit-Position: refs/heads/master@{#322668}
-rw-r--r--content/browser/browser_main_loop.cc3
-rw-r--r--content/browser/gpu/gpu_ipc_browsertests.cc30
-rw-r--r--content/public/common/content_switches.cc3
-rw-r--r--content/public/common/content_switches.h1
4 files changed, 10 insertions, 27 deletions
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
index 1c38215..4409254 100644
--- a/content/browser/browser_main_loop.cc
+++ b/content/browser/browser_main_loop.cc
@@ -1061,8 +1061,7 @@ int BrowserMainLoop::BrowserThreadsStarted() {
bool established_gpu_channel = false;
#if defined(USE_AURA) || defined(OS_MACOSX)
established_gpu_channel = true;
- if (!GpuDataManagerImpl::GetInstance()->CanUseGpuBrowserCompositor() ||
- parsed_command_line_.HasSwitch(switches::kDisableGpuEarlyInit)) {
+ if (!GpuDataManagerImpl::GetInstance()->CanUseGpuBrowserCompositor()) {
established_gpu_channel = always_uses_gpu = false;
}
BrowserGpuChannelHostFactory::Initialize(established_gpu_channel);
diff --git a/content/browser/gpu/gpu_ipc_browsertests.cc b/content/browser/gpu/gpu_ipc_browsertests.cc
index a0b9f40..817d732 100644
--- a/content/browser/gpu/gpu_ipc_browsertests.cc
+++ b/content/browser/gpu/gpu_ipc_browsertests.cc
@@ -91,12 +91,6 @@ class BrowserGpuChannelHostFactoryTest : public ContentBrowserTest {
ContentBrowserTest::SetUpOnMainThread();
}
- void SetUpCommandLine(base::CommandLine* command_line) override {
- // Start all tests without a gpu channel so that the tests exercise a
- // consistent codepath.
- command_line->AppendSwitch(switches::kDisableGpuEarlyInit);
- }
-
void OnContextLost(const base::Closure callback, int* counter) {
(*counter)++;
callback.Run();
@@ -139,21 +133,16 @@ class BrowserGpuChannelHostFactoryTest : public ContentBrowserTest {
}
};
-// These tests are flaky on Windows.
-#if !defined(OS_WIN)
-IN_PROC_BROWSER_TEST_F(BrowserGpuChannelHostFactoryTest, Basic) {
+// Fails since UI Compositor establishes a GpuChannel.
+IN_PROC_BROWSER_TEST_F(BrowserGpuChannelHostFactoryTest, DISABLED_Basic) {
DCHECK(!IsChannelEstablished());
EstablishAndWait();
EXPECT_TRUE(GetGpuChannel() != NULL);
}
-#endif
-// Fails on chromeos since Shell::PlatformInitialize instantiates
-// wm::WMTestHelper leading to the compositor establishing a GPU
-// channel.
-#if !defined(OS_CHROMEOS) && !defined(OS_WIN)
+// Fails since UI Compositor establishes a GpuChannel.
IN_PROC_BROWSER_TEST_F(BrowserGpuChannelHostFactoryTest,
- EstablishAndTerminate) {
+ DISABLED_EstablishAndTerminate) {
DCHECK(!IsChannelEstablished());
base::RunLoop run_loop;
GetFactory()->EstablishGpuChannel(kInitCause, run_loop.QuitClosure());
@@ -162,11 +151,11 @@ IN_PROC_BROWSER_TEST_F(BrowserGpuChannelHostFactoryTest,
// The callback should still trigger.
run_loop.Run();
}
-#endif
-#if !defined(OS_ANDROID) && !defined(OS_WIN)
+#if !defined(OS_ANDROID)
+// Fails since UI Compositor establishes a GpuChannel.
IN_PROC_BROWSER_TEST_F(BrowserGpuChannelHostFactoryTest,
- AlreadyEstablished) {
+ DISABLED_AlreadyEstablished) {
DCHECK(!IsChannelEstablished());
scoped_refptr<GpuChannelHost> gpu_channel =
GetFactory()->EstablishGpuChannelSync(kInitCause);
@@ -181,9 +170,9 @@ IN_PROC_BROWSER_TEST_F(BrowserGpuChannelHostFactoryTest,
}
#endif
-#if !defined(OS_WIN)
+// Fails since UI Compositor establishes a GpuChannel.
IN_PROC_BROWSER_TEST_F(BrowserGpuChannelHostFactoryTest,
- CrashAndRecover) {
+ DISABLED_CrashAndRecover) {
DCHECK(!IsChannelEstablished());
EstablishAndWait();
scoped_refptr<GpuChannelHost> host = GetGpuChannel();
@@ -208,6 +197,5 @@ IN_PROC_BROWSER_TEST_F(BrowserGpuChannelHostFactoryTest,
EstablishAndWait();
EXPECT_TRUE(IsChannelEstablished());
}
-#endif
} // namespace content
diff --git a/content/public/common/content_switches.cc b/content/public/common/content_switches.cc
index cf2a755..18b8884 100644
--- a/content/public/common/content_switches.cc
+++ b/content/public/common/content_switches.cc
@@ -131,9 +131,6 @@ const char kDisableGpu[] = "disable-gpu";
// Prevent the compositor from using its GPU implementation.
const char kDisableGpuCompositing[] = "disable-gpu-compositing";
-// Disable proactive early init of GPU process.
-const char kDisableGpuEarlyInit[] = "disable-gpu-early-init";
-
// Disable the limit on the number of times the GPU process may be restarted
// This switch is intended only for tests.
extern const char kDisableGpuProcessCrashLimit[] =
diff --git a/content/public/common/content_switches.h b/content/public/common/content_switches.h
index b7d1766..1449dbf 100644
--- a/content/public/common/content_switches.h
+++ b/content/public/common/content_switches.h
@@ -51,7 +51,6 @@ CONTENT_EXPORT extern const char kDisableFlash3d[];
CONTENT_EXPORT extern const char kDisableFlashStage3d[];
CONTENT_EXPORT extern const char kDisableGpu[];
CONTENT_EXPORT extern const char kDisableGpuCompositing[];
-CONTENT_EXPORT extern const char kDisableGpuEarlyInit[];
extern const char kDisableGpuProcessCrashLimit[];
CONTENT_EXPORT extern const char kDisableGpuRasterization[];
CONTENT_EXPORT extern const char kDisableGpuSandbox[];