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

Side by Side Diff: command_buffer/client/cross/fenced_allocator_test.cc

Issue 332036: move all O3D specific command buffer stuff to command_buffer::o3d... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: Created 11 years, 1 month 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 /* 1 /*
2 * Copyright 2009, Google Inc. 2 * Copyright 2009, Google Inc.
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 using testing::_; 59 using testing::_;
60 60
61 class BaseFencedAllocatorTest : public testing::Test { 61 class BaseFencedAllocatorTest : public testing::Test {
62 protected: 62 protected:
63 static const unsigned int kBufferSize = 1024; 63 static const unsigned int kBufferSize = 1024;
64 64
65 virtual void SetUp() { 65 virtual void SetUp() {
66 api_mock_.reset(new AsyncAPIMock); 66 api_mock_.reset(new AsyncAPIMock);
67 // ignore noops in the mock - we don't want to inspect the internals of the 67 // ignore noops in the mock - we don't want to inspect the internals of the
68 // helper. 68 // helper.
69 EXPECT_CALL(*api_mock_, DoCommand(kNoop, 0, _)) 69 EXPECT_CALL(*api_mock_, DoCommand(cmd::kNoop, 0, _))
70 .WillRepeatedly(Return(parse_error::kParseNoError)); 70 .WillRepeatedly(Return(parse_error::kParseNoError));
71 // Forward the SetToken calls to the engine 71 // Forward the SetToken calls to the engine
72 EXPECT_CALL(*api_mock_.get(), DoCommand(kSetToken, 1, _)) 72 EXPECT_CALL(*api_mock_.get(), DoCommand(cmd::kSetToken, 1, _))
73 .WillRepeatedly(DoAll(Invoke(api_mock_.get(), &AsyncAPIMock::SetToken), 73 .WillRepeatedly(DoAll(Invoke(api_mock_.get(), &AsyncAPIMock::SetToken),
74 Return(parse_error::kParseNoError))); 74 Return(parse_error::kParseNoError)));
75 75
76 NPObjectPointer<gpu_plugin::SharedMemory> ring_buffer = 76 NPObjectPointer<gpu_plugin::SharedMemory> ring_buffer =
77 NPCreateObject<gpu_plugin::SharedMemory>(NULL); 77 NPCreateObject<gpu_plugin::SharedMemory>(NULL);
78 ring_buffer->Initialize(1024); 78 ring_buffer->Initialize(1024);
79 79
80 size_t size_bytes; 80 size_t size_bytes;
81 void* buffer = NPN_MapMemory(NULL, ring_buffer.Get(), &size_bytes); 81 void* buffer = NPN_MapMemory(NULL, ring_buffer.Get(), &size_bytes);
82 82
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 // Free up everything. 494 // Free up everything.
495 for (unsigned int i = 0; i < kAllocCount; ++i) { 495 for (unsigned int i = 0; i < kAllocCount; ++i) {
496 allocator_->Free(pointers[i]); 496 allocator_->Free(pointers[i]);
497 EXPECT_TRUE(allocator_->CheckConsistency()); 497 EXPECT_TRUE(allocator_->CheckConsistency());
498 } 498 }
499 } 499 }
500 500
501 501
502 } // namespace command_buffer 502 } // namespace command_buffer
503 } // namespace o3d 503 } // namespace o3d
OLDNEW
« no previous file with comments | « command_buffer/client/cross/effect_helper.cc ('k') | command_buffer/client/cross/o3d_cmd_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698