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

Side by Side Diff: chrome/renderer/ggl/ggl.cc

Issue 6384003: Gpu process restart fix. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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
« no previous file with comments | « no previous file | chrome/renderer/gpu_channel_host.h » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #include "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "base/ref_counted.h" 8 #include "base/ref_counted.h"
9 #include "base/weak_ptr.h" 9 #include "base/weak_ptr.h"
10 #include "chrome/renderer/command_buffer_proxy.h" 10 #include "chrome/renderer/command_buffer_proxy.h"
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 return CONTEXT_LOST; 405 return CONTEXT_LOST;
406 } 406 }
407 } 407 }
408 408
409 void Context::SetError(Error error) { 409 void Context::SetError(Error error) {
410 last_error_ = error; 410 last_error_ = error;
411 } 411 }
412 412
413 bool Context::IsCommandBufferContextLost() { 413 bool Context::IsCommandBufferContextLost() {
414 gpu::CommandBuffer::State state = command_buffer_->GetLastState(); 414 gpu::CommandBuffer::State state = command_buffer_->GetLastState();
415 return state.error == gpu::error::kLostContext; 415 if (state.error == gpu::error::kLostContext) {
416 // Tell the host that the connection was lost right away.
417 channel_->SetStateLost();
418 return true;
419 }
420 return false;
416 } 421 }
417 422
418 // TODO(gman): Remove This 423 // TODO(gman): Remove This
419 void Context::DisableShaderTranslation() { 424 void Context::DisableShaderTranslation() {
420 gles2_implementation_->CommandBufferEnableCHROMIUM( 425 gles2_implementation_->CommandBufferEnableCHROMIUM(
421 PEPPER3D_SKIP_GLSL_TRANSLATION); 426 PEPPER3D_SKIP_GLSL_TRANSLATION);
422 } 427 }
423 428
424 void Context::OnSwapBuffers() { 429 void Context::OnSwapBuffers() {
425 if (swap_buffers_callback_.get()) 430 if (swap_buffers_callback_.get())
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 } 571 }
567 572
568 gpu::gles2::GLES2Implementation* GetImplementation(Context* context) { 573 gpu::gles2::GLES2Implementation* GetImplementation(Context* context) {
569 if (!context) 574 if (!context)
570 return NULL; 575 return NULL;
571 576
572 return context->gles2_implementation(); 577 return context->gles2_implementation();
573 } 578 }
574 579
575 } // namespace ggl 580 } // namespace ggl
OLDNEW
« no previous file with comments | « no previous file | chrome/renderer/gpu_channel_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698