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

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

Issue 23130004: Enforce a memory limit on MappedMemoryManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert FencedAllocator::InUse changes and add comments explaining its behavior 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 // Tests for GLES2Implementation. 5 // Tests for GLES2Implementation.
6 6
7 #include "gpu/command_buffer/client/gles2_implementation.h" 7 #include "gpu/command_buffer/client/gles2_implementation.h"
8 8
9 #include <GLES2/gl2ext.h> 9 #include <GLES2/gl2ext.h>
10 #include <GLES2/gl2extchromium.h> 10 #include <GLES2/gl2extchromium.h>
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 398
399 gl_.reset(new GLES2Implementation( 399 gl_.reset(new GLES2Implementation(
400 helper_.get(), 400 helper_.get(),
401 NULL, 401 NULL,
402 transfer_buffer_.get(), 402 transfer_buffer_.get(),
403 bind_generates_resource, 403 bind_generates_resource,
404 NULL)); 404 NULL));
405 ASSERT_TRUE(gl_->Initialize( 405 ASSERT_TRUE(gl_->Initialize(
406 kTransferBufferSize, 406 kTransferBufferSize,
407 kTransferBufferSize, 407 kTransferBufferSize,
408 kTransferBufferSize)); 408 kTransferBufferSize,
409 GLES2Implementation::kNoLimit));
409 } 410 }
410 411
411 EXPECT_CALL(*command_buffer(), OnFlush()) 412 EXPECT_CALL(*command_buffer(), OnFlush())
412 .Times(1) 413 .Times(1)
413 .RetiresOnSaturation(); 414 .RetiresOnSaturation();
414 helper_->CommandBufferHelper::Finish(); 415 helper_->CommandBufferHelper::Finish();
415 ::testing::Mock::VerifyAndClearExpectations(gl_.get()); 416 ::testing::Mock::VerifyAndClearExpectations(gl_.get());
416 417
417 Buffer ring_buffer = helper_->get_ring_buffer(); 418 Buffer ring_buffer = helper_->get_ring_buffer();
418 commands_ = static_cast<CommandBufferEntry*>(ring_buffer.ptr) + 419 commands_ = static_cast<CommandBufferEntry*>(ring_buffer.ptr) +
(...skipping 2448 matching lines...) Expand 10 before | Expand all | Expand 10 after
2867 ClearCommands(); 2868 ClearCommands();
2868 gl_->Enable(GL_BLEND); 2869 gl_->Enable(GL_BLEND);
2869 EXPECT_TRUE(NoCommandsWritten()); 2870 EXPECT_TRUE(NoCommandsWritten());
2870 } 2871 }
2871 2872
2872 2873
2873 #include "gpu/command_buffer/client/gles2_implementation_unittest_autogen.h" 2874 #include "gpu/command_buffer/client/gles2_implementation_unittest_autogen.h"
2874 2875
2875 } // namespace gles2 2876 } // namespace gles2
2876 } // namespace gpu 2877 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698