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

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder.cc

Issue 1149233004: Android: Enable 'crash GPU process on context lost' WAR for Mali-400 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | gpu/config/gpu_driver_bug_list_json.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 "gpu/command_buffer/service/gles2_cmd_decoder.h" 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h"
6 6
7 #include <stdio.h> 7 #include <stdio.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <cmath> 10 #include <cmath>
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 #include "gpu/command_buffer/service/texture_manager.h" 60 #include "gpu/command_buffer/service/texture_manager.h"
61 #include "gpu/command_buffer/service/valuebuffer_manager.h" 61 #include "gpu/command_buffer/service/valuebuffer_manager.h"
62 #include "gpu/command_buffer/service/vertex_array_manager.h" 62 #include "gpu/command_buffer/service/vertex_array_manager.h"
63 #include "gpu/command_buffer/service/vertex_attrib_manager.h" 63 #include "gpu/command_buffer/service/vertex_attrib_manager.h"
64 #include "third_party/smhasher/src/City.h" 64 #include "third_party/smhasher/src/City.h"
65 #include "ui/gl/gl_fence.h" 65 #include "ui/gl/gl_fence.h"
66 #include "ui/gl/gl_image.h" 66 #include "ui/gl/gl_image.h"
67 #include "ui/gl/gl_implementation.h" 67 #include "ui/gl/gl_implementation.h"
68 #include "ui/gl/gl_surface.h" 68 #include "ui/gl/gl_surface.h"
69 69
70 #if defined (OS_ANDROID)
71 #include "base/sys_info.h"
72 #endif
73
70 #if defined(OS_MACOSX) 74 #if defined(OS_MACOSX)
71 #include <IOSurface/IOSurfaceAPI.h> 75 #include <IOSurface/IOSurfaceAPI.h>
72 // Note that this must be included after gl_bindings.h to avoid conflicts. 76 // Note that this must be included after gl_bindings.h to avoid conflicts.
73 #include <OpenGL/CGLIOSurface.h> 77 #include <OpenGL/CGLIOSurface.h>
74 #endif 78 #endif
75 79
76 #if defined(OS_WIN) 80 #if defined(OS_WIN)
77 #include "base/win/win_util.h" 81 #include "base/win/win_util.h"
78 #endif 82 #endif
79 83
(...skipping 11239 matching lines...) Expand 10 before | Expand all | Expand 10 after
11319 if (WasContextLost()) 11323 if (WasContextLost())
11320 return; 11324 return;
11321 11325
11322 // Don't make GL calls in here, the context might not be current. 11326 // Don't make GL calls in here, the context might not be current.
11323 context_lost_reason_ = reason; 11327 context_lost_reason_ = reason;
11324 current_decoder_error_ = error::kLostContext; 11328 current_decoder_error_ = error::kLostContext;
11325 context_was_lost_ = true; 11329 context_was_lost_ = true;
11326 11330
11327 // Some D3D drivers cannot recover from device lost in the GPU process 11331 // Some D3D drivers cannot recover from device lost in the GPU process
11328 // sandbox. Allow a new GPU process to launch. 11332 // sandbox. Allow a new GPU process to launch.
11329 if (workarounds().exit_on_context_lost) { 11333 if (workarounds().exit_on_context_lost
11334 #if defined(OS_ANDROID)
11335 // Don't crash the browser.
11336 && !base::SysInfo::IsLowEndDevice()
11337 #endif
11338 ) {
11330 LOG(ERROR) << "Exiting GPU process because some drivers cannot reset" 11339 LOG(ERROR) << "Exiting GPU process because some drivers cannot reset"
Zhenyao Mo 2015/06/04 00:58:13 The log message and the above comment are all abou
11331 << " a D3D device in the Chrome GPU process sandbox."; 11340 << " a D3D device in the Chrome GPU process sandbox.";
11332 #if defined(OS_WIN) 11341 #if defined(OS_WIN)
11333 base::win::SetShouldCrashOnProcessDetach(false); 11342 base::win::SetShouldCrashOnProcessDetach(false);
11334 #endif 11343 #endif
11335 exit(0); 11344 exit(0);
11336 } 11345 }
11337 } 11346 }
11338 11347
11339 bool GLES2DecoderImpl::CheckResetStatus() { 11348 bool GLES2DecoderImpl::CheckResetStatus() {
11340 DCHECK(!WasContextLost()); 11349 DCHECK(!WasContextLost());
(...skipping 1969 matching lines...) Expand 10 before | Expand all | Expand 10 after
13310 } 13319 }
13311 } 13320 }
13312 13321
13313 // Include the auto-generated part of this file. We split this because it means 13322 // Include the auto-generated part of this file. We split this because it means
13314 // we can easily edit the non-auto generated parts right here in this file 13323 // we can easily edit the non-auto generated parts right here in this file
13315 // instead of having to edit some template or the code generator. 13324 // instead of having to edit some template or the code generator.
13316 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" 13325 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h"
13317 13326
13318 } // namespace gles2 13327 } // namespace gles2
13319 } // namespace gpu 13328 } // namespace gpu
OLDNEW
« no previous file with comments | « no previous file | gpu/config/gpu_driver_bug_list_json.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698