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

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

Issue 2076213002: Decompress ETC texture data when there is no native support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Check MapBuffer result. Created 4 years, 5 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
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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 blend_equation_advanced(false), 130 blend_equation_advanced(false),
131 blend_equation_advanced_coherent(false), 131 blend_equation_advanced_coherent(false),
132 ext_texture_rg(false), 132 ext_texture_rg(false),
133 chromium_image_ycbcr_420v(false), 133 chromium_image_ycbcr_420v(false),
134 chromium_image_ycbcr_422(false), 134 chromium_image_ycbcr_422(false),
135 emulate_primitive_restart_fixed_index(false), 135 emulate_primitive_restart_fixed_index(false),
136 ext_render_buffer_format_bgra8888(false), 136 ext_render_buffer_format_bgra8888(false),
137 ext_multisample_compatibility(false), 137 ext_multisample_compatibility(false),
138 ext_blend_func_extended(false), 138 ext_blend_func_extended(false),
139 ext_read_format_bgra(false), 139 ext_read_format_bgra(false),
140 desktop_srgb_support(false) {} 140 desktop_srgb_support(false),
141 arb_es3_compatibility(false) {}
141 142
142 FeatureInfo::FeatureInfo() { 143 FeatureInfo::FeatureInfo() {
143 InitializeBasicState(base::CommandLine::InitializedForCurrentProcess() 144 InitializeBasicState(base::CommandLine::InitializedForCurrentProcess()
144 ? base::CommandLine::ForCurrentProcess() 145 ? base::CommandLine::ForCurrentProcess()
145 : nullptr); 146 : nullptr);
146 } 147 }
147 148
148 FeatureInfo::FeatureInfo( 149 FeatureInfo::FeatureInfo(
149 const GpuDriverBugWorkarounds& gpu_driver_bug_workarounds) 150 const GpuDriverBugWorkarounds& gpu_driver_bug_workarounds)
150 : workarounds_(gpu_driver_bug_workarounds) { 151 : workarounds_(gpu_driver_bug_workarounds) {
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 bool enable_read_format_bgra = 638 bool enable_read_format_bgra =
638 extensions.Contains("GL_EXT_read_format_bgra") || 639 extensions.Contains("GL_EXT_read_format_bgra") ||
639 !gl_version_info_->is_es; 640 !gl_version_info_->is_es;
640 641
641 if (enable_read_format_bgra) { 642 if (enable_read_format_bgra) {
642 feature_flags_.ext_read_format_bgra = true; 643 feature_flags_.ext_read_format_bgra = true;
643 AddExtensionString("GL_EXT_read_format_bgra"); 644 AddExtensionString("GL_EXT_read_format_bgra");
644 validators_.read_pixel_format.AddValue(GL_BGRA_EXT); 645 validators_.read_pixel_format.AddValue(GL_BGRA_EXT);
645 } 646 }
646 647
648 // GL_ARB_ES3_compatibility adds support for some ES3 texture formats that are
649 // not supported in desktop GL
650 feature_flags_.arb_es3_compatibility =
651 extensions.Contains("GL_ARB_ES3_compatibility") &&
652 !gl_version_info_->is_es;
653
647 // glGetInteger64v for timestamps is implemented on the client side in a way 654 // glGetInteger64v for timestamps is implemented on the client side in a way
648 // that it does not depend on a driver-level implementation of 655 // that it does not depend on a driver-level implementation of
649 // glGetInteger64v. The GPUTimer class which implements timer queries can also 656 // glGetInteger64v. The GPUTimer class which implements timer queries can also
650 // fallback to an implementation that does not depend on glGetInteger64v on 657 // fallback to an implementation that does not depend on glGetInteger64v on
651 // ES2. Thus we can enable GL_EXT_disjoint_timer_query on ES2 contexts even 658 // ES2. Thus we can enable GL_EXT_disjoint_timer_query on ES2 contexts even
652 // though it does not support glGetInteger64v due to a specification bug. 659 // though it does not support glGetInteger64v due to a specification bug.
653 if (extensions.Contains("GL_EXT_disjoint_timer_query") || 660 if (extensions.Contains("GL_EXT_disjoint_timer_query") ||
654 extensions.Contains("GL_ARB_timer_query") || 661 extensions.Contains("GL_ARB_timer_query") ||
655 extensions.Contains("GL_EXT_timer_query")) { 662 extensions.Contains("GL_EXT_timer_query")) {
656 AddExtensionString("GL_EXT_disjoint_timer_query"); 663 AddExtensionString("GL_EXT_disjoint_timer_query");
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after
1417 if (pos == std::string::npos) { 1424 if (pos == std::string::npos) {
1418 extensions_ += (extensions_.empty() ? "" : " ") + str; 1425 extensions_ += (extensions_.empty() ? "" : " ") + str;
1419 } 1426 }
1420 } 1427 }
1421 1428
1422 FeatureInfo::~FeatureInfo() { 1429 FeatureInfo::~FeatureInfo() {
1423 } 1430 }
1424 1431
1425 } // namespace gles2 1432 } // namespace gles2
1426 } // namespace gpu 1433 } // 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