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/feature_info.h" | 5 #include "gpu/command_buffer/service/feature_info.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
13 #include "base/metrics/histogram_macros.h" | 13 #include "base/metrics/histogram_macros.h" |
14 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
15 #include "base/strings/string_split.h" | 15 #include "base/strings/string_split.h" |
16 #include "gpu/command_buffer/service/gpu_switches.h" | 16 #include "gpu/command_buffer/service/gpu_switches.h" |
17 #include "gpu/command_buffer/service/texture_definition.h" | 17 #include "gpu/command_buffer/service/texture_definition.h" |
18 #include "gpu/config/gpu_switches.h" | 18 #include "gpu/config/gpu_switches.h" |
19 #include "ui/gl/gl_bindings.h" | 19 #include "ui/gl/gl_bindings.h" |
| 20 #include "ui/gl/gl_driver_workarounds.h" |
20 #include "ui/gl/gl_fence.h" | 21 #include "ui/gl/gl_fence.h" |
21 #include "ui/gl/gl_implementation.h" | 22 #include "ui/gl/gl_implementation.h" |
22 #include "ui/gl/gl_switches.h" | 23 #include "ui/gl/gl_switches.h" |
23 #include "ui/gl/gl_version_info.h" | 24 #include "ui/gl/gl_version_info.h" |
24 | 25 |
25 #if !defined(OS_MACOSX) | 26 #if !defined(OS_MACOSX) |
26 #include "ui/gl/gl_fence_egl.h" | 27 #include "ui/gl/gl_fence_egl.h" |
27 #endif | 28 #endif |
28 | 29 |
29 namespace gpu { | 30 namespace gpu { |
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
550 | 551 |
551 // Check if we should enable GL_EXT_texture_filter_anisotropic. | 552 // Check if we should enable GL_EXT_texture_filter_anisotropic. |
552 if (extensions.Contains("GL_EXT_texture_filter_anisotropic")) { | 553 if (extensions.Contains("GL_EXT_texture_filter_anisotropic")) { |
553 AddExtensionString("GL_EXT_texture_filter_anisotropic"); | 554 AddExtensionString("GL_EXT_texture_filter_anisotropic"); |
554 validators_.texture_parameter.AddValue( | 555 validators_.texture_parameter.AddValue( |
555 GL_TEXTURE_MAX_ANISOTROPY_EXT); | 556 GL_TEXTURE_MAX_ANISOTROPY_EXT); |
556 validators_.g_l_state.AddValue( | 557 validators_.g_l_state.AddValue( |
557 GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT); | 558 GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT); |
558 } | 559 } |
559 | 560 |
| 561 if (workarounds_.clear_to_boundary_values_is_broken) |
| 562 gl::workarounds::clearToBoundaryValuesIsBroken = true; |
| 563 |
560 // Check if we should support GL_OES_packed_depth_stencil and/or | 564 // Check if we should support GL_OES_packed_depth_stencil and/or |
561 // GL_GOOGLE_depth_texture / GL_CHROMIUM_depth_texture. | 565 // GL_GOOGLE_depth_texture / GL_CHROMIUM_depth_texture. |
562 // | 566 // |
563 // NOTE: GL_OES_depth_texture requires support for depth cubemaps. | 567 // NOTE: GL_OES_depth_texture requires support for depth cubemaps. |
564 // GL_ARB_depth_texture requires other features that | 568 // GL_ARB_depth_texture requires other features that |
565 // GL_OES_packed_depth_stencil does not provide. | 569 // GL_OES_packed_depth_stencil does not provide. |
566 // | 570 // |
567 // Therefore we made up GL_GOOGLE_depth_texture / GL_CHROMIUM_depth_texture. | 571 // Therefore we made up GL_GOOGLE_depth_texture / GL_CHROMIUM_depth_texture. |
568 // | 572 // |
569 // GL_GOOGLE_depth_texture is legacy. As we exposed it into NaCl we can't | 573 // GL_GOOGLE_depth_texture is legacy. As we exposed it into NaCl we can't |
(...skipping 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1740 if (pos == std::string::npos) { | 1744 if (pos == std::string::npos) { |
1741 extensions_ += (extensions_.empty() ? "" : " ") + str; | 1745 extensions_ += (extensions_.empty() ? "" : " ") + str; |
1742 } | 1746 } |
1743 } | 1747 } |
1744 | 1748 |
1745 FeatureInfo::~FeatureInfo() { | 1749 FeatureInfo::~FeatureInfo() { |
1746 } | 1750 } |
1747 | 1751 |
1748 } // namespace gles2 | 1752 } // namespace gles2 |
1749 } // namespace gpu | 1753 } // namespace gpu |
OLD | NEW |