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

Side by Side Diff: content/common/gpu/gpu_command_buffer_stub.cc

Issue 12038095: Android webview fix gpu crashes after destroy (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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
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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/bind_helpers.h" 6 #include "base/bind_helpers.h"
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/hash.h" 9 #include "base/hash.h"
10 #include "base/shared_memory.h" 10 #include "base/shared_memory.h"
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 DCHECK(context->GetHandle()); 419 DCHECK(context->GetHandle());
420 context = new gpu::GLContextVirtual(channel_->share_group(), 420 context = new gpu::GLContextVirtual(channel_->share_group(),
421 context, 421 context,
422 decoder_->AsWeakPtr()); 422 decoder_->AsWeakPtr());
423 if (!context->Initialize(surface_, gpu_preference_)) { 423 if (!context->Initialize(surface_, gpu_preference_)) {
424 // TODO(sievers): The real context created above for the default 424 // TODO(sievers): The real context created above for the default
425 // offscreen surface might not be compatible with this surface. 425 // offscreen surface might not be compatible with this surface.
426 // Need to adjust at least GLX to be able to create the initial context 426 // Need to adjust at least GLX to be able to create the initial context
427 // with a config that is compatible with onscreen and offscreen surfaces. 427 // with a config that is compatible with onscreen and offscreen surfaces.
428 context = NULL; 428 context = NULL;
429 LOG(FATAL) << "Failed to initialize virtual GL context."; 429 LOG(ERROR) << "Failed to initialize virtual GL context.";
no sievers 2013/01/25 20:24:41 I don't really like removing the LOG(FATAL). I thi
boliu 2013/01/25 21:27:02 I didn't understand much of this, but sounds like
430 } else { 430 } else {
431 LOG(INFO) << "Created virtual GL context."; 431 LOG(INFO) << "Created virtual GL context.";
432 } 432 }
433 } 433 }
434 if (!context) { 434 if (!context) {
435 context = gfx::GLContext::CreateGLContext( 435 context = gfx::GLContext::CreateGLContext(
436 channel_->share_group(), 436 channel_->share_group(),
437 surface_.get(), 437 surface_.get(),
438 gpu_preference_); 438 gpu_preference_);
439 } 439 }
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
881 if (surface_ && MakeCurrent()) 881 if (surface_ && MakeCurrent())
882 surface_->SetFrontbufferAllocation( 882 surface_->SetFrontbufferAllocation(
883 allocation.browser_allocation.suggest_have_frontbuffer); 883 allocation.browser_allocation.suggest_have_frontbuffer);
884 } 884 }
885 885
886 last_memory_allocation_valid_ = true; 886 last_memory_allocation_valid_ = true;
887 last_memory_allocation_ = allocation; 887 last_memory_allocation_ = allocation;
888 } 888 }
889 889
890 } // namespace content 890 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698