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

Unified Diff: gpu/command_buffer/service/feature_info.cc

Issue 2639293002: gpu: Add ARB_occlusion_query support. (Closed)
Patch Set: add unit test Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/feature_info.cc
diff --git a/gpu/command_buffer/service/feature_info.cc b/gpu/command_buffer/service/feature_info.cc
index 45062e16dc8d43531a6d3be0da9c39860fd0e2e7..ff83e018b3293f0ca74c4fddbfdd39d9c0fc691c 100644
--- a/gpu/command_buffer/service/feature_info.cc
+++ b/gpu/command_buffer/service/feature_info.cc
@@ -129,6 +129,7 @@ FeatureInfo::FeatureFlags::FeatureFlags()
angle_pack_reverse_row_order(false),
arb_texture_rectangle(false),
angle_instanced_arrays(false),
+ occlusion_query(false),
occlusion_query_boolean(false),
use_arb_occlusion_query2_for_occlusion_query_boolean(false),
use_arb_occlusion_query_for_occlusion_query_boolean(false),
@@ -1173,12 +1174,15 @@ void FeatureInfo::InitializeFeatures() {
bool have_arb_occlusion_query2 =
extensions.Contains("GL_ARB_occlusion_query2");
bool have_arb_occlusion_query =
+ (gl_version_info_->is_desktop_core_profile &&
+ gl_version_info_->IsAtLeastGL(1, 5)) ||
extensions.Contains("GL_ARB_occlusion_query");
if (have_occlusion_query ||
have_ext_occlusion_query_boolean ||
have_arb_occlusion_query2 ||
have_arb_occlusion_query) {
+ feature_flags_.occlusion_query = have_arb_occlusion_query;
if (context_type_ == CONTEXT_TYPE_OPENGLES2) {
AddExtensionString("GL_EXT_occlusion_query_boolean");
}
« 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