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

Unified Diff: gpu/command_buffer/service/mailbox_manager_sync.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 | « gpu/command_buffer/service/mailbox_manager_impl.h ('k') | gpu/command_buffer/service/texture_definition.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/mailbox_manager_sync.cc
diff --git a/gpu/command_buffer/service/mailbox_manager_sync.cc b/gpu/command_buffer/service/mailbox_manager_sync.cc
index 4a183543064950ec177b7f3d21c49630da86cf30..d07a3ddeb09b8bc903aeae41507d2a2747ac8d57 100644
--- a/gpu/command_buffer/service/mailbox_manager_sync.cc
+++ b/gpu/command_buffer/service/mailbox_manager_sync.cc
@@ -9,7 +9,7 @@
#include <algorithm>
#include <queue>
-#include "base/memory/linked_ptr.h"
+#include "base/memory/ptr_util.h"
#include "base/synchronization/lock.h"
#include "gpu/command_buffer/common/sync_token.h"
#include "gpu/command_buffer/service/texture_manager.h"
@@ -28,7 +28,7 @@ namespace {
base::LazyInstance<base::Lock> g_lock = LAZY_INSTANCE_INITIALIZER;
#if !defined(OS_MACOSX)
-typedef std::map<SyncToken, linked_ptr<gl::GLFence>> SyncTokenToFenceMap;
+typedef std::map<SyncToken, std::unique_ptr<gl::GLFence>> SyncTokenToFenceMap;
base::LazyInstance<SyncTokenToFenceMap> g_sync_point_to_fence =
LAZY_INSTANCE_INITIALIZER;
base::LazyInstance<std::queue<SyncTokenToFenceMap::iterator>> g_sync_points =
@@ -50,13 +50,12 @@ void CreateFenceLocked(const SyncToken& sync_token) {
sync_points.pop();
}
// Need to use EGL fences since we are likely not in a single share group.
- linked_ptr<gl::GLFence> fence(make_linked_ptr(new gl::GLFenceEGL));
- if (fence.get()) {
- std::pair<SyncTokenToFenceMap::iterator, bool> result =
- sync_point_to_fence.insert(std::make_pair(sync_token, fence));
- DCHECK(result.second);
- sync_points.push(result.first);
- }
+ auto fence = base::MakeUnique<gl::GLFenceEGL>();
+ std::pair<SyncTokenToFenceMap::iterator, bool> result =
+ sync_point_to_fence.insert(
+ std::make_pair(sync_token, std::move(fence)));
+ DCHECK(result.second);
+ sync_points.push(result.first);
DCHECK(sync_points.size() == sync_point_to_fence.size());
}
#endif
« no previous file with comments | « gpu/command_buffer/service/mailbox_manager_impl.h ('k') | gpu/command_buffer/service/texture_definition.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698