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

Side by Side Diff: ppapi/shared_impl/ppb_graphics_3d_shared.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 | « gpu/gpu.gyp ('k') | no next file » | 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 "ppapi/shared_impl/ppb_graphics_3d_shared.h" 5 #include "ppapi/shared_impl/ppb_graphics_3d_shared.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "gpu/command_buffer/client/gles2_cmd_helper.h" 8 #include "gpu/command_buffer/client/gles2_cmd_helper.h"
9 #include "gpu/command_buffer/client/gles2_implementation.h" 9 #include "gpu/command_buffer/client/gles2_implementation.h"
10 #include "gpu/command_buffer/client/transfer_buffer.h" 10 #include "gpu/command_buffer/client/transfer_buffer.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 return false; 112 return false;
113 113
114 // Create a transfer buffer used to copy resources between the renderer 114 // Create a transfer buffer used to copy resources between the renderer
115 // process and the GPU process. 115 // process and the GPU process.
116 const int32 kMinTransferBufferSize = 256 * 1024; 116 const int32 kMinTransferBufferSize = 256 * 1024;
117 const int32 kMaxTransferBufferSize = 16 * 1024 * 1024; 117 const int32 kMaxTransferBufferSize = 16 * 1024 * 1024;
118 transfer_buffer_.reset(new gpu::TransferBuffer(gles2_helper_.get())); 118 transfer_buffer_.reset(new gpu::TransferBuffer(gles2_helper_.get()));
119 119
120 const bool bind_creates_resources = true; 120 const bool bind_creates_resources = true;
121 const bool lose_context_when_out_of_memory = false; 121 const bool lose_context_when_out_of_memory = false;
122 const bool support_client_side_arrays = true;
122 123
123 // Create the object exposing the OpenGL API. 124 // Create the object exposing the OpenGL API.
124 gles2_impl_.reset(new gpu::gles2::GLES2Implementation( 125 gles2_impl_.reset(new gpu::gles2::GLES2Implementation(
125 gles2_helper_.get(), 126 gles2_helper_.get(),
126 share_gles2 ? share_gles2->share_group() : NULL, 127 share_gles2 ? share_gles2->share_group() : NULL,
127 transfer_buffer_.get(), 128 transfer_buffer_.get(),
128 bind_creates_resources, 129 bind_creates_resources,
129 lose_context_when_out_of_memory, 130 lose_context_when_out_of_memory,
131 support_client_side_arrays,
130 GetGpuControl())); 132 GetGpuControl()));
131 133
132 if (!gles2_impl_->Initialize( 134 if (!gles2_impl_->Initialize(
133 transfer_buffer_size, 135 transfer_buffer_size,
134 kMinTransferBufferSize, 136 kMinTransferBufferSize,
135 std::max(kMaxTransferBufferSize, transfer_buffer_size), 137 std::max(kMaxTransferBufferSize, transfer_buffer_size),
136 gpu::gles2::GLES2Implementation::kNoLimit)) { 138 gpu::gles2::GLES2Implementation::kNoLimit)) {
137 return false; 139 return false;
138 } 140 }
139 141
140 gles2_impl_->PushGroupMarkerEXT(0, "PPAPIContext"); 142 gles2_impl_->PushGroupMarkerEXT(0, "PPAPIContext");
141 143
142 return true; 144 return true;
143 } 145 }
144 146
145 void PPB_Graphics3D_Shared::DestroyGLES2Impl() { 147 void PPB_Graphics3D_Shared::DestroyGLES2Impl() {
146 gles2_impl_.reset(); 148 gles2_impl_.reset();
147 transfer_buffer_.reset(); 149 transfer_buffer_.reset();
148 gles2_helper_.reset(); 150 gles2_helper_.reset();
149 } 151 }
150 152
151 } // namespace ppapi 153 } // namespace ppapi
OLDNEW
« no previous file with comments | « gpu/gpu.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698