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

Side by Side Diff: gpu/command_buffer/client/gl_in_process_context.cc

Issue 23130004: Enforce a memory limit on MappedMemoryManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix another namespace error Created 7 years, 4 months 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
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/client/gl_in_process_context.h" 5 #include "gpu/command_buffer/client/gl_in_process_context.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 command_buffer_.get())); 253 command_buffer_.get()));
254 254
255 if (share_resources) { 255 if (share_resources) {
256 g_all_shared_contexts.Get().insert(this); 256 g_all_shared_contexts.Get().insert(this);
257 scoped_shared_context_lock.reset(); 257 scoped_shared_context_lock.reset();
258 } 258 }
259 259
260 if (!gles2_implementation_->Initialize( 260 if (!gles2_implementation_->Initialize(
261 kStartTransferBufferSize, 261 kStartTransferBufferSize,
262 kMinTransferBufferSize, 262 kMinTransferBufferSize,
263 kMaxTransferBufferSize)) { 263 kMaxTransferBufferSize,
264 gles2::GLES2Implementation::kNoLimit)) {
264 return false; 265 return false;
265 } 266 }
266 267
267 return true; 268 return true;
268 } 269 }
269 270
270 void GLInProcessContextImpl::Destroy() { 271 void GLInProcessContextImpl::Destroy() {
271 while (!query_callbacks_.empty()) { 272 while (!query_callbacks_.empty()) {
272 CallQueryCallback(0); 273 CallQueryCallback(0);
273 } 274 }
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 surface->GetSize(), 387 surface->GetSize(),
387 allowed_extensions, 388 allowed_extensions,
388 attribs, 389 attribs,
389 gpu_preference)) 390 gpu_preference))
390 return NULL; 391 return NULL;
391 392
392 return context.release(); 393 return context.release();
393 } 394 }
394 395
395 } // namespace gpu 396 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/client/fenced_allocator.cc ('k') | gpu/command_buffer/client/gles2_implementation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698