| 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/context_group.h" | 5 #include "gpu/command_buffer/service/context_group.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "gpu/command_buffer/common/id_allocator.h" | 10 #include "gpu/command_buffer/common/id_allocator.h" |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 // Limit Intel on Mac to 512. | 102 // Limit Intel on Mac to 512. |
| 103 // TODO(gman): Update this code to check for a specific version of | 103 // TODO(gman): Update this code to check for a specific version of |
| 104 // the drivers above which we no longer need this fix. | 104 // the drivers above which we no longer need this fix. |
| 105 #if defined(OS_MACOSX) | 105 #if defined(OS_MACOSX) |
| 106 const char* vendor_str = reinterpret_cast<const char*>( | 106 const char* vendor_str = reinterpret_cast<const char*>( |
| 107 glGetString(GL_VENDOR)); | 107 glGetString(GL_VENDOR)); |
| 108 if (vendor_str) { | 108 if (vendor_str) { |
| 109 std::string lc_str(::StringToLowerASCII(std::string(vendor_str))); | 109 std::string lc_str(::StringToLowerASCII(std::string(vendor_str))); |
| 110 bool intel_on_mac = strstr(lc_str.c_str(), "intel"); | 110 bool intel_on_mac = strstr(lc_str.c_str(), "intel"); |
| 111 if (intel_on_mac) { | 111 if (intel_on_mac) { |
| 112 max_texture_size = std::min( |
| 113 static_cast<GLint>(4096), max_texture_size); |
| 112 max_cube_map_texture_size = std::min( | 114 max_cube_map_texture_size = std::min( |
| 113 static_cast<GLint>(512), max_cube_map_texture_size); | 115 static_cast<GLint>(512), max_cube_map_texture_size); |
| 114 } | 116 } |
| 115 } | 117 } |
| 116 #endif | 118 #endif |
| 117 | 119 |
| 118 texture_manager_.reset(new TextureManager(feature_info_.get(), | 120 texture_manager_.reset(new TextureManager(feature_info_.get(), |
| 119 max_texture_size, | 121 max_texture_size, |
| 120 max_cube_map_texture_size)); | 122 max_cube_map_texture_size)); |
| 121 | 123 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 if (namespace_id >= arraysize(id_namespaces_)) | 190 if (namespace_id >= arraysize(id_namespaces_)) |
| 189 return NULL; | 191 return NULL; |
| 190 | 192 |
| 191 return id_namespaces_[namespace_id].get(); | 193 return id_namespaces_[namespace_id].get(); |
| 192 } | 194 } |
| 193 | 195 |
| 194 } // namespace gles2 | 196 } // namespace gles2 |
| 195 } // namespace gpu | 197 } // namespace gpu |
| 196 | 198 |
| 197 | 199 |
| OLD | NEW |