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

Side by Side Diff: content/browser/gpu/gpu_process_host.cc

Issue 328823002: Don't fetch histograms from the same process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | content/browser/histogram_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/gpu/gpu_process_host.h" 5 #include "content/browser/gpu/gpu_process_host.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/base_switches.h" 8 #include "base/base_switches.h"
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 // GpuProcessHostUIShim will be destroyed if either the browser exits, 341 // GpuProcessHostUIShim will be destroyed if either the browser exits,
342 // in which case it calls GpuProcessHostUIShim::DestroyAll, or the 342 // in which case it calls GpuProcessHostUIShim::DestroyAll, or the
343 // GpuProcessHost is destroyed, which happens when the corresponding GPU 343 // GpuProcessHost is destroyed, which happens when the corresponding GPU
344 // process terminates or fails to launch. 344 // process terminates or fails to launch.
345 BrowserThread::PostTask( 345 BrowserThread::PostTask(
346 BrowserThread::UI, 346 BrowserThread::UI,
347 FROM_HERE, 347 FROM_HERE,
348 base::Bind(base::IgnoreResult(&GpuProcessHostUIShim::Create), host_id)); 348 base::Bind(base::IgnoreResult(&GpuProcessHostUIShim::Create), host_id));
349 349
350 process_.reset(new BrowserChildProcessHostImpl(PROCESS_TYPE_GPU, this)); 350 process_.reset(new BrowserChildProcessHostImpl(PROCESS_TYPE_GPU, this));
351 if (in_process_)
352 process_->SetHandle(base::GetCurrentProcessHandle());
piman 2014/06/11 19:46:35 Seems iffy... It will have side effects in other p
Alexei Svitkine (slow) 2014/06/11 19:52:28 I'm okay with that solution too. We can expand the
piman 2014/06/12 17:20:30 Yes... I think the BrowserChildProcessHost's handl
351 } 353 }
352 354
353 GpuProcessHost::~GpuProcessHost() { 355 GpuProcessHost::~GpuProcessHost() {
354 DCHECK(CalledOnValidThread()); 356 DCHECK(CalledOnValidThread());
355 357
356 SendOutstandingReplies(); 358 SendOutstandingReplies();
357 359
358 // Maximum number of times the gpu process is allowed to crash in a session. 360 // Maximum number of times the gpu process is allowed to crash in a session.
359 // Once this limit is reached, any request to launch the gpu process will 361 // Once this limit is reached, any request to launch the gpu process will
360 // fail. 362 // fail.
(...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after
1069 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); 1071 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader");
1070 ClientIdToShaderCacheMap::iterator iter = 1072 ClientIdToShaderCacheMap::iterator iter =
1071 client_id_to_shader_cache_.find(client_id); 1073 client_id_to_shader_cache_.find(client_id);
1072 // If the cache doesn't exist then this is an off the record profile. 1074 // If the cache doesn't exist then this is an off the record profile.
1073 if (iter == client_id_to_shader_cache_.end()) 1075 if (iter == client_id_to_shader_cache_.end())
1074 return; 1076 return;
1075 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); 1077 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader);
1076 } 1078 }
1077 1079
1078 } // namespace content 1080 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/histogram_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698