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

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

Issue 2474253002: Rename GpuPreferences::enable_unsafe_es3_apis to enable_es3_apis (Closed)
Patch Set: rebase 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 unified diff | Download patch
« no previous file with comments | « content/common/gpu_host_messages.h ('k') | gpu/command_buffer/service/gpu_preferences.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/context_group.h" 5 #include "gpu/command_buffer/service/context_group.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 DCHECK(feature_info_); 111 DCHECK(feature_info_);
112 if (!mailbox_manager_.get()) 112 if (!mailbox_manager_.get())
113 mailbox_manager_ = new MailboxManagerImpl; 113 mailbox_manager_ = new MailboxManagerImpl;
114 transfer_buffer_manager_ = new TransferBufferManager(memory_tracker_.get()); 114 transfer_buffer_manager_ = new TransferBufferManager(memory_tracker_.get());
115 } 115 }
116 } 116 }
117 117
118 bool ContextGroup::Initialize(GLES2Decoder* decoder, 118 bool ContextGroup::Initialize(GLES2Decoder* decoder,
119 ContextType context_type, 119 ContextType context_type,
120 const DisallowedFeatures& disallowed_features) { 120 const DisallowedFeatures& disallowed_features) {
121 if (!gpu_preferences_.enable_unsafe_es3_apis && 121 if (!gpu_preferences_.enable_es3_apis &&
122 (context_type == CONTEXT_TYPE_OPENGLES3 || 122 (context_type == CONTEXT_TYPE_OPENGLES3 ||
123 context_type == CONTEXT_TYPE_WEBGL2)) { 123 context_type == CONTEXT_TYPE_WEBGL2)) {
124 DLOG(ERROR) << "ContextGroup::Initialize failed because ES3 APIs are " 124 DLOG(ERROR) << "ContextGroup::Initialize failed because ES3 APIs are "
125 << "not available."; 125 << "not available.";
126 return false; 126 return false;
127 } 127 }
128 if (HaveContexts()) { 128 if (HaveContexts()) {
129 if (context_type != feature_info_->context_type()) { 129 if (context_type != feature_info_->context_type()) {
130 DLOG(ERROR) << "ContextGroup::Initialize failed because the type of " 130 DLOG(ERROR) << "ContextGroup::Initialize failed because the type of "
131 << "the context does not fit with the group."; 131 << "the context does not fit with the group.";
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 GLuint client_id, GLuint* service_id) const { 624 GLuint client_id, GLuint* service_id) const {
625 Buffer* buffer = buffer_manager_->GetBuffer(client_id); 625 Buffer* buffer = buffer_manager_->GetBuffer(client_id);
626 if (!buffer) 626 if (!buffer)
627 return false; 627 return false;
628 *service_id = buffer->service_id(); 628 *service_id = buffer->service_id();
629 return true; 629 return true;
630 } 630 }
631 631
632 } // namespace gles2 632 } // namespace gles2
633 } // namespace gpu 633 } // namespace gpu
OLDNEW
« no previous file with comments | « content/common/gpu_host_messages.h ('k') | gpu/command_buffer/service/gpu_preferences.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698