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

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

Issue 2678483003: Fix EXT_draw_buffers detection on some GL ES 3 contexts (Closed)
Patch Set: update tests Created 3 years, 10 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
Index: gpu/command_buffer/service/context_group.cc
diff --git a/gpu/command_buffer/service/context_group.cc b/gpu/command_buffer/service/context_group.cc
index 06c1882b467a2124c25ad5a7354c44a6bd8acf4f..3bb365ad1496b55ef0beca28e552d325443874be 100644
--- a/gpu/command_buffer/service/context_group.cc
+++ b/gpu/command_buffer/service/context_group.cc
@@ -120,9 +120,9 @@ ContextGroup::ContextGroup(
bool ContextGroup::Initialize(GLES2Decoder* decoder,
ContextType context_type,
const DisallowedFeatures& disallowed_features) {
- if (!gpu_preferences_.enable_es3_apis &&
- (context_type == CONTEXT_TYPE_OPENGLES3 ||
- context_type == CONTEXT_TYPE_WEBGL2)) {
+ bool enable_es3 = context_type == CONTEXT_TYPE_OPENGLES3 ||
+ context_type == CONTEXT_TYPE_WEBGL2;
+ if (!gpu_preferences_.enable_es3_apis && enable_es3) {
DLOG(ERROR) << "ContextGroup::Initialize failed because ES3 APIs are "
<< "not available.";
return false;
@@ -170,7 +170,7 @@ bool ContextGroup::Initialize(GLES2Decoder* decoder,
}
}
- if (feature_info_->feature_flags().ext_draw_buffers) {
+ if (enable_es3 || feature_info_->feature_flags().ext_draw_buffers) {
GetIntegerv(GL_MAX_COLOR_ATTACHMENTS_EXT, &max_color_attachments_);
if (max_color_attachments_ < 1)
max_color_attachments_ = 1;
« no previous file with comments | « no previous file | gpu/command_buffer/service/feature_info.cc » ('j') | gpu/command_buffer/service/feature_info.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698