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

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

Issue 8510032: Add tests to make sure gpu blacklist actually block gpu features. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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 | « chrome/test/gpu/gpu_feature_browsertest.cc ('k') | no next file » | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 460
461 bool GpuProcessHost::CanShutdown() { 461 bool GpuProcessHost::CanShutdown() {
462 return true; 462 return true;
463 } 463 }
464 464
465 void GpuProcessHost::OnProcessLaunched() { 465 void GpuProcessHost::OnProcessLaunched() {
466 // Send the GPU process handle to the UI thread before it has to 466 // Send the GPU process handle to the UI thread before it has to
467 // respond to any requests to establish a GPU channel. The response 467 // respond to any requests to establish a GPU channel. The response
468 // to such requests require that the GPU process handle be known. 468 // to such requests require that the GPU process handle be known.
469 469
470 TRACE_EVENT0("test_gpu", "GpuProcessLaunched");
471
470 base::ProcessHandle child_handle = in_process_ ? 472 base::ProcessHandle child_handle = in_process_ ?
471 base::GetCurrentProcessHandle() : handle(); 473 base::GetCurrentProcessHandle() : handle();
472 474
473 #if defined(OS_WIN) 475 #if defined(OS_WIN)
474 DuplicateHandle(base::GetCurrentProcessHandle(), 476 DuplicateHandle(base::GetCurrentProcessHandle(),
475 child_handle, 477 child_handle,
476 base::GetCurrentProcessHandle(), 478 base::GetCurrentProcessHandle(),
477 &gpu_process_, 479 &gpu_process_,
478 PROCESS_DUP_HANDLE, 480 PROCESS_DUP_HANDLE,
479 FALSE, 481 FALSE,
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 scoped_ptr<EstablishChannelCallback> wrapped_callback(callback); 614 scoped_ptr<EstablishChannelCallback> wrapped_callback(callback);
613 wrapped_callback->Run(channel_handle, renderer_process_for_gpu, gpu_info); 615 wrapped_callback->Run(channel_handle, renderer_process_for_gpu, gpu_info);
614 } 616 }
615 617
616 void GpuProcessHost::CreateCommandBufferError( 618 void GpuProcessHost::CreateCommandBufferError(
617 CreateCommandBufferCallback* callback, int32 route_id) { 619 CreateCommandBufferCallback* callback, int32 route_id) {
618 scoped_ptr<GpuProcessHost::CreateCommandBufferCallback> 620 scoped_ptr<GpuProcessHost::CreateCommandBufferCallback>
619 wrapped_callback(callback); 621 wrapped_callback(callback);
620 callback->Run(route_id); 622 callback->Run(route_id);
621 } 623 }
OLDNEW
« no previous file with comments | « chrome/test/gpu/gpu_feature_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698