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

Unified Diff: content/gpu/gpu_child_thread.cc

Issue 194303002: Blacklist GLX indirect rendering (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix android Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/gpu/gpu_messages.h ('k') | content/gpu/gpu_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/gpu/gpu_child_thread.cc
diff --git a/content/gpu/gpu_child_thread.cc b/content/gpu/gpu_child_thread.cc
index 8f67d68bad63a63e5e19792160068422ef43e152..4607c6c1267176d01c5c8ecfa34b81239eaafc9f 100644
--- a/content/gpu/gpu_child_thread.cc
+++ b/content/gpu/gpu_child_thread.cc
@@ -119,6 +119,9 @@ bool GpuChildThread::OnControlMessageReceived(const IPC::Message& msg) {
}
void GpuChildThread::OnInitialize() {
+ // Record initialization only after collecting the GPU info because that can
+ // take a significant amount of time.
+ gpu_info_.initialization_time = base::Time::Now() - process_start_time_;
Send(new GpuHostMsg_Initialized(!dead_on_arrival_, gpu_info_));
while (!deferred_messages_.empty()) {
Send(deferred_messages_.front());
@@ -142,10 +145,6 @@ void GpuChildThread::OnInitialize() {
if (!in_browser_process_)
logging::SetLogMessageHandler(GpuProcessLogMessageHandler);
- // Record initialization only after collecting the GPU info because that can
- // take a significant amount of time.
- gpu_info_.initialization_time = base::Time::Now() - process_start_time_;
-
// Defer creation of the render thread. This is to prevent it from handling
// IPC messages before the sandbox has been enabled and all other necessary
// initialization has succeeded.
@@ -154,11 +153,6 @@ void GpuChildThread::OnInitialize() {
watchdog_thread_.get(),
ChildProcess::current()->io_message_loop_proxy(),
ChildProcess::current()->GetShutDownEvent()));
-
- // Ensure the browser process receives the GPU info before a reply to any
- // subsequent IPC it might send.
- if (!in_browser_process_)
- Send(new GpuHostMsg_GraphicsInfoCollected(gpu_info_));
}
void GpuChildThread::StopWatchdog() {
@@ -176,8 +170,19 @@ void GpuChildThread::OnCollectGraphicsInfo() {
in_browser_process_);
#endif // OS_WIN
- if (!gpu::CollectContextGraphicsInfo(&gpu_info_))
- VLOG(1) << "gpu::CollectGraphicsInfo failed";
+ gpu::CollectInfoResult result =
+ gpu::CollectContextGraphicsInfo(&gpu_info_);
+ switch (result) {
+ case gpu::kCollectInfoFatalFailure:
+ LOG(ERROR) << "gpu::CollectGraphicsInfo failed (fatal).";
+ // TODO(piman): can we signal overall failure?
+ break;
+ case gpu::kCollectInfoNonFatalFailure:
+ VLOG(1) << "gpu::CollectGraphicsInfo failed (non-fatal).";
+ break;
+ case gpu::kCollectInfoSuccess:
+ break;
+ }
GetContentClient()->SetGpuInfo(gpu_info_);
#if defined(OS_WIN)
« no previous file with comments | « content/common/gpu/gpu_messages.h ('k') | content/gpu/gpu_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698