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

Side by Side Diff: gpu/command_buffer/tests/gl_manager.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/tests/gl_manager.h" 5 #include "gpu/command_buffer/tests/gl_manager.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/at_exit.h" 9 #include "base/at_exit.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 gles2_implementation_.reset(new gles2::GLES2Implementation( 191 gles2_implementation_.reset(new gles2::GLES2Implementation(
192 gles2_helper_.get(), 192 gles2_helper_.get(),
193 client_share_group, 193 client_share_group,
194 transfer_buffer_.get(), 194 transfer_buffer_.get(),
195 options.bind_generates_resource, 195 options.bind_generates_resource,
196 gpu_control_.get())); 196 gpu_control_.get()));
197 197
198 ASSERT_TRUE(gles2_implementation_->Initialize( 198 ASSERT_TRUE(gles2_implementation_->Initialize(
199 kStartTransferBufferSize, 199 kStartTransferBufferSize,
200 kMinTransferBufferSize, 200 kMinTransferBufferSize,
201 kMaxTransferBufferSize)) << "Could not init GLES2Implementation"; 201 kMaxTransferBufferSize,
202 gpu::gles2::GLES2Implementation::kNoLimit))
203 << "Could not init GLES2Implementation";
202 204
203 MakeCurrent(); 205 MakeCurrent();
204 } 206 }
205 207
206 void GLManager::SetupBaseContext() { 208 void GLManager::SetupBaseContext() {
207 if (use_count_) { 209 if (use_count_) {
208 #if defined(OS_ANDROID) 210 #if defined(OS_ANDROID)
209 base_share_group_ = new scoped_refptr<gfx::GLShareGroup>( 211 base_share_group_ = new scoped_refptr<gfx::GLShareGroup>(
210 new gfx::GLShareGroup); 212 new gfx::GLShareGroup);
211 gfx::Size size(4, 4); 213 gfx::Size size(4, 4);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 if (!context_lost_allowed_) { 259 if (!context_lost_allowed_) {
258 ASSERT_EQ(::gpu::error::kNoError, state.error); 260 ASSERT_EQ(::gpu::error::kNoError, state.error);
259 } 261 }
260 } 262 }
261 263
262 bool GLManager::GetBufferChanged(int32 transfer_buffer_id) { 264 bool GLManager::GetBufferChanged(int32 transfer_buffer_id) {
263 return gpu_scheduler_->SetGetBuffer(transfer_buffer_id); 265 return gpu_scheduler_->SetGetBuffer(transfer_buffer_id);
264 } 266 }
265 267
266 } // namespace gpu 268 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/client/query_tracker_unittest.cc ('k') | gpu/gles2_conform_support/egl/display.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698