OLD | NEW |
---|---|
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 Loading... | |
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 Loading... | |
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 Loading... | |
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 |
OLD | NEW |