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

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

Issue 12617020: Windows: On context lost, GPU process exits. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 8 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 "gpu/command_buffer/service/feature_info.h" 5 #include "gpu/command_buffer/service/feature_info.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 : clear_alpha_in_readpixels(false), 90 : clear_alpha_in_readpixels(false),
91 needs_glsl_built_in_function_emulation(false), 91 needs_glsl_built_in_function_emulation(false),
92 needs_offscreen_buffer_workaround(false), 92 needs_offscreen_buffer_workaround(false),
93 reverse_point_sprite_coord_origin(false), 93 reverse_point_sprite_coord_origin(false),
94 set_texture_filter_before_generating_mipmap(false), 94 set_texture_filter_before_generating_mipmap(false),
95 use_current_program_after_successful_link(false), 95 use_current_program_after_successful_link(false),
96 restore_scissor_on_fbo_change(false), 96 restore_scissor_on_fbo_change(false),
97 flush_on_context_switch(false), 97 flush_on_context_switch(false),
98 delete_instead_of_resize_fbo(false), 98 delete_instead_of_resize_fbo(false),
99 use_client_side_arrays_for_stream_buffers(false), 99 use_client_side_arrays_for_stream_buffers(false),
100 exit_on_context_lost(false),
100 max_texture_size(0), 101 max_texture_size(0),
101 max_cube_map_texture_size(0) { 102 max_cube_map_texture_size(0) {
102 } 103 }
103 104
104 FeatureInfo::FeatureInfo() { 105 FeatureInfo::FeatureInfo() {
105 static const GLenum kAlphaTypes[] = { 106 static const GLenum kAlphaTypes[] = {
106 GL_UNSIGNED_BYTE, 107 GL_UNSIGNED_BYTE,
107 }; 108 };
108 static const GLenum kRGBTypes[] = { 109 static const GLenum kRGBTypes[] = {
109 GL_UNSIGNED_BYTE, 110 GL_UNSIGNED_BYTE,
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 if (str) { 695 if (str) {
695 std::string lstr(StringToLowerASCII(std::string(str))); 696 std::string lstr(StringToLowerASCII(std::string(str)));
696 is_es3 = (lstr.substr(0, 12) == "opengl es 3."); 697 is_es3 = (lstr.substr(0, 12) == "opengl es 3.");
697 } 698 }
698 699
699 if (is_es3 || extensions.Contains("GL_ARB_sampler_objects")) { 700 if (is_es3 || extensions.Contains("GL_ARB_sampler_objects")) {
700 feature_flags_.enable_samplers = true; 701 feature_flags_.enable_samplers = true;
701 // TODO(dsinclair): Add AddExtensionString("GL_CHROMIUM_sampler_objects") 702 // TODO(dsinclair): Add AddExtensionString("GL_CHROMIUM_sampler_objects")
702 // when available. 703 // when available.
703 } 704 }
705
706 #if defined(OS_WIN)
707 // Some drivers are unable to reset the D3D device in the GPU process
708 // sandbox.
709 workarounds_.exit_on_context_lost = true;
710 #endif
704 } 711 }
705 712
706 void FeatureInfo::AddExtensionString(const std::string& str) { 713 void FeatureInfo::AddExtensionString(const std::string& str) {
707 if (extensions_.find(str) == std::string::npos) { 714 if (extensions_.find(str) == std::string::npos) {
708 extensions_ += (extensions_.empty() ? "" : " ") + str; 715 extensions_ += (extensions_.empty() ? "" : " ") + str;
709 } 716 }
710 } 717 }
711 718
712 FeatureInfo::~FeatureInfo() { 719 FeatureInfo::~FeatureInfo() {
713 } 720 }
714 721
715 } // namespace gles2 722 } // namespace gles2
716 } // namespace gpu 723 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/feature_info.h ('k') | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698