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

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: Set chunk size 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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 gles2_implementation_.reset(new gles2::GLES2Implementation( 187 gles2_implementation_.reset(new gles2::GLES2Implementation(
188 gles2_helper_.get(), 188 gles2_helper_.get(),
189 client_share_group, 189 client_share_group,
190 transfer_buffer_.get(), 190 transfer_buffer_.get(),
191 options.bind_generates_resource, 191 options.bind_generates_resource,
192 options.image_factory)); 192 options.image_factory));
193 193
194 ASSERT_TRUE(gles2_implementation_->Initialize( 194 ASSERT_TRUE(gles2_implementation_->Initialize(
195 kStartTransferBufferSize, 195 kStartTransferBufferSize,
196 kMinTransferBufferSize, 196 kMinTransferBufferSize,
197 kMaxTransferBufferSize)) << "Could not init GLES2Implementation"; 197 kMaxTransferBufferSize,
198 GLES2Implementation::kNoLimit)) << "Could not init GLES2Implementation";
198 199
199 MakeCurrent(); 200 MakeCurrent();
200 } 201 }
201 202
202 void GLManager::SetupBaseContext() { 203 void GLManager::SetupBaseContext() {
203 if (use_count_) { 204 if (use_count_) {
204 #if defined(OS_ANDROID) 205 #if defined(OS_ANDROID)
205 base_share_group_ = new scoped_refptr<gfx::GLShareGroup>( 206 base_share_group_ = new scoped_refptr<gfx::GLShareGroup>(
206 new gfx::GLShareGroup); 207 new gfx::GLShareGroup);
207 gfx::Size size(4, 4); 208 gfx::Size size(4, 4);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 if (!context_lost_allowed_) { 254 if (!context_lost_allowed_) {
254 ASSERT_EQ(::gpu::error::kNoError, state.error); 255 ASSERT_EQ(::gpu::error::kNoError, state.error);
255 } 256 }
256 } 257 }
257 258
258 bool GLManager::GetBufferChanged(int32 transfer_buffer_id) { 259 bool GLManager::GetBufferChanged(int32 transfer_buffer_id) {
259 return gpu_scheduler_->SetGetBuffer(transfer_buffer_id); 260 return gpu_scheduler_->SetGetBuffer(transfer_buffer_id);
260 } 261 }
261 262
262 } // namespace gpu 263 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698