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

Unified Diff: gpu/command_buffer/client/cmd_buffer_helper_test.cc

Issue 2163093002: remove linked_ptr from gpu/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix? win32 compile Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | gpu/command_buffer/service/command_executor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/client/cmd_buffer_helper_test.cc
diff --git a/gpu/command_buffer/client/cmd_buffer_helper_test.cc b/gpu/command_buffer/client/cmd_buffer_helper_test.cc
index f8795255c20469f927e8e3807274d9f957d58151..40ae25e700f904d7749271273aaffc4cbdcd497f 100644
--- a/gpu/command_buffer/client/cmd_buffer_helper_test.cc
+++ b/gpu/command_buffer/client/cmd_buffer_helper_test.cc
@@ -7,13 +7,13 @@
#include <stddef.h>
#include <stdint.h>
-#include <list>
#include <memory>
+#include <vector>
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/macros.h"
-#include "base/memory/linked_ptr.h"
+#include "base/memory/ptr_util.h"
#include "base/run_loop.h"
#include "gpu/command_buffer/client/cmd_buffer_helper.h"
#include "gpu/command_buffer/service/command_buffer_service.h"
@@ -164,17 +164,17 @@ class CommandBufferHelperTest : public testing::Test {
int arg_count = cmd_size - 1;
// Allocate array for args.
- linked_ptr<std::vector<CommandBufferEntry> > args_ptr(
- new std::vector<CommandBufferEntry>(arg_count ? arg_count : 1));
+ auto args_ptr =
+ base::MakeUnique<CommandBufferEntry[]>(arg_count ? arg_count : 1);
for (int32_t ii = 0; ii < arg_count; ++ii) {
- (*args_ptr)[ii].value_uint32 = 0xF00DF00D + ii;
+ args_ptr[ii].value_uint32 = 0xF00DF00D + ii;
}
// Add command and save args in test_command_args_ until the test completes.
AddCommandWithExpect(
- _return, test_command_next_id_++, arg_count, &(*args_ptr)[0]);
- test_command_args_.insert(test_command_args_.end(), args_ptr);
+ _return, test_command_next_id_++, arg_count, args_ptr.get());
+ test_command_args_.push_back(std::move(args_ptr));
}
void TestCommandWrappingFull(int32_t cmd_size, int32_t start_commands) {
@@ -264,7 +264,7 @@ class CommandBufferHelperTest : public testing::Test {
std::unique_ptr<CommandBufferServiceLocked> command_buffer_;
std::unique_ptr<CommandExecutor> executor_;
std::unique_ptr<CommandBufferHelper> helper_;
- std::list<linked_ptr<std::vector<CommandBufferEntry> > > test_command_args_;
+ std::vector<std::unique_ptr<CommandBufferEntry[]>> test_command_args_;
unsigned int test_command_next_id_;
Sequence sequence_;
base::MessageLoop message_loop_;
« no previous file with comments | « no previous file | gpu/command_buffer/service/command_executor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698