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

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

Issue 2471853002: remove 'unsafe' from ES3 apis in gpu process (Closed)
Patch Set: forgot to save file Created 4 years, 1 month 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 | « content/browser/gpu/gpu_data_manager_impl_private.cc ('k') | gpu/command_buffer/service/feature_info.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 539758427695de011d2356b3860b9549633ffc1d..84938acfcbe9feeed43b2e35d9ead16c7894c97f 100644
--- a/gpu/command_buffer/service/context_group.cc
+++ b/gpu/command_buffer/service/context_group.cc
@@ -118,6 +118,13 @@ ContextGroup::ContextGroup(
bool ContextGroup::Initialize(GLES2Decoder* decoder,
ContextType context_type,
const DisallowedFeatures& disallowed_features) {
+ if (!gpu_preferences_.enable_unsafe_es3_apis &&
+ (context_type == CONTEXT_TYPE_OPENGLES3 ||
+ context_type == CONTEXT_TYPE_WEBGL2)) {
+ DLOG(ERROR) << "ContextGroup::Initialize failed because ES3 APIs are "
+ << "not available.";
+ return false;
+ }
if (HaveContexts()) {
if (context_type != feature_info_->context_type()) {
DLOG(ERROR) << "ContextGroup::Initialize failed because the type of "
« no previous file with comments | « content/browser/gpu/gpu_data_manager_impl_private.cc ('k') | gpu/command_buffer/service/feature_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698