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

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

Issue 2471853002: remove 'unsafe' from ES3 apis in gpu process (Closed)
Patch Set: update 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..0e0c27c5efc433637b4f10f1c87038a4d6b1a531 100644
--- a/gpu/command_buffer/service/context_group.cc
+++ b/gpu/command_buffer/service/context_group.cc
@@ -118,6 +118,16 @@ ContextGroup::ContextGroup(
bool ContextGroup::Initialize(GLES2Decoder* decoder,
ContextType context_type,
const DisallowedFeatures& disallowed_features) {
+ if (!gpu_preferences_.enable_unsafe_es3_apis) {
+ if (context_type == CONTEXT_TYPE_OPENGLES3) {
+ context_type = CONTEXT_TYPE_OPENGLES2;
Zhenyao Mo 2016/11/02 22:49:57 You should print out a DLOG as the WEBGL2 case. No
+ return false;
+ } else if (context_type == CONTEXT_TYPE_WEBGL2) {
+ DLOG(ERROR) << "ContextGroup::Initialize failed because WebGL 2 is 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