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

Side by Side Diff: content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc

Issue 702493002: PepperGL: Enable client side arrays support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update Created 6 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 | « no previous file | gpu/BUILD.gn » ('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 "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" 5 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h"
6 6
7 #include "third_party/khronos/GLES2/gl2.h" 7 #include "third_party/khronos/GLES2/gl2.h"
8 #ifndef GL_GLEXT_PROTOTYPES 8 #ifndef GL_GLEXT_PROTOTYPES
9 #define GL_GLEXT_PROTOTYPES 1 9 #define GL_GLEXT_PROTOTYPES 1
10 #endif 10 #endif
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 233
234 if (attributes_.noAutomaticFlushes) 234 if (attributes_.noAutomaticFlushes)
235 gles2_helper_->SetAutomaticFlushes(false); 235 gles2_helper_->SetAutomaticFlushes(false);
236 // Create a transfer buffer used to copy resources between the renderer 236 // Create a transfer buffer used to copy resources between the renderer
237 // process and the GPU process. 237 // process and the GPU process.
238 transfer_buffer_ .reset(new gpu::TransferBuffer(gles2_helper_.get())); 238 transfer_buffer_ .reset(new gpu::TransferBuffer(gles2_helper_.get()));
239 239
240 DCHECK(host_.get()); 240 DCHECK(host_.get());
241 241
242 // Create the object exposing the OpenGL API. 242 // Create the object exposing the OpenGL API.
243 bool bind_generates_resources = false; 243 const bool bind_generates_resources = false;
244 const bool support_client_side_arrays = false;
245
244 real_gl_.reset( 246 real_gl_.reset(
245 new gpu::gles2::GLES2Implementation(gles2_helper_.get(), 247 new gpu::gles2::GLES2Implementation(gles2_helper_.get(),
246 gles2_share_group.get(), 248 gles2_share_group.get(),
247 transfer_buffer_.get(), 249 transfer_buffer_.get(),
248 bind_generates_resources, 250 bind_generates_resources,
249 lose_context_when_out_of_memory_, 251 lose_context_when_out_of_memory_,
252 support_client_side_arrays,
250 command_buffer_.get())); 253 command_buffer_.get()));
251 setGLInterface(real_gl_.get()); 254 setGLInterface(real_gl_.get());
252 255
253 if (!real_gl_->Initialize( 256 if (!real_gl_->Initialize(
254 mem_limits_.start_transfer_buffer_size, 257 mem_limits_.start_transfer_buffer_size,
255 mem_limits_.min_transfer_buffer_size, 258 mem_limits_.min_transfer_buffer_size,
256 mem_limits_.max_transfer_buffer_size, 259 mem_limits_.max_transfer_buffer_size,
257 mem_limits_.mapped_memory_reclaim_limit)) { 260 mem_limits_.mapped_memory_reclaim_limit)) {
258 LOG(ERROR) << "Failed to initialize GLES2Implementation."; 261 LOG(ERROR) << "Failed to initialize GLES2Implementation.";
259 return false; 262 return false;
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 share_group_->RemoveAllContexts(); 398 share_group_->RemoveAllContexts();
396 399
397 DCHECK(host_.get()); 400 DCHECK(host_.get());
398 { 401 {
399 base::AutoLock lock(g_default_share_groups_lock.Get()); 402 base::AutoLock lock(g_default_share_groups_lock.Get());
400 g_default_share_groups.Get().erase(host_.get()); 403 g_default_share_groups.Get().erase(host_.get());
401 } 404 }
402 } 405 }
403 406
404 } // namespace content 407 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | gpu/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698