summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authormirandac@chromium.org <mirandac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-10 17:06:41 +0000
committermirandac@chromium.org <mirandac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-10 17:06:41 +0000
commita8de70105d1d2b64c4e60ec397528dd0d271ca33 (patch)
tree0bf799b4ecc21a9365235899d06fa7067fc1b81f /chrome
parent187eaa7886d5c8045889f32f363dc8820e0168d1 (diff)
downloadchromium_src-a8de70105d1d2b64c4e60ec397528dd0d271ca33.zip
chromium_src-a8de70105d1d2b64c4e60ec397528dd0d271ca33.tar.gz
chromium_src-a8de70105d1d2b64c4e60ec397528dd0d271ca33.tar.bz2
Revert 55510 - Prelaunch GPU process after 10 seconds.
This will happen if the --prelaunch-gpu-process command line switch is present or for 5% of users in a field trial. This is so we can collect some stats of GPU capabilities. TEST=try, check --prelaunch-gpu-process works BUG=none Review URL: http://codereview.chromium.org/3119002 TBR=apatrick@chromium.org Review URL: http://codereview.chromium.org/3162003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55570 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/renderer/render_thread.cc21
1 files changed, 4 insertions, 17 deletions
diff --git a/chrome/renderer/render_thread.cc b/chrome/renderer/render_thread.cc
index 1dee6ca..7ab9ae8 100644
--- a/chrome/renderer/render_thread.cc
+++ b/chrome/renderer/render_thread.cc
@@ -10,7 +10,6 @@
#include <vector>
#include "base/command_line.h"
-#include "base/field_trial.h"
#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/nullable_string16.h"
@@ -118,9 +117,6 @@ static const double kInitialIdleHandlerDelayS = 1.0 /* seconds */;
static const double kInitialExtensionIdleHandlerDelayS = 5.0 /* seconds */;
static const int64 kMaxExtensionIdleHandlerDelayS = 5*60 /* seconds */;
-static const int kPrelauchGpuPercentage = 5;
-static const int kPrelauchGpuProcessDelayMS = 10000;
-
// Keep the global RenderThread in a TLS slot so it is impossible to access
// incorrectly from the wrong thread.
static base::LazyInstance<base::ThreadLocalPointer<RenderThread> > lazy_tls(
@@ -273,19 +269,10 @@ void RenderThread::Init() {
// Establish a channel to the GPU process asynchronously if requested. If the
// channel is established in time, EstablishGpuChannelSync will not block when
- // it is later called. Delays by a fixed period of time to avoid loading the
- // GPU immediately in an attempt to not slow startup time.
- scoped_refptr<FieldTrial> prelaunch_trial(
- new FieldTrial("PrelaunchGpuProcessExperiment", 100));
- int prelaunch_group = prelaunch_trial->AppendGroup("prelaunch_gpu_process",
- kPrelauchGpuPercentage);
- if (prelaunch_group == prelaunch_trial->group() ||
- CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kPrelaunchGpuProcess)) {
- message_loop()->PostDelayedTask(FROM_HERE,
- task_factory_->NewRunnableMethod(
- &RenderThread::EstablishGpuChannel),
- kPrelauchGpuProcessDelayMS);
+ // it is later called.
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kPrelaunchGpuProcess)) {
+ EstablishGpuChannel();
}
GpuVideoServiceHost::get()->OnRendererThreadInit(MessageLoop::current());