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

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc

Issue 213353005: Refactor gpu::Buffer to allow different types of backing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix pointer alignment in tests Created 6 years, 8 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 | Annotate | Revision Log
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/service/gles2_cmd_decoder_unittest_base.h" 5 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1405 matching lines...) Expand 10 before | Expand all | Expand 10 after
1416 GLsizei num_vertices, GLuint buffer_id) { 1416 GLsizei num_vertices, GLuint buffer_id) {
1417 AddExpectationsForSimulatedAttrib0WithError( 1417 AddExpectationsForSimulatedAttrib0WithError(
1418 num_vertices, buffer_id, GL_NO_ERROR); 1418 num_vertices, buffer_id, GL_NO_ERROR);
1419 } 1419 }
1420 1420
1421 GLES2DecoderWithShaderTestBase::MockCommandBufferEngine:: 1421 GLES2DecoderWithShaderTestBase::MockCommandBufferEngine::
1422 MockCommandBufferEngine() { 1422 MockCommandBufferEngine() {
1423 1423
1424 scoped_ptr<base::SharedMemory> shm(new base::SharedMemory()); 1424 scoped_ptr<base::SharedMemory> shm(new base::SharedMemory());
1425 shm->CreateAndMapAnonymous(kSharedBufferSize); 1425 shm->CreateAndMapAnonymous(kSharedBufferSize);
1426 valid_buffer_ = new gpu::Buffer(shm.Pass(), kSharedBufferSize); 1426 valid_buffer_ = MakeBufferFromSharedMemory(shm.Pass(), kSharedBufferSize);
1427 1427
1428 ClearSharedMemory(); 1428 ClearSharedMemory();
1429 } 1429 }
1430 1430
1431 GLES2DecoderWithShaderTestBase::MockCommandBufferEngine:: 1431 GLES2DecoderWithShaderTestBase::MockCommandBufferEngine::
1432 ~MockCommandBufferEngine() {} 1432 ~MockCommandBufferEngine() {}
1433 1433
1434 scoped_refptr<gpu::Buffer> 1434 scoped_refptr<gpu::Buffer>
1435 GLES2DecoderWithShaderTestBase::MockCommandBufferEngine::GetSharedMemoryBuffer( 1435 GLES2DecoderWithShaderTestBase::MockCommandBufferEngine::GetSharedMemoryBuffer(
1436 int32 shm_id) { 1436 int32 shm_id) {
(...skipping 27 matching lines...) Expand all
1464 SetupDefaultProgram(); 1464 SetupDefaultProgram();
1465 } 1465 }
1466 1466
1467 // Include the auto-generated part of this file. We split this because it means 1467 // Include the auto-generated part of this file. We split this because it means
1468 // we can easily edit the non-auto generated parts right here in this file 1468 // we can easily edit the non-auto generated parts right here in this file
1469 // instead of having to edit some template or the code generator. 1469 // instead of having to edit some template or the code generator.
1470 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" 1470 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h"
1471 1471
1472 } // namespace gles2 1472 } // namespace gles2
1473 } // namespace gpu 1473 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/common_decoder_unittest.cc ('k') | gpu/command_buffer/service/gpu_scheduler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698